Skip to content

Cleanup the eth blocks relayer #941

@karim-en

Description

@karim-en
  1. We don't need to interact with the DAO anymore, since BLS sig verification is already done on-chain. So this can be deprecated: https://github.com/Near-One/rainbow-bridge/blob/master/eth2near/contract_wrapper/src/dao_contract.rs
  2. We have off-chain validators where we submit proposals to the DAO, and then the validators vote on these proposals, and validate the update - all the voting commands should be deprecated after migrating to BLS signature verification #939
  3. ETH Client Contract - Probably need to keep this
  4. File ETH Client Contract - this is used for tests, but it's fairly complicated logic and difficult to maintain. We already need to maintain the light client integration tests, so we can probably remove this and move to the end to end tests instead. Better to cover the relayer flow in E2E tests instead.
  5. Sandbox Contract Wrapper - this can be removed
  6. eth2-contract-init - We don't know why it's a separate crate, this can be moved to eth2near-block-relay-rs. There's no external usage for that. It could probably be used by the CLI to init the contract (via the CLI)
  7. eth2near-block-relay-rs doesn't have a lot of code, so we might not need to worry about this too much

How to Test

Run it on testnet (not official testnet) - separate testnet, manually deploy the light client, we already have code to init it, so get the wasm, deploy the binary, init the contract with eth2-contract-init, move it to the relayer, so the relayer should be smart enough to figure out that the contract wasn't initialized and you need to initialize, so just pass an arg to the relayer to initiate the contract. The integration tests don't guarantee that everything works correctly.

Goals

  • Make it easier to comprehend and test
  • When moving to the new repo, we can't move all this old junk code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions