From 58ef602bbd586e41f2acab0468cfccf84719b7f8 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Wed, 26 Jun 2024 20:24:33 -0300 Subject: [PATCH 1/4] Update silkworm 1.0.2 --- external/silkworm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/silkworm b/external/silkworm index 07f76fa..76163e9 160000 --- a/external/silkworm +++ b/external/silkworm @@ -1 +1 @@ -Subproject commit 07f76fa242ce30bd9e893197ca22b197cad6371d +Subproject commit 76163e9c9aedc7991307f21eaa14a861964446b4 From 92d956a95a90669c4c48a3adb592377a06994f47 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Wed, 26 Jun 2024 22:13:06 -0300 Subject: [PATCH 2/4] Fix integration test --- tests/nodeos_eos_evm_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index 7b351ca..f77ee0d 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -939,8 +939,8 @@ def get_block(num): Utils.Print("\tverify balance from evm-rpc, account row4: ", row4) bal2 = w3.eth.get_balance(Web3.to_checksum_address("0x9E126C57330FA71556628e0aabd6B6B6783d99fA")) - # balance different = 1.0 EOS (val) + 900(Gwei) (21000(base gas) + 36782 (gas for non-exist account) ) - assert(bal1 == bal2 + 1000000000000000000 + 900000000000 * (21000 + 36782)) + # balance different = 1.0 EOS (val) + 900(Gwei) (21000(base gas)) + assert(bal1 == bal2 + 1000000000000000000 + 900000000000 * 21000) Utils.Print("try to get transaction %s from evm-rpc" % (Web3.to_hex(signed_trx.hash))) evm_tx = w3.eth.get_transaction(signed_trx.hash) From 430b0d098e612e66ddca6a5074afcd5a250c1354 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Thu, 27 Jun 2024 13:37:01 -0300 Subject: [PATCH 3/4] Fix nodeos_eos_evm_different_token_test.py test --- tests/nodeos_eos_evm_different_token_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index 6bc4d49..4ca777e 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -978,8 +978,8 @@ def get_block(num): Utils.Print("\taccount row4: ", row4) bal2 = w3.eth.get_balance(Web3.to_checksum_address("0x9E126C57330FA71556628e0aabd6B6B6783d99fA")) - # balance different = 1.0 EOS (val) + 900(Gwei) (21000(base gas) + 36782 (gas for non-exist account) ) - assert(bal1 == bal2 + 1000000000000000000 + 900000000000 * (21000 + 36782)) + # balance different = 1.0 EOS (val) + 900(Gwei) (21000(base gas)) + assert(bal1 == bal2 + 1000000000000000000 + 900000000000 * 21000) # Wait 3 mins Utils.Print("Wait 3 mins") From 90f52cc80a99221e099e22effe49eee4972b56c6 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Thu, 27 Jun 2024 20:48:31 -0300 Subject: [PATCH 4/4] Fix nodeos_eos_evm_gasparam_fork_test.py integration test --- tests/nodeos_eos_evm_gasparam_fork_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_eos_evm_gasparam_fork_test.py index 7867ec1..e6f55cc 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_eos_evm_gasparam_fork_test.py @@ -713,8 +713,8 @@ def makeReservedEvmAddress(account): Utils.Print("\taccount row4: ", row4) assert(row4["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") - assert(row4["balance"] == "0000000000000000000000000000000000000000000000024c9336a8ead00600") - # diff = 2,897,785,000,000,000 = 2,897,785 (Gwei) = (100,000 + (165519 + 21000) * 15) (Gwei) + assert(row4["balance"] == "0000000000000000000000000000000000000000000000024c9c08bd58ca9000") + # diff = 415,000,000,000,000 = 415,000 (Gwei) = (100,000 + (21000) * 15) (Gwei) # {"ram_price_mb":"5.0000 EOS","gas_price":10000000000} # {'consensusParameter': AttributeDict({'gasFeeParameters': AttributeDict({'gasCodedeposit': 477, 'gasNewaccount': 165519, 'gasSset': 167942, 'gasTxcreate': 289062, 'gasTxnewaccount': 165519} @@ -895,11 +895,11 @@ def makeReservedEvmAddress(account): time.sleep(2) Utils.Print("Transfer funds to trigger gas parameter in minor fork") - # EVM -> EOS + # EVM -> EVM # 0x9E126C57330FA71556628e0aabd6B6B6783d99fA private key: 0xba8c9ff38e4179748925335a9891b969214b37dc3723a1754b8b849d3eea9ac0 - toAdd = makeReservedEvmAddress(convert_name_to_value(bobAcc.name)) + toAdd = 0x4ce0ca184bc155a5df5dae2f4643cba60eb1a9ed evmSendKey = "ba8c9ff38e4179748925335a9891b969214b37dc3723a1754b8b849d3eea9ac0" - Print("Transfer EVM->EOS funds 1Gwei from account %s to %s" % (evmAcc.name, bobAcc.name)) + Print("Transfer EVM->EVM funds 1Gwei from account %s to %s" % (evmAcc.name, toAdd)) nonce = 1 gasP = getGasPrice() signed_trx = w3.eth.account.sign_transaction(dict( @@ -921,7 +921,7 @@ def makeReservedEvmAddress(account): Utils.Print("\taccount row4 in node0: ", row4) assert(row4["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") - assert(row4["balance"] == "0000000000000000000000000000000000000000000000024c8724aef459cc00") + assert(row4["balance"] == "0000000000000000000000000000000000000000000000024c8ff6c362545600") # push the same transaction to node1's minor fork (prodc) trans = node1.pushMessage(evmAcc.name, "pushtx", json.dumps(actData), '-p {0}'.format(minerAcc.name), silentErrors=False) @@ -930,7 +930,7 @@ def makeReservedEvmAddress(account): row4_node1=node1.getTableRow(evmAcc.name, evmAcc.name, "account", 4) Utils.Print("\taccount row4 in node1: ", row4_node1) assert(row4_node1["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") - assert(row4_node1["balance"] == "0000000000000000000000000000000000000000000000024c88eb23c5408c00") + assert(row4_node1["balance"] == "0000000000000000000000000000000000000000000000024c91bd38333b1600") assert(row4["balance"] != row4_node1["balance"]) # verify eos-evm-node get the new gas parameter from the minor fork @@ -1035,7 +1035,7 @@ def makeReservedEvmAddress(account): Utils.Print("\taccount row4 in node0: ", row4) assert(row4["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") - assert(row4["balance"] == "0000000000000000000000000000000000000000000000024c88eb23c5408c00") + assert(row4["balance"] == "0000000000000000000000000000000000000000000000024c91bd38333b1600") assert(row4["balance"] == row4_node1["balance"]) evm_block = w3.eth.get_block('latest')