Skip to content

[bun] processFinalizedCheckpoint performance issue #8526

@twoeths

Description

@twoeths

Describe the bug

it takes up to 40s to process finalized checkpoints

2084999:Oct-13 10:21:12.021[chain]         verbose: Start processing finalized checkpoint epoch=47231, rootHex=0x8a726696e9b5376dfdcc840fda61b61ac183f5f4ae39e0a1e0cea1f5563c2b6e
2085699:Oct-13 10:21:56.670[chain]         verbose: Finish processing finalized checkpoint epoch=47231, rootHex=0x8a726696e9b5376dfdcc840fda61b61ac183f5f4ae39e0a1e0cea1f5563c2b6e, prunedBlocks=29
2097567:Oct-13 10:27:36.037[chain]         verbose: Start processing finalized checkpoint epoch=47232, rootHex=0xe85dd90f32450a2359d3c46b0c008b17905261af8ff340e0b9c37fd9a7620ba2
2097579:Oct-13 10:28:02.774[chain]         verbose: Finish processing finalized checkpoint epoch=47232, rootHex=0xe85dd90f32450a2359d3c46b0c008b17905261af8ff340e0b9c37fd9a7620ba2, prunedBlocks=31
2115717:Oct-13 10:34:00.111[chain]         verbose: Start processing finalized checkpoint epoch=47233, rootHex=0xd960c80f0adad750321afdf3f849458ed66aa43a4de8622ab146cdfb80c005c7
2115784:Oct-13 10:34:27.597[chain]         verbose: Finish processing finalized checkpoint epoch=47233, rootHex=0xd960c80f0adad750321afdf3f849458ed66aa43a4de8622ab146cdfb80c005c7, prunedBlocks=30
2134326:Oct-13 10:40:24.039[chain]         verbose: Start processing finalized checkpoint epoch=47234, rootHex=0x2b063a21f50a29c0f5da082340628fe76c83b571321844b8dcd9c89a7069492f
2134585:Oct-13 10:40:51.423[chain]         verbose: Finish processing finalized checkpoint epoch=47234, rootHex=0x2b063a21f50a29c0f5da082340628fe76c83b571321844b8dcd9c89a7069492f, prunedBlocks=31
2150028:Oct-13 10:46:48.018[chain]         verbose: Start processing finalized checkpoint epoch=47235, rootHex=0xb7d87abe3b2df4199ea95ee3f956b84c857bc51f5358e98bee3c3bf5483e36be
2150044:Oct-13 10:47:16.420[chain]         verbose: Finish processing finalized checkpoint epoch=47235, rootHex=0xb7d87abe3b2df4199ea95ee3f956b84c857bc51f5358e98bee3c3bf5483e36be, prunedBlocks=28
2183293:Oct-13 10:59:36.021[chain]         verbose: Start processing finalized checkpoint epoch=47237, rootHex=0xf7795011e4b419ae4c0d445f79a7a0f1ddd8ed8f0a86bcbeb63340864aeb6666
2183312:Oct-13 11:00:06.860[chain]         verbose: Finish processing finalized checkpoint epoch=47237, rootHex=0xf7795011e4b419ae4c0d445f79a7a0f1ddd8ed8f0a86bcbeb63340864aeb6666, prunedBlocks=30

this causes hiccup processing gossip messages

Image

Expected behavior

it should take the same time to NodeJS, which is <3s consistently

Steps to reproduce

No response

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

unstable

Metadata

Metadata

Assignees

No one assigned

    Labels

    meta-bugIssues that identify a bug and require a fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions