From 88666c943aaecd42159dbf7ee57b9d091e30e010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Wed, 5 Jun 2024 16:35:04 +0300 Subject: [PATCH 1/4] move state commitments to apply stage --- rollup/pipeline/pipeline.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rollup/pipeline/pipeline.go b/rollup/pipeline/pipeline.go index 0802e73ff4d4..aeb430285332 100644 --- a/rollup/pipeline/pipeline.go +++ b/rollup/pipeline/pipeline.go @@ -263,6 +263,8 @@ func (p *Pipeline) traceAndApplyStage(txsIn <-chan *types.Transaction) (<-chan e p.nextL1MsgIndex = tx.AsL1MessageTx().QueueIndex + 1 } + p.state.IntermediateRoot(p.chain.Config().IsEIP158(p.Header.Number)) + stallStart := time.Now() select { case newCandidateCh <- &BlockCandidate{ From d7e0f1b191412ae66e15564dfa5bdaac1efc1e1a Mon Sep 17 00:00:00 2001 From: omerfirmak Date: Wed, 5 Jun 2024 13:47:41 +0000 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20auto=20version=20bump=E2=80=89[bot?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- params/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/version.go b/params/version.go index fd71040024a3..522aadf0ea72 100644 --- a/params/version.go +++ b/params/version.go @@ -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 ) From 25b93b83c2b4fb8ed385b824a138a7171a58e586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Thu, 6 Jun 2024 12:23:41 +0300 Subject: [PATCH 3/4] add an explanation --- rollup/pipeline/pipeline.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rollup/pipeline/pipeline.go b/rollup/pipeline/pipeline.go index 96081638bb31..60d3c9e80a16 100644 --- a/rollup/pipeline/pipeline.go +++ b/rollup/pipeline/pipeline.go @@ -266,6 +266,10 @@ 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 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)) stallStart := time.Now() From 4676609e37b222019bb549e5f0949c67dc27258e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Thu, 6 Jun 2024 13:07:58 +0300 Subject: [PATCH 4/4] Update pipeline.go --- rollup/pipeline/pipeline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup/pipeline/pipeline.go b/rollup/pipeline/pipeline.go index 60d3c9e80a16..b2692f015db0 100644 --- a/rollup/pipeline/pipeline.go +++ b/rollup/pipeline/pipeline.go @@ -267,7 +267,7 @@ func (p *Pipeline) traceAndApplyStage(txsIn <-chan *types.Transaction) (<-chan e } // We are calculating state roots here per txn (which is more expensive) because metrics show - // that CCC stage is slower apply stage stalls for a considerable amount of time. Instead of + // 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))