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

remove l1 block, close resources #2242

Merged
merged 8 commits into from
Jan 13, 2025
Merged

remove l1 block, close resources #2242

merged 8 commits into from
Jan 13, 2025

Conversation

tudor-malene
Copy link
Collaborator

Why this change is needed

  • we were reading the entire L1 block from the L1 node, even though we need just the header
  • we weren't closing resources properly when reconnecting the L1 subscription

What changes were made as part of this PR

  • use types.Header instead of Block in our production code and avoid reading the full blocks
  • close resources when reconnecting
  • change log level for unknown event

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@badgersrus badgersrus self-requested a review January 9, 2025 08:28
Copy link
Contributor

@badgersrus badgersrus left a comment

Choose a reason for hiding this comment

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

LGTM - good spot on the block stream in dataservice

@@ -28,8 +28,8 @@ DENEB_FORK_VERSION: 0x20000093
ELECTRA_FORK_VERSION: 0x20000094

# Time parameters
SECONDS_PER_SLOT: 12
SLOTS_PER_EPOCH: 6
SECONDS_PER_SLOT: 2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this change brings down the geth startup to ~35s ( from 2mins)

@@ -63,5 +61,5 @@ func SetupSysOut() {
if err != nil {
panic(err)
}
testlog = gethlog.New(log.CmpKey, log.TestLogCmp)
testlog = gethlog.New()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was noise

@tudor-malene tudor-malene merged commit daa8eaa into main Jan 13, 2025
2 checks passed
@tudor-malene tudor-malene deleted the tudor/remove_block branch January 13, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants