Closed jagerman closed 4 weeks ago
(The checksum algorithm is rather stupid: first you must convert to lower-case hex because longer is better or something, then you get a 256-bit hash of the hex value, then you proceed to use only 40 of those bits to decide whether to flip a-f characters to A-F (if found), and you completely ignore the other 216 bits because let's just do pointless hex conversions and oversize hashes yay. But it's not even 40 sequential bits, but rather bit 8, 4, 16, 12, 24, 20, ..., 160, 156.)
Heads up @Doy-lee - this also starts including the 0x
prefix in RPC response for eth addresses, which wasn't there before and might need fixes in the block observer or staking backend.
This changes the format for eth::address values to use checksum formatting, both when formatting via fmt (such as in log statements) and when writing them as values in an RPC response.
Sample log line:
and excerpt from the
get_service_nodes
rpc endpoint: