-
Notifications
You must be signed in to change notification settings - Fork 245
fix(block): fix init logic sequencer for da epoch fetching #2926
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
Changes from 1 commit
0e3a836
a05565d
a7bc7b5
e19e8f4
8d1c9f4
be30808
aa2a321
e808357
fa3ab8d
f930626
d418994
9f87902
9a09230
168d73b
a976da9
1f8f963
eadee65
55060e7
c2e2cb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,7 +74,10 @@ func NewSequencer( | |
| fiRetriever: fiRetriever, | ||
| checkpointStore: seqcommon.NewCheckpointStore(db, ds.NewKey("/single/checkpoint")), | ||
| } | ||
| s.SetDAHeight(genesis.DAStartHeight) // will be overridden by the executor | ||
| // will be overridden by the executor or submitter (at genesis) | ||
| // during genesis time, the sequencer will fetch unnecessary heights from DA genesis | ||
| // this is kept on purpose as some DAs (like local-da), do start at genesis. | ||
| s.SetDAHeight(genesis.DAStartHeight) | ||
|
||
|
|
||
| loadCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second) | ||
| defer cancel() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the
TODOcomment highlights,daStartHeightis initialized fromgenesis.DAStartHeightand is never updated. For sequencers, this value should come from the store after it's determined and persisted by thesubmitter. Using a stale or incorrectdaStartHeightwill lead to incorrect epoch calculations inRetrieveForcedIncludedTxs, which can break the forced transaction inclusion mechanism.To fix this,
ForcedInclusionRetrieverneeds a way to get the correct genesis DA height. One approach is to give it access to the store so it can read theGenesisDAHeightKeymetadata value.For example, you could pass a
store.StoretoNewForcedInclusionRetrieverand then inRetrieveForcedIncludedTxsyou could do something like this:This would ensure the correct
daStartHeightis used for epoch calculations once it becomes available.