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

PayloadId returned from payload_id_optimism inconsistent with op-geth #11729

Closed
1 task done
0xOsiris opened this issue Oct 14, 2024 · 0 comments
Closed
1 task done

PayloadId returned from payload_id_optimism inconsistent with op-geth #11729

0xOsiris opened this issue Oct 14, 2024 · 0 comments
Labels
C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled

Comments

@0xOsiris
Copy link
Contributor

0xOsiris commented Oct 14, 2024

Describe the bug

The PayloadId returned from a FCU in Reth when a build process is started is inconsistent with the implementation in op-geth.

I think it's reasonable to have a consistent implementation across execution clients for the PayloadId.

e.g. rollup-boost relies on parity in PayloadId between the builder, and the sequencer. Making Reth not compatible as a builder.

Reth implementation:

pub(crate) fn payload_id_optimism(parent: &B256, attributes: &OpPayloadAttributes) -> PayloadId {

op-geth implementation:
https://github.com/ethereum-optimism/op-geth/blob/f21b97f1d6f673b608f72e9e60d63e70bd925e85/miner/payload_building.go#L57

Steps to reproduce

Example op-geth vs reth PayloadId

    #[test]
    fn test_payload_id_parity_op_geth() {
        // INFO rollup_boost::server:received fork_choice_updated_v3 from builder and l2_client payload_id_builder="0x6ef26ca02318dcf9" payload_id_l2="0x03d2dae446d2a86a"
        let expected = PayloadId::new(FixedBytes::<8>::from_str("0x03d2dae446d2a86a").unwrap().into());
        let attrs = OptimismPayloadAttributes {
            payload_attributes: PayloadAttributes {
                timestamp: 1728933301,
                prev_randao: b256!("9158595abbdab2c90635087619aa7042bbebe47642dfab3c9bfb934f6b082765").into(),
                suggested_fee_recipient: address!("4200000000000000000000000000000000000011"),
                withdrawals: Some([].into()),
                parent_beacon_block_root: b256!("8fe0193b9bf83cb7e5a08538e494fecc23046aab9a497af3704f4afdae3250ff").into()
            },
            transactions: Some([bytes!("7ef8f8a0dc19cfa777d90980e4875d0a548a881baaa3f83f14d1bc0d3038bc329350e54194deaddeaddeaddeaddeaddeaddeaddeaddead00019442000000000000000000000000000000000000158080830f424080b8a4440a5e20000f424000000000000000000000000300000000670d6d890000000000000125000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000014bf9181db6e381d4384bbf69c48b0ee0eed23c6ca26143c6d2544f9d39997a590000000000000000000000007f83d659683caf2767fd3c720981d51f5bc365bc")].into()),
            no_tx_pool: None,
            gas_limit: Some(30000000)
        };
        
        // Reth's `PayloadId` should match op-geth's `PayloadId`. This fails
        assert_eq!(
            expected,
            payload_id_optimism(
                &b256!("3533bf30edaf9505d0810bf475cbe4e5f4b9889904b9845e83efdeab4e92eb1e"),
                &attrs
            ) // := "0x6ef26ca02318dcf9"
        );
    }

Node logs

No response

Platform(s)

Linux (x86)

What version/commit are you on?

reth-optimism-cli Version: 1.0.7-dev
Commit SHA: b2848f2fc84595fa62c3831a9bb80c7708e6b627

What database version are you on?

NA

Which chain / network are you on?

Devnet

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@0xOsiris 0xOsiris added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Oct 14, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled
Projects
Archived in project
Development

No branches or pull requests

1 participant