Skip to content

Commit

Permalink
removed separate genesis, added tx details
Browse files Browse the repository at this point in the history
  • Loading branch information
debjit-bw committed Nov 7, 2024
1 parent f58f538 commit 20b457b
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 453 deletions.
6 changes: 3 additions & 3 deletions scripts/blocks/block_1.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"baseFeePerGas": "0x342770c0",
"blockHash": "0xc0f683b61355455d49af3dbb11fe1f65e9ae8670890d6fb1aadcbf5f8acc960b",
"blockHash": "0x9636978fddf349fc5e92e85b2080d99b5c3e44c745359a77e603e7f1a76f440c",
"blockNumber": "0x1",
"extraData": "0x4e65746865726d696e64",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"gasLimit": "0x989680",
"gasUsed": "0x0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0xa7931c99fd2b7b5e323a2fda8a2dd607cea04f03835c3f29bfe7c057c8b5672e",
"parentHash": "0x574c165efc3205be13affbd3bc165df6a6a023e21d142dd4f4c682d2aa3a054e",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xa59f6ea19d9ee6d7e79bcb286e6d8838b47b48351b37960e24c0a72d41fa1629",
"stateRoot": "0xe65e8c7050e23e1f25c7f56416f899b1ce15ec130ee0460b12529b92b4a8ba81",
"timestamp": "0x6553f101",
"transactions": []
}
6 changes: 3 additions & 3 deletions scripts/blocks/block_2.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"baseFeePerGas": "0x2da282a8",
"blockHash": "0xc314b27368528ec560d035ef9f5dc46e2aea6d21b618eeb37e91723fefdfb2d9",
"blockHash": "0xb413c62db3a7b82636aa984736933c1956d930d085d04a1b184298c76e56c786",
"blockNumber": "0x2",
"extraData": "0x4e65746865726d696e64",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"gasLimit": "0x989680",
"gasUsed": "0x0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0xc0f683b61355455d49af3dbb11fe1f65e9ae8670890d6fb1aadcbf5f8acc960b",
"parentHash": "0x9636978fddf349fc5e92e85b2080d99b5c3e44c745359a77e603e7f1a76f440c",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xa59f6ea19d9ee6d7e79bcb286e6d8838b47b48351b37960e24c0a72d41fa1629",
"stateRoot": "0xe65e8c7050e23e1f25c7f56416f899b1ce15ec130ee0460b12529b92b4a8ba81",
"timestamp": "0x6553f102",
"transactions": []
}
6 changes: 3 additions & 3 deletions scripts/blocks/block_3.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"baseFeePerGas": "0x27ee3253",
"blockHash": "0xd51a4d79676ddad8e938c38ec1344a77feefa369475acb358563f37a74a4d9d6",
"blockHash": "0xe49ebede05072552a7b99bb2e75db0e69d88640ec1dbdcf08cb3f579fd9a504d",
"blockNumber": "0x3",
"extraData": "0x4e65746865726d696e64",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"gasLimit": "0x989680",
"gasUsed": "0x0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0xc314b27368528ec560d035ef9f5dc46e2aea6d21b618eeb37e91723fefdfb2d9",
"parentHash": "0xb413c62db3a7b82636aa984736933c1956d930d085d04a1b184298c76e56c786",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xa59f6ea19d9ee6d7e79bcb286e6d8838b47b48351b37960e24c0a72d41fa1629",
"stateRoot": "0xe65e8c7050e23e1f25c7f56416f899b1ce15ec130ee0460b12529b92b4a8ba81",
"timestamp": "0x6553f103",
"transactions": []
}
6 changes: 3 additions & 3 deletions scripts/blocks/block_4.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"baseFeePerGas": "0x22f06c09",
"blockHash": "0x011405450b1431877c952c73d0ea0c964c67d006b3134aea5be7a59823e40e39",
"blockHash": "0xfc5dc793bc70c93c53fe3c37578b197b07a0173a76d5ac553f590b8da404fa81",
"blockNumber": "0x4",
"extraData": "0x4e65746865726d696e64",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"gasLimit": "0x989680",
"gasUsed": "0x0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0xd51a4d79676ddad8e938c38ec1344a77feefa369475acb358563f37a74a4d9d6",
"parentHash": "0xe49ebede05072552a7b99bb2e75db0e69d88640ec1dbdcf08cb3f579fd9a504d",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xa59f6ea19d9ee6d7e79bcb286e6d8838b47b48351b37960e24c0a72d41fa1629",
"stateRoot": "0xe65e8c7050e23e1f25c7f56416f899b1ce15ec130ee0460b12529b92b4a8ba81",
"timestamp": "0x6553f104",
"transactions": []
}
6 changes: 3 additions & 3 deletions scripts/blocks/block_5.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"baseFeePerGas": "0x1e925e88",
"blockHash": "0x9a86f6d4d524388c300b8a09a145d0406fcf13d343ef8574c46fc0ffad9a45a0",
"blockHash": "0x656513d04face451d8c08cdfcc98f2270193f13a665b1c216c5a9c21fbcdf373",
"blockNumber": "0x5",
"extraData": "0x4e65746865726d696e64",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"gasLimit": "0x989680",
"gasUsed": "0x0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x011405450b1431877c952c73d0ea0c964c67d006b3134aea5be7a59823e40e39",
"parentHash": "0xfc5dc793bc70c93c53fe3c37578b197b07a0173a76d5ac553f590b8da404fa81",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xa59f6ea19d9ee6d7e79bcb286e6d8838b47b48351b37960e24c0a72d41fa1629",
"stateRoot": "0xe65e8c7050e23e1f25c7f56416f899b1ce15ec130ee0460b12529b92b4a8ba81",
"timestamp": "0x6553f105",
"transactions": []
}
5 changes: 5 additions & 0 deletions scripts/chiado_genesis_alloc.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@
"nonce": "0",
"balance": "0",
"code": ""
},
"0x38e3E7Aca6762E296F659Fcb4E460a3A621dcD3D": {
"nonce": "0",
"balance": "1000000000000000000000000000000",
"code": ""
}
}
}
430 changes: 0 additions & 430 deletions scripts/genesis_alloc_eip1559.json

