Whitepaper - Ethereum Classic With Cover
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />
TEST_SUITE = BlockTests TEST_CASES = blValidBlockTest blInvalidTransactionRLP blTransactionTest blInvalidHeaderTest<br />
userDefinedFile<br />
TEST_SUITE = TransactionTests TEST_CASES = ttTransactionTest ttWrongRLPTransaction tt10mbDataField<br />
userDefinedFile<br />
TEST_SUITE = StateTests TEST_CASES = stExample stSystemOperationsTest stPreCompiledContracts<br />
stLogTests stRecursiveCreate stTransactionTest stInitCodeTest stSpecialTest stRefundTest stBlockHashTest<br />
stQuadraticComplexityTest stSolidityTest stMemoryTest stCreateTest userDefinedFileState<br />
TEST_SUITE = VMTests TEST_CASES = vm_tests vmArithmeticTest vmBitwiseLogicOperationTest<br />
vmSha3Test vmEnvironmentalInfoTest vmBlockInfoTest vmIOandFlowOperationsTest vmPushDupSwapTest<br />
vmLogTest vmSystemOperationsTest vmPerformanceTest vmInputLimitsTest1 vmInputLimitsTest2 vmRandom<br />
userDefinedFile<br />
Blockchain Tests<br />
Found in /BlockTests, the blockchain tests aim is to test the basic verification of a blockchain.<br />
/BlockTests - general blockchain tests. All blocks are built on network: Frontier<br />
/BlockTests/Homestead - homestead blockchain tests. All blocks are built on network: Homestead<br />
/BlockTests/TestNetwork - transition blockchain tests. All blocks before 5th are built on network:<br />
Frontier, then each block should correspond to Homestead rules.<br />
It is based around the notion of executing a list of single blocks, described by the blocks portion of the test. The<br />
first block is the modified genesis block as described by the genesisBlockHeader portion of the test. A set<br />
of pre-existing accounts are detailed in the pre portion and form the world state of the genesis block.<br />
It is generally expected that the test implementer will read genesisBlockHeader and pre and build the<br />
corresponding blockchain in the client. Then the new blocks, described by its RLP found in the rlp object of<br />
the blocks (RLP of a complete block, not the block header only), is read. If the client concludes that the block<br />
is valid, it should execute the block and verify the parameters given in blockHeader (block header of the new<br />
block), transactions (transaction list) and uncleHeaders (list of uncle headers). If the client concludes<br />
that the block is invalid, it should verify that no blockHeader, transactions or uncleHeaders object<br />
is present in the test. The client is expected to iterate through the list of blocks and ignore invalid blocks.<br />
Basic structure<br />
{<br />
"ValidBlocks": {<br />
"genesisBlockHeader": { ... },<br />
"pre": { ... },<br />
"blocks" : [<br />
{<br />
"chainname" : "A",<br />
"blocknumber" : "1",<br />
"rlp": { ... },<br />
"blockHeader": { ... },<br />
"transactions": { ... },<br />
"uncleHeaders": { ... }<br />
},<br />
{<br />
"chainname" : "A",<br />
"blocknumber" : "2",<br />
"rlp": { ... },<br />
"blockHeader": { ... },<br />
"transactions": { ... },<br />
"uncleHeaders": { ... }<br />
}<br />
]<br />
},<br />
1.7. Contracts and Transactions 101