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

[EVM Reader] Check Inputbox contract on Startup #530

Open
fmoura opened this issue Jul 19, 2024 · 3 comments
Open

[EVM Reader] Check Inputbox contract on Startup #530

fmoura opened this issue Jul 19, 2024 · 3 comments
Assignees
Labels
#feat:evm-reader Feature: evm reader
Milestone

Comments

@fmoura
Copy link
Contributor

fmoura commented Jul 19, 2024

📚 Context

EVM Reader reads inputs from a InputBox contract. But it do not verify if the contract is actually deployed or it is at the specified block. It should check and fail if the contract is absent or the informed inputBoxDeplymentBlockNumber is actually different from the actual one

✔️ Solution

Add a check at Evm Reader Service start

@fmoura fmoura added the #feat:evm-reader Feature: evm reader label Jul 19, 2024
@fmoura fmoura self-assigned this Jul 19, 2024
@fmoura
Copy link
Contributor Author

fmoura commented Jul 25, 2024

A complete check is not feasible using current Devnet, as Anvil has a bug related to eth_getCode when Anvil starts with--load-state. I opened a issue on Foundry Github repo

This bug prevents checking a contract on a specific block that is part of the loaded state

@tuler
Copy link
Member

tuler commented Jul 25, 2024

You don't need to specify the block to getCode (even if you can). Only getCode is a "complete" check.

@marcelstanley marcelstanley added this to the TBD milestone Jul 26, 2024
@fmoura
Copy link
Contributor Author

fmoura commented Jul 29, 2024

We actually wants to check two things:

  • If the inputbox contract exists
  • If the informed input box deployment block is correct.

for the latter we need to check the code at the specified block.

@marcelstanley marcelstanley modified the milestones: TBD, 2.0.0 Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#feat:evm-reader Feature: evm reader
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants