ethereum / retesteth

testeth via RPC. Test run, generation by t8ntool protocol
http://retesteth.ethdevops.io/
GNU General Public License v3.0
114 stars 75 forks source link

Add the private key to the txs.json file in t8ntool #127

Closed qbzzt closed 3 years ago

qbzzt commented 3 years ago

To be able to use t8ntool with openethereum (https://github.com/ethereum/tests/issues/816), I need to take the inputs provided to me (alloc.json, txs.json, and env.json) and build out of them a test file. I have a way to fake the the post field of the test file. However, I cannot use the v, r, and s that appear in the txs.json file to reconstruct transaction.secretKey.

Can you please add that value to the txs.json file? I already ran geth's evm with this field added, and it ignored it and produced exactly the same result. If you want to verify, run this:

evm t8n --input.alloc alloc.json --input.txs txs.json --input.env env.json --state.fork YOLOv3 --output.alloc newalloc.json

alloc.json:

{
    "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
        "balance" : "0x0de0b6b3a7640000",
        "code" : "0x600160010160005500",
        "nonce" : "0x00",
        "storage" : {
        }
    },
    "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
        "balance" : "0x0de0b6b3a7640000",
        "code" : "0x",
        "nonce" : "0x00",
        "storage" : {
        }
    }
}

txs.json:

[
    {
        "input" : "0x",
        "gas" : "0x61a80",
        "gasPrice" : "0x1",
        "nonce" : "0x0",
        "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
        "value" : "0x186a0",
        "v" : "0x1c",
        "r" : "0xe94818d1f3b0c69eb37720145a5ead7fbf6f8d80139dd53953b4a782301050a3",
        "s" : "0x1fcf46908c01576715411be0857e30027d6be3250a3653f049b3ff8d74d2540c",
        "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
    }
]

env.json:

{
    "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
    "currentDifficulty" : "0x020000",
    "currentGasLimit" : "0xff112233445566",
    "currentNumber" : "0x01",
    "currentTimestamp" : "0x03e8",
    "previousHash" : "0x9ea898ec26dd2ea9e0895dc06d4225fdb328c954b8f853448dfcc720daa86679",
    "blockHashes" : {
        "0" : "0x9ea898ec26dd2ea9e0895dc06d4225fdb328c954b8f853448dfcc720daa86679"
    }
}