-
Notifications
You must be signed in to change notification settings - Fork 76
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
testeth via RPC requirements #5
Comments
If I understand this Issue correctly, we have a version of this in py-evm. The tests are currently running in Travis, against the
There are still many more validations we'd like to run, as we continue implementing the json-rpc methods in py-evm. Maybe we'll discover a need for new setup/testing methods. So far, I've been pleasantly surprised that those two setup calls have been sufficient. An example of the running tests can be found in Travis: all of the jobs with the word Testing other nodesThese py-evm tests do not require any direct node access, everything is done over rpc. So the existing python tests could be run against any compliant node that implements CollaborationI'm happy to help design, implement and test the rpc testing standard, as it evolves. If you like, I can help extract the python RPC tests from py-evm to another repo (like this one, if that makes sense). ExamplesBelow are examples of what these two methods take as arguments. (From the
|
I am currently investigate what methods do I need in order to run a state test via rpc. |
Paging @dwightguth, could we take advantage of this given our recent introduction of RPC with KEVM? If so, do you have input about how these methods should be? |
@ehildenb in order to take advantage of this, we would need an ethereum client that implemented these methods and used kevm as its vm implementation. It's possible down the road but I don't think it's something we will be doing in the near future. |
Just linking to this discussion of an expanded set of APIs: ethereum/interfaces#4 (comment) |
The I'd favor a simpler primitive that would also be useable on the mainnet: |
Are those debug method described and accepted for implementation already? |
@winsvega A few questions:
|
GeneralStateTests are basically block importing/mining yes. debug methods would be needed. |
what do you think about this idea?
|
!!! THIS PAGE IS OUTDATED !!!
NEW LINK: https://github.com/ethereum/retesteth/wiki/RPC-Methods
The idea is to just ask a client to init a chain with the given genesis config and then calculate a transaction and tell the result state. So we need to come up with the following test rpc methods:
Support of commandline options
--ipcpath /home/user/
(geth.ipc added by the client)--db-path /home/user/tempdir
(datadir)--test
(tells the client to work in test mode)Discussion: Support of commandline options for ethereum clients #16
Implemented in: CPP
void test_setChainParams(string _config)
init genesis block and chain configuration
Discussion: void test_setChainParams(string _config) #4 <----- More specs here
Implemented in: CPP
string eth_sendRawTransaction(string _transactionRlpWithSig)
accept a transaction for this test configuration (could be called multiple times)
Discussion: string eth_sendRawTransaction(string _trRLPWithSig) #6 <----- More specs here
Implemented in: CPP
void test_mineBlocks(int _number)
mine a block (mine a block with the accepted transactions.) mining could be without PoW enabled. Function should return only after block has been imported or errorer. The status of a block should be returned.
Discussion: void test_mineBlocks(int _number) #8 <----- More specs here
Implemented in: CPP
string test_getLogHash(string _txHash)
get pre-calculated log has of the _txHash. hash of emptyRLPList if transaction not found.
Discussion: string test_getLogHash(string _txHash) #7 <----- More specs here
Implemented in: CPP
void test_rewindToBlock(int number)
set chain state as of blocknumber 'number'
Discussion: void test_rewindToBlock(int number) #9 <----- More specs here
Implemented in: CPP
void test_modifyTimestamp(int _timestamp)
set the timestamp for the current block
Discussion: void test_modifyTimestamp(int _timestamp) #10 <----- More specs here
Implemented in: CPP
Export a block (rlp) by its number or hash.
string web3_clientVersion()
get client version and build information to put it into the filled test
Discussion: string web3_clientVersion() #13 <----- More specs here
Implemented in: CPP, GETH, PYTHON..
Json::Array debug_accountRangeAt(string _blockHashOrNumber, int _txIndex, string _address, int _maxResults)
get the list of accounts in the given block after given transaction index with provided account mask.
Discussion: Json::Array debug_accountRangeAt(string _blockHashOrNumber, int _txIndex, string _address, int _maxResults) #18 <----- More specs here
Implemented in: CPP
void test_importRawBlock(std::string const& _blockRLP)
Attempt to import a block from rlp data. RLP data might be corrupted intentionally. Function should return only after block has been imported or errorer. The status of a block should be returned.
if PoW is disabled in the chain config, a block without PoW should be accepted. Discussion: void test_importRawBlock(std::string const& _blockRLP) #19
The methods formats are to be decided. Perhaps new methods would be added. Lets come up with a tes RPC protocol here.
The text was updated successfully, but these errors were encountered: