-
Notifications
You must be signed in to change notification settings - Fork 519
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
Fix genesis block sync #917
Conversation
…r into fix/sync-genesis-block
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.
Sorry for the delay, but I think this is not really right. As I recall there were indeed some changes to current_block
in version 2.
Please add an extra branch:
- If API version is equal or smaller than 2, call
current_block_before_version_2
. - Otherwise, call
current_block
.
@sorpaas I see, I didn't know the background about changes to |
@sorpaas Judging from |
Hmm looks like Github bugged out and it refused to run CI for the last commit. I also couldn't find any button to retry the deployment. Would you mind to push a new empty commit? |
Sure, pushed now! and it seems CI got triggered properly this time |
* fix mapping-sync sync_genesis_block * fix lint * use legacy current_block before api version v2 * empty commit
This PR fixes genesis block not accessible issue (#78) which blockchains started even before
EthereumRuntimeRPCApi
runtime API version4
(current version) still have.Because some blockchains have runtime API version lower than
4
at genesis block,has_api
conditional becomesfalse
for those blockchains. (fn has_api
returnsfalse
if version mismatch). That means, ethereum genesis block cannot be properly mapped. (For example, our chains have runtime API version1
at genesis block). Regardless of the runtime version blockchains have at genesis block, it should be properly synced.