Skip to content
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

Connector RPC Introspection Checks #197

Open
3 tasks
Lohann opened this issue Oct 12, 2023 · 0 comments
Open
3 tasks

Connector RPC Introspection Checks #197

Lohann opened this issue Oct 12, 2023 · 0 comments
Assignees
Labels
connector Connector parent epic enhancement New feature or request question Further information is requested

Comments

@Lohann
Copy link
Collaborator

Lohann commented Oct 12, 2023

Feature description
The chain's connectors must validate if it is connected to the right chain, this can be done by verifying the genesis block and forked blocks, example:

Genesis Block Validation

In the BlockchainConfig include a new optional parameter genesis_block which is the hash of genesis block:

  • The client when connects to the RPC node, must retrieve the genesis block and verify if it matches the configured one
  • Local testnets doesn't need to do this verification

Checkpoint Block validation

For forked chains, such as Ethereum Classic or Bitcoin Cash verifying the genesis block is not sufficient, so for all connectors we need to store in the latest finalized block number and hash, and verify that.

  • Save a block number and hash of the latest known finalized block from of each chain in the BlockchainConfig.
  • When the client connects to the RPC node, it must
  • except for testnets.

Steps to reproduce
1 - Starts the ethereum connector using goerli network
2 - Connects to ethereum mainnet.
3 - The connectors works fine.

Expected output
The connector should return an meaniful error when the config and the RPC network doesn't match.

  • All livenet connectors (ethereum mainnet, polkadot mainnet, etc) validates the genesis block
  • All livenet connectors validates the checkpoint block
  • unit tests for all the cases above
@Lohann Lohann added the connector Connector parent epic label Oct 12, 2023
@Lohann Lohann added this to the Milestone Q4 2023 milestone Oct 12, 2023
@isabellelaususan isabellelaususan added the enhancement New feature or request label Oct 13, 2023
@isabellelaususan isabellelaususan added the question Further information is requested label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connector Connector parent epic enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants