Skip to content

Skip serializing blob_schedule before Fulu #7779

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

Merged
merged 4 commits into from
Jul 24, 2025

Conversation

michaelsproul
Copy link
Member

Issue Addressed

Alternative to:

Proposed Changes

Serve the blob_schedule field on /eth/v1/config/spec only when Fulu is enabled. If the blob schedule is empty, we will still serve it as [], so long as Fulu is enabled.

Additional Info

This touches the same code as:

But this PR is higher prio for Fusaka testing.

@michaelsproul michaelsproul added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! HTTP-API das Data Availability Sampling fusaka-devnet-3 labels Jul 23, 2025
@michaelsproul michaelsproul added the fulu Required for the upcoming Fulu hard fork label Jul 23, 2025
Copy link

mergify bot commented Jul 23, 2025

Some required checks have failed. Could you please take a look @michaelsproul? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jul 23, 2025
Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

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

LGTM, fixed the test and merged unstable

@pawanjay176
Copy link
Member

Actually this is quite annoying to deal with in the tests because a roundtrip ser/de isn't consistent. i.e. this test would fail

#[test]
    fn chain_spec_roundtrip() {
        let yamlconfig =
            ConfigAndPreset::from_chain_spec::<MainnetEthSpec>(&ChainSpec::mainnet(), None);

        let serialized = serde_yaml::to_string(&yamlconfig).unwrap();
        let deserialized: ConfigAndPreset = serde_yaml::from_str(&serialized).unwrap();
        assert_eq!(yamlconfig.config().blob_schedule, deserialized.config().blob_schedule);
    }

Not sure of a clean way to handle this other than setting fulu_fork_epoch all places where we do this kind of roundtrip.

@michaelsproul
Copy link
Member Author

Why doesn't it round trip? Is it because of the serialisation field? Maybe we should ignore that in the PartialEq impl of BlobSchedule

@jimmygchen
Copy link
Member

Why doesn't it round trip? Is it because of the serialisation field? Maybe we should ignore that in the PartialEq impl of BlobSchedule

Yeah that's right
When we deserialise (result below), the skip_serializing value is set to false (default),
but when we create it from ChainSpec (expected), the skip_serializing value is set to true because Fulu is unset.

let result = self
.client
.get_lighthouse_spec::<ConfigAndPresetFulu>()
.await
.map(|res| ConfigAndPreset::Fulu(res.data))
.unwrap();
let expected = ConfigAndPreset::from_chain_spec::<E>(&E::default_spec(), None);
assert_eq!(result, expected);

Yeah i think ignoring that field in PartialEq sounds good. Will push a commit now.

@mergify mergify bot added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jul 24, 2025
Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

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

Ohh ignoring it in the partialeq impl is very clean, nice!

@pawanjay176 pawanjay176 added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jul 24, 2025
@mergify mergify bot merged commit b904956 into sigp:unstable Jul 24, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling fulu Required for the upcoming Fulu hard fork fusaka-devnet-3 HTTP-API low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants