-
Notifications
You must be signed in to change notification settings - Fork 217
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
Light mode: hardcode epoch/era conversion for the Testnet #3222
Conversation
d5aa0e4
to
72ee3a1
Compare
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.
Looks good to me! 😊
One of the unit tests fails. Looks like an issue with test, not the code:
c8b8550
to
f9acdb5
Compare
f9acdb5
to
46f3d24
Compare
AnyCardanoEra ByronEra -> 0 | ||
Testnet magic -> | ||
error $ "Epoch/Era conversion isn't provided for the Testnet " | ||
<> show magic <> " in light mode." |
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.
Since with Blockfrost provider we are supporting only mainnet and public testnet (i.e. the one with protocolMagic -> 1097911063) then perhaps we shouldn't be able to start wallet against any different testnet alltogether. E.g.:
If we start wallet with:
cardano-wallet serve \
--light \
--blockfrost-token-file blockfrost.api.key \
--testnet testnet-byron-genesis.json
and testnet-byron-genesis.json
contains protocolMagic different than 1097911063
the wallet should just stop with the appropriate message.
Maybe it's not in scope of this pr though
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.
Or maybe starting against public testnet could be simple as:
cardano-wallet serve \
--light \
--blockfrost-token-file blockfrost.api.key \
--testnet
i.e. without the byron-genesis.json, assuming it is needed only for getting the protocolMagic from.
bors r+ |
Build succeeded: |
Issue Number
ADP-1422, ADP-1504
Overview
Light-mode (Epic ADP-1422) aims to make synchronisation to the blockchain faster by trusting an off-chain source of aggregated blockchain data.
In this pull request, we implement a function
currentNodeEra
that that determines current Era by the current epoch retrieved from the Testnet Blockfrost API.