-
Notifications
You must be signed in to change notification settings - Fork 897
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
Handle legacy fork id Eth/64 #1542
Handle legacy fork id Eth/64 #1542
Conversation
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
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.
@abdelhamidbakhta discovered some issues so just putting this here to signal that this shouldn't be merged
…ompatibility Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
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.
Which pairs of versions was this tested on?
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/ForkIdManager.java
Outdated
Show resolved
Hide resolved
ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/LegacyForkIdManager.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
…ompatibility Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
|
And 1.4.6 and 1.5.0 is expected to continue to not work, correct? We're going to advise upgrading? |
Yes this is the plan for the moment. |
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.
Ok, cool. Appooved assuming that plan holds.
…ompatibility Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
…ompatibility Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> # Conflicts: # CHANGELOG.md
- change cli option name - add unit tests Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
PR description
The fork id computation has been updated to not include 0 fork blocks in the list of forks used to compute the fork id.
As a result, previous Besu versions are not capable anymore to talk to newest versions of Besu because their fork id are rejected with the new computation method.
We should allow previous Besu nodes to talk with new Besu nodes by adding a command line flag that enable the legacy fork id computation.
This PR adds a CLI flag to enable the legacy fork id computation method:
--compatibility-eth64-forkid-enabled
defaulted to false.Fixed Issue(s)
Adresses #1541
Testing
Manual Test
Setup
Local testnet with 2
Besu
nodes:besu/v20.10.1-dev-9589ae08/osx-x86_64/adoptopenjdk-java-11
--compatibility-eth64-forkid-enabled=true
besu/v1.4.6/osx-x86_64/adoptopenjdk-java-11
Genesis
Result
Nodes are able to communicate correctly using Eth/64 subprotocol.
Admin peers of besu/v20.10.1
Admin peers of besu/v1.4.6
Unit tests
Added
ForkIdBackwardCompatibilityTest
class to cover backward compatibility testing.Copied legacy
ForkIdManager
from Besu1.4.6
and added as a test resource to compute expected results for tests.Changelog
Signed-off-by: Abdelhamid Bakhta abdelhamid.bakhta@consensys.net