kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a Beta version at the final testing phases.
ISC License
350 stars 105 forks source link

fix deterministic.rs 'seal changed -was: 0xa7a4 now 0x544d' #438

Closed hyperji closed 1 month ago

hyperji commented 1 month ago

fix issue: https://github.com/kaspanet/rusty-kaspa/issues/437

reason: seal changed -was: 0xa7a4 now 0x544d

gvbgduh commented 1 month ago

But what is this seal and its purpose and why does it suddenly got broken? Can we really just patch it with a new value? It sure indicates that some hash of a data structure (?) got changed and there should be a reason it was sealed.

biryukovmaxim commented 1 month ago

This pr is included by 1.77 rustc version After that seal proc macro gets different tokens. Without unnecessary whitespaces. That's why hash changed.

I suggest to @aspect to make it derive macro only depending on fields and types, he replied that this is general purpose macro and it can be applied to any code. In summary it will work fine until compiler change the logic again.

Imho the proper solution is changing the hash and pinning rust toolchain in the repo. And maybe adding msrv

gvbgduh commented 1 month ago

I see, thanks for clarification

coderofstuff commented 1 month ago

Thank you for your contribution. As this was integrated into a more fundamental fix in https://github.com/kaspanet/rusty-kaspa/pull/442 this current PR has been superseded.

aspect commented 1 month ago

Fixed in https://github.com/kaspanet/rusty-kaspa/pull/442

I couldn't merge this PR due to other ongoing issues with lints (caused by the new rustc version as well), so the change was applied in the above-mentioned PR that was just merged.