-
Notifications
You must be signed in to change notification settings - Fork 7
feat: exposed era in chainsync input #373
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
Conversation
jkawan
commented
Mar 1, 2025
- Exposed/Added era in chainsync input while updating status
- Added unit test to test if era is added during status update
Signed-off-by: Jenita <[email protected]>
Signed-off-by: Jenita <[email protected]>
There was a problem hiding this 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.
input/chainsync/chainsync.go
Outdated
default: | ||
return "Conway" // future era | ||
} | ||
} |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 <[email protected]>
There was a problem hiding this 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
Signed-off-by: Jenita <[email protected]>
Signed-off-by: Jenita <[email protected]>