-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare nonce instead of message id of inputs to catch duplicates #900
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Out of curiosity, do you know what's the purpose of |
I think it's use to distinguish each message and have a unique id for all of them across the network such as txid or coin id. Detailed spec if needed : https://github.com/FuelLabs/fuel-specs/blob/cca2e8cd2e475263c909cb902620b5ff143713ec/src/identifiers/utxo-id.md#message-id |
Comparing the
nonce
of two messages inputs if enough to decide if they are duplicated or not. Previously we were computing themessage_id
now we avoid this computation and only compare thenonce
.It requires us to change the error variant to include
nonce
instead ofmessage_id
. Because the type of the content has change it's already breaking and so we can change the name also to match this type.Breaking
Before
After
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]