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 multi block tests #1365

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

gauravahuja
Copy link
Contributor

After this commit use CliqueProtocolSchedule instead of MainnetProtocolSchedule to extract the correct coinbase value the multi block test fail because unlike Replay tests, they don't have the actual block header with clique information.

This change should fix this exception

Invalid Bytes supplied - too short to produce a valid Clique Extra Data object.
java.lang.IllegalArgumentException: Invalid Bytes supplied - too short to produce a valid Clique Extra Data object.
	at org.hyperledger.besu.consensus.clique.CliqueExtraData.decodeRaw(CliqueExtraData.java:115)
	at org.hyperledger.besu.consensus.clique.CliqueBlockHeaderFunctions.

@gauravahuja gauravahuja force-pushed the gauravahuja/fix-multi-block-test branch from 90b4ce2 to 1914bba Compare October 3, 2024 11:55
@gauravahuja gauravahuja force-pushed the gauravahuja/fix-multi-block-test branch from 1914bba to b36e791 Compare October 3, 2024 12:02
Copy link
Collaborator

@DavePearce DavePearce left a comment

Choose a reason for hiding this comment

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

Overall, looks good. Again it might be useful to add some documentation highlighting what the purpose of the new switch is. Essentially, you are disabling the clique consensus protocol for manual tests. You could even rename useCoinbaseAddressFromBlockHeader to something more descriptive, like useCliqueConsensus (and obviously switch the interpretation of true / false, etc). Just a thought.

@gauravahuja gauravahuja merged commit 16548e9 into arith-dev Oct 4, 2024
5 checks passed
@gauravahuja gauravahuja deleted the gauravahuja/fix-multi-block-test branch October 4, 2024 06:59
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.

3 participants