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

Make the return of hardforkfor optional #5547

Conversation

Gabriel-Trintinalia
Copy link
Contributor

PR description

Make the return of hardforkfor optional.

For the EngineGetPayloadV3, when Shanghai and Cancun had the same milestone, an exception was

java.lang.IllegalStateException: No hardfork found for predicate org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine.EngineGetPayloadV3$$Lambda$840/0x00000008010a4838@237b2852
	at org.hyperledger.besu.ethereum.mainnet.DefaultProtocolSchedule.lambda$hardforkFor$4(DefaultProtocolSchedule.java:132)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at org.hyperledger.besu.ethereum.mainnet.DefaultProtocolSchedule.hardforkFor(DefaultProtocolSchedule.java:131)
	at org.hyperledger.besu.consensus.merge.TransitionProtocolSchedule.lambda$hardforkFor$3(TransitionProtocolSchedule.java:210)
	at org.hyperledger.besu.consensus.merge.TransitionUtils.dispatchFunctionAccordingToMergeState(TransitionUtils.java:75)
	at org.hyperledger.besu.consensus.merge.TransitionProtocolSchedule.hardforkFor(TransitionProtocolSchedule.java:209)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine.EngineGetPayloadV3.<init>(EngineGetPayloadV3.java:55)
	at org.hyperledger.besu.ethereum.api.jsonrpc.methods.ExecutionEngineJsonRpcMethods.create(ExecutionEngineJsonRpcMethods.java:157)
	at org.hyperledger.besu.ethereum.api.jsonrpc.methods.ApiGroupJsonRpcMethods.create(ApiGroupJsonRpcMethods.java:30)
	at org.hyperledger.besu.ethereum.api.jsonrpc.methods.JsonRpcMethodsFactory.methods(JsonRpcMethodsFactory.java:144)
	at org.hyperledger.besu.RunnerBuilder.jsonRpcMethods(RunnerBuilder.java:1201)
	at org.hyperledger.besu.RunnerBuilder.build(RunnerBuilder.java:831)
	at org.hyperledger.besu.cli.BesuCommand.synchronize(BesuCommand.java:3086)
	at org.hyperledger.besu.cli.BesuCommand.buildRunner(BesuCommand.java:1725)
	at org.hyperledger.besu.cli.BesuCommand.run(BesuCommand.java:1560)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at org.hyperledger.besu.cli.util.ConfigOptionSearchAndRunHandler.handle(ConfigOptionSearchAndRunHandler.java:62)
	at org.hyperledger.besu.cli.util.ConfigOptionSearchAndRunHandler.handle(ConfigOptionSearchAndRunHandler.java:33)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at org.hyperledger.besu.cli.BesuCommand.parse(BesuCommand.java:1717)
	at org.hyperledger.besu.cli.BesuCommand.parse(BesuCommand.java:1512)
	at org.hyperledger.besu.Besu.main(Besu.java:39)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

LGTM

@Gabriel-Trintinalia Gabriel-Trintinalia merged commit 4b020a7 into hyperledger:4844-devnet-5b Jun 8, 2023
jflo pushed a commit that referenced this pull request Jun 13, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jun 14, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jun 15, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jun 16, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jun 21, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jun 29, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jun 30, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit that referenced this pull request Jul 5, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
jflo pushed a commit to jflo/besu that referenced this pull request Jul 20, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia deleted the fix-hardforkfor-issue branch September 11, 2023 01:05
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