pokt-network / pocket-core

Official implementation of the Pocket Network Protocol
http://www.pokt.network
MIT License
208 stars 101 forks source link

Sort RewardDelegators when marshaling a validator #1591

Closed msmania closed 6 months ago

msmania commented 6 months ago

Description

This is a fix for a regression introduced by #1581.

When a node stores a validator with the new RewardDelegators field, its marshaled product is not deterministic because the order of map iteration is not deterministic. As a result, the merkle tree of application.db can differ between nodes, leading to consensus failure.

The proposed fix is to sort the keys of RewardDelegators by using the stable marshaler.

Summary generated by Reviewpad on 15 Jan 24 18:21 UTC

This pull request includes changes to the nodes.proto file and a file diff.

The changes in the nodes.proto file include:

The file diff includes the following changes:

Please let me know if there is anything specific you would like me to focus on.

Olshansk commented 6 months ago

@msmania Friendly reminder to update ticket metadata Screenshot 2024-01-15 at 11 22 56 AM

msmania commented 6 months ago

@msmania Friendly reminder to update ticket metadata

So the process is to set a project AND fill the Release field in it?