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

feat: move state commitments to apply stage #802

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 37 // Patch version component of the current release
VersionPatch = 38 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down
6 changes: 6 additions & 0 deletions rollup/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@ func (p *Pipeline) traceAndApplyStage(txsIn <-chan *types.Transaction) (<-chan e
p.nextL1MsgIndex = tx.AsL1MessageTx().QueueIndex + 1
}

// We are calculating state roots here per txn (which is more expensive) because metrics show
// that CCC stage is slower, so apply stage stalls for a considerable amount of time. Instead of
// stalling, we can spend that time calculating state roots. This can be removed when CCC is optimized
// to not be the bottleneck anymore.
p.state.IntermediateRoot(p.chain.Config().IsEIP158(p.Header.Number))
Thegaram marked this conversation as resolved.
Show resolved Hide resolved

stallStart := time.Now()
select {
case newCandidateCh <- &BlockCandidate{
Expand Down
Loading