This file was deleted.

4 changes: 4 additions & 0 deletions scripts/networkdata/chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@
"0x0000000000000000000000000000000000000000": {
"nonce": "0",
"balance": "0"
},
"0x38e3E7Aca6762E296F659Fcb4E460a3A621dcD3D": {
"nonce": "0",
"balance": "1000000000000000000000000000000"
}
}
}
5 changes: 1 addition & 4 deletions scripts/run_reth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ rm -rf $DATA_DIR
# Script's directory
DIR="$(dirname "$0")"

# Use the provided argument as the chain file or default to `chiado_genesis_alloc.json`
CHAIN_FILE=${1:-"$DIR/chiado_genesis_alloc.json"}

echo "Using chain file: $CHAIN_FILE"

# $PWD/target/release/reth \
cargo run -- \
node \
-vvvv \
--chain=$CHAIN_FILE \
--chain=$DIR/chiado_genesis_alloc.json \
--datadir=$DATA_DIR \
--http \
--http.port=8545 \
Expand Down
32 changes: 28 additions & 4 deletions scripts/test_eip1559.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DIR="$(dirname "$0")"

sleep 3

"$DIR/run_reth.sh" $DIR/genesis_alloc_eip1559.json &
"$DIR/run_reth.sh" &
BG_PID=$!

# Set the trap to call cleanup if an error occurs
Expand Down Expand Up @@ -87,9 +87,22 @@ echo PAYLOAD_ID=$PAYLOAD_ID

echo "Sending transaction on block $BLOCK_COUNTER"

# sending RLP encoded form of:
# transaction = {
# 'from': "0x38e3E7Aca6762E296F659Fcb4E460a3A621dcD3D",
# 'to': "0xb42a8c62f3278AFc9343A8FcCD5232CBe8aA5117",
# 'value': 1100000000,
# 'nonce': 0,
# 'gas': 200000,
# 'maxFeePerGas': 2500000000,
# 'maxPriorityFeePerGas': 2500000000,
# 'chainId': 10200
# }
# signed using pvt key: 0x000038e28d32db8e509354d6b359eb58646e84bc942e3c79f470b08ebc976e1c

RESPONSE=$(curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x02f86e8227d8808456b989c08456b989cb825208940ccdd4caf542282a020ea455abe0edfe968763228203e880c080a02f932486d36949a6f15a08d019f8a276d2717eeef872df2b5a1d0f2dc425dd3ca079cb1247e7510c1fd8191089a66d581b0eaae586e3c1060ac02fb2793f20e69e"],"id":1}' \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["02f8718227d880849502f900849502f90083030d4094b42a8c62f3278afc9343a8fccd5232cbe8aa5117844190ab0080c080a098913733bc37a052351fadc62ec860dc341c9f1c6876801097b42514604c7657a05d8529fba214e8562803529af696cdca2f8d5545ca05f1bd2328ef9c175f57d9"],"id":1}' \
http://localhost:8546 \
)
echo eth_sendRawTransaction RESPONSE $RESPONSE
Expand All @@ -102,11 +115,22 @@ if [ "$TX1HASH" == "null" ]; then
exit 1
fi

RESPONSE=$()
# sending RLP encoded form of:
# transaction = {
# 'from': "0x38e3E7Aca6762E296F659Fcb4E460a3A621dcD3D",
# 'to': "0xc390cC49a32736a58733Cf46bE42f734dD4f53cb",
# 'value': 1000000000,
# 'nonce': 1,
# 'gas': 200000,
# 'maxFeePerGas': 2000000000,
# 'maxPriorityFeePerGas': 1000000000,
# 'chainId': 10200
# }
# signed using pvt key: 0x000038e28d32db8e509354d6b359eb58646e84bc942e3c79f470b08ebc976e1c

RESPONSE=$(curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x02f8718227d880843b9aca00847735940083030d4094c390cc49a32736a58733cf46be42f734dd4f53cb843b9aca0080c080a0a4f4d99483deb86d07f82d3d0a993eaef52bfb64aeeaf7bd847b1e2131a2d265a05443ba597754edad76f5eebec21863289bde25f665aa7e912f904e1f2b91c89b"],"id":2}' \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["02f8708227d801849502f900849502f90083030d4094b42a8c62f3278afc9343a8fccd5232cbe8aa5117844190ab0080c0809fe483006f558948cb15b00a3f17c706f2c6ae084c131fca3a84042b23be3f51a05c550f5d70d8c6deb405250cb75e68d5c7daee4e7c202d841df0338b9fcd0838"],"id":2}' \
http://localhost:8546 \
)
echo eth_sendRawTransaction RESPONSE $RESPONSE
Expand Down

0 comments on commit 20b457b

Please sign in to comment.