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

Add eth_SimulateV1 tests #28

Closed
wants to merge 1 commit into from

Conversation

KillariDev
Copy link

add tests for eth_SimulateV1 RPC Method

@fjl
Copy link
Collaborator

fjl commented Jan 16, 2024

It's a bad time to add this because we are currently rewriting how the test chain handling works in rpctestgen. I appreciate the contribution, but please wait a couple days until we have #27 in, and then we can add these tests.

@fjl
Copy link
Collaborator

fjl commented Jan 16, 2024

The test contracts you added here look very useful, and we should put them into the hivechain tool that creates the new test chain. From what I can see, you need contracts that perform a specific behavior when called. We have some existing ones like that in hivechain, they are deployed into the chain like this: https://github.com/ethereum/hive/blob/master/cmd/hivechain/mod_deploy.go

The existing contracts you could reuse in the tests later are

  • callenv which mirrors the call environment
  • callrevert which reverts in a Solidity-like way

Let me know if you have further questions about adding contracts in hivechain. I will review the PR if you open one.

@KillariDev
Copy link
Author

The test contracts you added here look very useful, and we should put them into the hivechain tool that creates the new test chain. From what I can see, you need contracts that perform a specific behavior when called. We have some existing ones like that in hivechain, they are deployed into the chain like this: https://github.com/ethereum/hive/blob/master/cmd/hivechain/mod_deploy.go

The existing contracts you could reuse in the tests later are

  • callenv which mirrors the call environment
  • callrevert which reverts in a Solidity-like way

Let me know if you have further questions about adding contracts in hivechain. I will review the PR if you open one.

These contracts are contracts that are deployed using the eth_simulateV1, and they are not supposed to be part of the chain. I am not sure what is the right location for these thought. I just need to have access to the bytecode string in the tests to be able to deploy them in the methods.

@fjl
Copy link
Collaborator

fjl commented Feb 1, 2024

Ahh, right. So in this case, the contracts could remain here in this repo.

@fjl
Copy link
Collaborator

fjl commented Feb 1, 2024

PR probably still needs a rebase.

@KillariDev
Copy link
Author

PR probably still needs a rebase.

yeah, I have fixes to this in another repo. I am waiting for nethermind's eth_simulate client to fix couple of bugs before I make Pr here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants