Open bohendo opened 1 month ago
resolves #638 Improves the poor error discussed here and here but does not fully resolve these issues' underlying problem.
The deposit CLI tool assigns a value of eg "01017000" to a deposit file's fork_version. It's a hex string, no leading "0x", cool.
The staking-launchpad uses an env var such as 0x01017000, strips the leading "0x" and loads it into a buffer as hex data. Cool.
But then, it compares the value from our deposit file to this buffer cast to a string. toString() defaults to an ascii string instead of a hex string. Not cool.
toString()
Ultimately, we're comparing "��p�" to "01017000", which will cause the launchpad to declare "the network isn't right" when there's actually something else wrong with the deposit file.
Fix is very simple: call toString('hex') instead.
toString('hex')
Visit the deploys page to approve it
resolves #638 Improves the poor error discussed here and here but does not fully resolve these issues' underlying problem.
The deposit CLI tool assigns a value of eg "01017000" to a deposit file's fork_version. It's a hex string, no leading "0x", cool.
The staking-launchpad uses an env var such as 0x01017000, strips the leading "0x" and loads it into a buffer as hex data. Cool.
But then, it compares the value from our deposit file to this buffer cast to a string.
toString()
defaults to an ascii string instead of a hex string. Not cool.Ultimately, we're comparing "��p�" to "01017000", which will cause the launchpad to declare "the network isn't right" when there's actually something else wrong with the deposit file.
Fix is very simple: call
toString('hex')
instead.