Skip to content

Fulu#1592

Merged
claravanstaden merged 18 commits into
mainfrom
clara/fulu
Oct 11, 2025
Merged

Fulu#1592
claravanstaden merged 18 commits into
mainfrom
clara/fulu

Conversation

@claravanstaden
Copy link
Copy Markdown
Contributor

@claravanstaden claravanstaden commented Oct 2, 2025

Adds support for Fulu hardfork.

Tested switchover from Electra to Fulu.

Requires: paritytech/polkadot-sdk#9938
Resolves: SNO-1597

@claravanstaden claravanstaden marked this pull request as ready for review October 7, 2025 07:33
Comment on lines +78 to +79
# slot time lower than 12s doesn't work after Fulu
set_slot_time 12
Copy link
Copy Markdown
Contributor

@yrong yrong Oct 9, 2025

Choose a reason for hiding this comment

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

I haven't fully checked yet, but assume this might be related to ChainSafe/lodestar#8476, replace SECONDS_PER_SLOT with SLOT_DURATION_MS.

Copy link
Copy Markdown
Contributor Author

@claravanstaden claravanstaden Oct 10, 2025

Choose a reason for hiding this comment

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

I changed the setting SLOT_DURATION_MS, which works, but the Beefy client has errors then:

"@timestamp":"2025-10-10T11:42:19.334745+02:00","Bitfield":["0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001110"],"Commitment":{"blockNumber":21,"payload":[{"data":"0xecdc14d6d981f71894ab664b202713a0377c36a4d456811731616f26afc871aa","payloadID":"mh"}],"validatorSetID":1},"CommitmentHash":"0x1510074c9fdfad770ced4f72bf5e0942e272d4c71afe98212e8cbfaaa1eaef30","Proof":{"Account":"0x054426FC7Aab50156c0DfcDcd607e7045CC58d9e","Index":2,"Proof":["0xdf15b1a429a56921aa5928fbc05c5550123be0fd59d3dda6bb0b2122227de7ce","0xf891dd7d5531cdd996dc0134942dd9e99747131dcafb503d8d8e2e54e60aa829"],"R":"0x3fa064971e28ab6dcff64c430eec7dc8d4b7fb1fcc0be9488409af9465baf3cf","S":"0x6a995021152063986d13a3c6a659d2cc56daeb7766862ffab1453cdc412cf9f0","V":27},"level":"info","message":"Transaction submitted for initial verification","txHash":"0xece354dfb5d3e6f3ea7d42244e8c66e633431300f8e4ec07ca9e42b517010bed"}
{"@timestamp":"2025-10-10T11:42:31.335754+02:00","level":"debug","message":"Transaction submitInitial succeeded","receipt":196,"tx":"0xece354dfb5d3e6f3ea7d42244e8c66e633431300f8e4ec07ca9e42b517010bed"}
{"@timestamp":"2025-10-10T11:42:31.336475+02:00","level":"debug","message":"Waiting RandaoCommitDelay by 4 blocks"}
{"@timestamp":"2025-10-10T11:42:55.350758+02:00","Data":"a77cf3d21510074c9fdfad770ced4f72bf5e0942e272d4c71afe98212e8cbfaaa1eaef30","From":"0x87d987206180b8f3807dd90455606eea85cdb87a","Gas":5000000,"GasPrice":1000014,"To":"0x83428c7db9815f482a39a1715684dcf755021997","Value":0,"level":"info","message":"Call info"}
{"@timestamp":"2025-10-10T11:42:55.352103+02:00","code":"0x40d35447","error":"execution reverted","level":"error","message":"Failed to send transaction","txHash":"0x81311ee9544a6256d3663af83134da042e7499fa0cc99316348b6df07a9a7c63"}
{"@timestamp":"2025-10-10T11:42:55.352335+02:00","error":"execution reverted","level":"error","message":"Failed to CommitPrevRandao"}
{"@timestamp":"2025-10-10T11:42:55.352462+02:00","error":"submit request: execution reverted","level":"fatal","message":"Unhandled error"}

Perhaps the commit prev rando setting should be changed as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in eea19fd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This might have already been resolved by #1594, where I increased/relaxed the ETH_RANDAO_DELAY and RANDAO_COMMIT_EXP parameters.

assert.Equal(t, uint64(46), header.BeaconSlot)
}

func getForkVersions() config.ForkVersions {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: Golang guidelines suggest that this should be named forkVersions() instead. The suggestion is to drop the get prefix for getters

Comment thread relayer/relays/beacon/protocol/protocol.go Outdated
Copy link
Copy Markdown
Contributor

@yrong yrong left a comment

Choose a reason for hiding this comment

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

+1

func (p *Protocol) ForkVersion(slot uint64) ForkVersion {
epoch := p.ComputeEpochAtSlot(slot)
fv := Deneb
if epoch >= p.Settings.ForkVersions.Fulu {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The order of this if condition need to be reversed as otherwise between fulu and electra, it will always select electra.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed in 3f5b1d9.

claravanstaden and others added 6 commits October 11, 2025 08:35
Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>
# Conflicts:
#	web/packages/test/scripts/set-env.sh
@claravanstaden claravanstaden merged commit f2b8dfb into main Oct 11, 2025
2 checks passed
@claravanstaden claravanstaden deleted the clara/fulu branch October 11, 2025 12:18
claravanstaden added a commit that referenced this pull request Oct 11, 2025
* fulu progress

* add fulu fork versions

* fix tests

* upgrade

* add fulu timestamp

* test without speed up

* set slot time

* fulu changes

* unnecessary logs

* update version

* update slot times

* optionally set randao config

* fix fork version check

* Update relayer/relays/beacon/protocol/protocol.go

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>

* pr nit

* adds tests

---------

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>
claravanstaden added a commit that referenced this pull request Oct 11, 2025
* Fulu (#1592)

* fulu progress

* add fulu fork versions

* fix tests

* upgrade

* add fulu timestamp

* test without speed up

* set slot time

* fulu changes

* unnecessary logs

* update version

* update slot times

* optionally set randao config

* fix fork version check

* Update relayer/relays/beacon/protocol/protocol.go

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>

* pr nit

* adds tests

---------

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>

* merge damage

* fixes

* fixes

---------

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>
stiiifff pushed a commit to datahaven-xyz/snowbridge that referenced this pull request Nov 25, 2025
* fulu progress

* add fulu fork versions

* fix tests

* upgrade

* add fulu timestamp

* test without speed up

* set slot time

* fulu changes

* unnecessary logs

* update version

* update slot times

* optionally set randao config

* fix fork version check

* Update relayer/relays/beacon/protocol/protocol.go

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>

* pr nit

* adds tests

---------

Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com>
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.

4 participants