Skip to content

Conversation

@karlinnolabs
Copy link

Error generated in blockTemplate caused by use of UInt32 for a Int32 value.

buffer.js:784
throw TypeError('value is out of bounds');
^
TypeError: value is out of bounds
at TypeError ()
at checkInt (buffer.js:784:11)
at Buffer.writeUInt32BE (buffer.js:848:5)
at BlockTemplate.serializeHeader (/home/ubuntu/stratum-server/node_modules/stratum-pool/lib/blockTemplate.js:97:16)
at JobManager.processShare (/home/ubuntu/stratum-server/node_modules/stratum-pool/lib/jobManager.js:224:32)
at null. (/home/ubuntu/stratum-server/node_modules/stratum-pool/lib/pool.js:506:46)
at EventEmitter.emit (events.js:117:20)
at handleSubmit (/home/ubuntu/stratum-server/node_modules/stratum-pool/lib/stratum.js:159:15)
at handleMessage (/home/ubuntu/stratum-server/node_modules/stratum-pool/lib/stratum.js:72:17)
at /home/ubuntu/stratum-server/node_modules/stratum-pool/lib/stratum.js:232:25

@HashUnlimited
Copy link
Collaborator

Where exactly does this edge case occur? While basically right, I would like to see where the unsigned bit could possibly be of interest?

@karlinnolabs
Copy link
Author

Came up with litecoin 0.16

@HashUnlimited
Copy link
Collaborator

Nothing has changed in the block header with 0.16

The PR is correct, the version is an Int32, just there's nothing I can see influencing the behaviour at the current state as the affected bits are reserved for another ISM fork and will remain low as long as they aren't used. Are you sure that you have seen the issue on LTC or can it be another coin attempting to go to block version 5? There for I am trying to figure out if there could be another issue hidden somewhere before merging.

@karlinnolabs
Copy link
Author

I just upgraded from 0.10 to 0.16 on my mining box and stratum crashed out - I made this change and it works fine... Dunno what to say man I just fixed it for me and upstreamed because it's the nice thing to do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants