namada
namada copied to clipboard
(draft) Configure the Ethereum oracle using values from storage
This draft PR contains WIP code for making it so that the Ethereum oracle is configured from values in blockchain storage, rather than using a default hardcoded config.
PRs to be split out
- [ ] Make the Ethereum oracle a truly
Option
al component for validators (i.e. acceptNone
) - [ ]
EthereumBridgeConfig::read
method - [ ] actually configure the oracle (+ e2e test)
The motivation for this PR is to implement the minimal functionality such that we can easily start running the ledger with a real Ethereum bridge deployment. Limitations of this initial implementation:
- initial configuration of the oracle is unnecessarily tied to the ABCI Commit phase - at ledger start up, if Ethereum bridge configuration values are already in local block storage and we are synced up to the latest block, we don't strictly need to wait for another block to be committed. Initial oracle configuration could be done separately out of band from ABCI but this could be a later optimization.
- only initial configuration is sent - if values change in block storage while the ledger is running, the oracle won't be updated (just yet) - this should be covered by a separate issue/PR
- the Shell currently does not know for sure whether the Ethereum oracle successfully started running or not, we could fix this by passing a
oneshot::Sender<_>
to the Ethereum oracle inside the command we use to start it, so that it can tell us it successfully started running