Skip to content

Conversation

@Bilogweb3
Copy link

@Bilogweb3 Bilogweb3 commented Nov 14, 2025

We kept ethclient.BlockReceipts aligned with execution-apis by reverting it to pass BlockNumberOrHash.String(), then implemented the requireCanonical-preserving path in gethclient.BlockReceipts where the flag is actually supported, and added an in-proc test in the gethclient package to prove the flag survives the roundtrip.

@Bilogweb3 Bilogweb3 requested a review from fjl as a code owner November 14, 2025 09:53
@rjl493456442
Copy link
Member

https://github.com/ethereum/execution-apis/blob/f910189261255eb0ebc49ee0e6f10f48562a41c3/src/eth/block.yaml#L221

According to the ethereum execution-apis spec, it doesn't say requireCanonical is the spec'd field. It's probably just a geth-related RPC argument.

As the ethclient is cross-client SDK and shouldn't be bound with Geth implementation.

If you really want to integrate the requireCanonical into ethclient, we need to change the execution-apis spec first.

@Bilogweb3 Bilogweb3 changed the title ethclient: preserve requireCanonical in BlockReceipts gethclient: preserve requireCanonical in BlockReceipts Nov 17, 2025
@Bilogweb3
Copy link
Author

@rjl493456442 thanks for pointing this out. I reverted ethclient.BlockReceipts to the spec-compliant string argument so the cross-client SDK no longer depends on geth-only flags. The requireCanonical - preserving call now lives in ethclient/gethclient.BlockReceipts (where those flags are supported) and I added a small in-proc test to prove the flag survives the roundtrip. Once execution-apis incorporates requireCanonical we can move this back into ethclient.

Title and description updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants