Skip to content

feat: exposed era in chainsync input#373

Merged
agaffney merged 5 commits intomainfrom
feat/added-era-in-context
Mar 4, 2025
Merged

feat: exposed era in chainsync input#373
agaffney merged 5 commits intomainfrom
feat/added-era-in-context

Conversation

@jkawan
Copy link
Copy Markdown
Contributor

@jkawan jkawan commented Mar 1, 2025

  1. Exposed/Added era in chainsync input while updating status
  2. Added unit test to test if era is added during status update

Jenita added 2 commits March 1, 2025 12:40
Signed-off-by: Jenita <jkawan@blinklabs.io>
Signed-off-by: Jenita <jkawan@blinklabs.io>
@jkawan jkawan requested a review from a team as a code owner March 1, 2025 18:53
Copy link
Copy Markdown
Contributor

@agaffney agaffney left a comment

Choose a reason for hiding this comment

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

Instead of using the slot number to determine the era, we can use the block type. There should be an Era() function on the block object that tells us which era that it's from. This won't work for rollback, but we can leave the era blank like we do for block number.

default:
return "Conway" // future era
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These values are only valid for one particular network (presumably mainnet). We should either make sure they are only consulted for that one network, or that we provide values for additional well-known networks (such as preview and preprod)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have made the changes to use the Era name from block, could you please review.

Signed-off-by: Jenita <kawanjenita@outlook.com>
Copy link
Copy Markdown
Contributor

@agaffney agaffney left a comment

Choose a reason for hiding this comment

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

Assuming that this is for #129, we want to add the era to the event context. It's probably not particularly useful to expose via the "update status" callback. We should probably be able to do everything we need in the NewBlockContext() function

jkawan added 2 commits March 4, 2025 11:39
Signed-off-by: Jenita <kawanjenita@outlook.com>
Signed-off-by: Jenita <kawanjenita@outlook.com>
@agaffney agaffney merged commit 7e1af56 into main Mar 4, 2025
8 checks passed
@agaffney agaffney deleted the feat/added-era-in-context branch March 4, 2025 18:45
@jkawan jkawan linked an issue Mar 4, 2025 that may be closed by this pull request
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.

Expose era and block/tx type in chainsync input

2 participants