Skip to content

Refactor header exchange to accommodate block exchange service#1028

Merged
gupadhyaya merged 5 commits into
mainfrom
manav/rollkit_header_exchange_changes
Jun 27, 2023
Merged

Refactor header exchange to accommodate block exchange service#1028
gupadhyaya merged 5 commits into
mainfrom
manav/rollkit_header_exchange_changes

Conversation

@Manav-Aggarwal

@Manav-Aggarwal Manav-Aggarwal commented Jun 23, 2023

Copy link
Copy Markdown
Member

Overview

Closes: #1029

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@Manav-Aggarwal Manav-Aggarwal changed the title Refactor header exchange Refactor header exchange to accommodate block exchange service Jun 23, 2023
@codecov

codecov Bot commented Jun 23, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 30.61% and project coverage change: -0.54 ⚠️

Comparison is base (9564421) 54.91% compared to head (fcd09d9) 54.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1028      +/-   ##
==========================================
- Coverage   54.91%   54.38%   -0.54%     
==========================================
  Files          63       63              
  Lines        6628     6643      +15     
==========================================
- Hits         3640     3613      -27     
- Misses       2611     2642      +31     
- Partials      377      388      +11     
Impacted Files Coverage Δ
node/full.go 65.40% <16.66%> (-3.57%) ⬇️
node/header_exchange.go 46.42% <32.55%> (-6.65%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gupadhyaya

Copy link
Copy Markdown
Contributor

When the aggregator publishes the genesis block, it initializes its header store using the genesis header and tries to start the syncer: https://github.com/rollkit/rollkit/blob/main/node/header_exchange.go#L99
The syncer as part of Start process, tries to check if the genesis header found in the header store is recent (https://github.com/celestiaorg/go-header/blob/main/sync/sync_head.go#L24). This check requires that the genesis header time is not older than 1.5x blocktime.
If the blocktime is too short, the time between the genesis header creation and the isRecent check exceeds the 1.5x blocktime which leads to the genesis header obtained from the header store as not recent. Hence the error, header: not found.

@Manav-Aggarwal Manav-Aggarwal marked this pull request as ready for review June 26, 2023 17:11
Comment thread node/full_node_integration_test.go Outdated
MSevey
MSevey previously approved these changes Jun 26, 2023
gupadhyaya
gupadhyaya previously approved these changes Jun 26, 2023
@gupadhyaya gupadhyaya enabled auto-merge June 26, 2023 20:51
@gupadhyaya gupadhyaya added this pull request to the merge queue Jun 26, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2023
@gupadhyaya gupadhyaya added this pull request to the merge queue Jun 26, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2023
@gupadhyaya gupadhyaya dismissed stale reviews from MSevey and themself via 083f701 June 26, 2023 21:16
@gupadhyaya gupadhyaya enabled auto-merge June 26, 2023 21:21
@gupadhyaya gupadhyaya requested review from MSevey and gupadhyaya June 26, 2023 21:21
gupadhyaya
gupadhyaya previously approved these changes Jun 26, 2023
@gupadhyaya

Copy link
Copy Markdown
Contributor

@Manav-Aggarwal i think your merge commit has overwritten my changes.

@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/rollkit_header_exchange_changes branch from 0ff5bb2 to 083f701 Compare June 27, 2023 04:17
@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/rollkit_header_exchange_changes branch from 083f701 to fcd09d9 Compare June 27, 2023 04:20
@Manav-Aggarwal

Copy link
Copy Markdown
Member Author

@Manav-Aggarwal i think your merge commit has overwritten my changes.

Just rebased again, looks the same. If it's the go.mod file changes, the go-header version upgrade is updated in main already.

Comment thread node/full_node_integration_test.go
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.

Refactor header exchange service to accommodate block exchange service

4 participants