Skip to content
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

fix: add blockHeight to EpochLength tx to make them unique #155

Merged
merged 6 commits into from
Nov 2, 2019

Conversation

troggy
Copy link
Member

@troggy troggy commented Nov 1, 2019

See leapdao/leap-node#349 for rationale.

With blockHeight injected several legit epoch length txs changing to the same value should have different raw bytes.

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
See leapdao/leap-node#349 for rationale
@troggy troggy changed the title fix: add blockHeight to EpochLength tx to make them unique. fix: add blockHeight to EpochLength tx to make them unique Nov 1, 2019

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
@troggy
Copy link
Member Author

troggy commented Nov 1, 2019

released as 0.36.2-beta for evaluating the fix in leap-node

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
Use it for epoch length txs with block height, keep the EPOCH_LENGTH type as it is to support
legacy transactions (so we can replay the old networks)

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
@sunify sunify self-requested a review November 2, 2019 13:40
Copy link
Member

@sunify sunify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@troggy
Copy link
Member Author

troggy commented Nov 2, 2019

@sunify I've also added strict checks for params to avoid mis-use like Tx.epochLength(2): 2db8efd

@sunify
Copy link
Member

sunify commented Nov 2, 2019

Awesome! Looks good as well :-)

@troggy troggy merged commit 9309f5f into master Nov 2, 2019
@troggy troggy deleted the fix/epoch-length-replay-protection branch November 2, 2019 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants