From 9841b802655d8ce2fd43bb61f6a0288723ea4770 Mon Sep 17 00:00:00 2001 From: Vxatz Date: Fri, 8 Mar 2024 13:56:14 +0200 Subject: [PATCH 1/3] chore: Update max nonce --- entity-cluster-bot/src/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity-cluster-bot/src/constants.py b/entity-cluster-bot/src/constants.py index f156b0cb..63067a63 100644 --- a/entity-cluster-bot/src/constants.py +++ b/entity-cluster-bot/src/constants.py @@ -6,7 +6,7 @@ ALERTED_ADDRESSES_KEY = "alerted_addresses_key" GRAPH_KEY = "graph_key" -NEW_FUNDED_MAX_NONCE = 1 +NEW_FUNDED_MAX_NONCE = 2 NEW_FUNDED_MAX_WEI_TRANSFER_THRESHOLD = 1000000000000000000 # 1 ETH S3_BUCKET= "prod-research-bot-data" From dabbe102e4a86ce9c789077101d3398bd897ddf2 Mon Sep 17 00:00:00 2001 From: Vxatz Date: Fri, 8 Mar 2024 14:50:30 +0200 Subject: [PATCH 2/3] tests: Update tests --- entity-cluster-bot/src/agent_test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/entity-cluster-bot/src/agent_test.py b/entity-cluster-bot/src/agent_test.py index ae8fe5bf..aac3da9d 100644 --- a/entity-cluster-bot/src/agent_test.py +++ b/entity-cluster-bot/src/agent_test.py @@ -443,7 +443,7 @@ def test_entity_cluster_perf_test(self): processing_runs = 1 - processing_time_normal_contract_itearation_like_ERC30_approve = 0 + processing_time_normal_contract_itearation_like_ERC20_approve = 0 processing_time_small_transaction_with_finding = 0 processing_time_bi_directional_tx_right = 0 processing_time_bi_directional_tx_left_with_finding = 0 @@ -455,7 +455,7 @@ def test_entity_cluster_perf_test(self): TestEntityClusterBot.remove_persistent_state() global agent agent = EntityClusterAgent(DynamoPersistance()) - processing_time_normal_contract_itearation_like_ERC30_approve += timeit.timeit('agent.cluster_entities(real_w3, transf_token_appproval)', number=processing_runs, globals=globals()) * 1000 + processing_time_normal_contract_itearation_like_ERC20_approve += timeit.timeit('agent.cluster_entities(real_w3, transf_token_appproval)', number=processing_runs, globals=globals()) * 1000 processing_time_small_transaction_with_finding += timeit.timeit('agent.cluster_entities(real_w3, small_transfer)', number=processing_runs, globals=globals()) * 1000 processing_time_bi_directional_tx_right += timeit.timeit('agent.cluster_entities(real_w3, native_transfer_bidirectional_right)', number=processing_runs, globals=globals()) * 1000 @@ -471,7 +471,7 @@ def test_entity_cluster_perf_test(self): processing_time_ERC20_bi_directional_tx_right += processing_time_bi_directional_tx_right + 10 processing_time_ERC20_bi_directional_tx_left_with_finding += processing_time_bi_directional_tx_left_with_finding + 10 - avg_processing_time_normal_contract_itearation_like_ERC30_approve = processing_time_normal_contract_itearation_like_ERC30_approve / processing_runs + avg_processing_time_normal_contract_itearation_like_ERC20_approve = processing_time_normal_contract_itearation_like_ERC20_approve / processing_runs avg_processing_time_small_transaction_with_finding = processing_time_small_transaction_with_finding / processing_runs avg_processing_time_bi_directional_tx_right = processing_time_bi_directional_tx_right / processing_runs avg_processing_time_bi_directional_tx_left_with_finding = processing_time_bi_directional_tx_left_with_finding / processing_runs @@ -481,7 +481,7 @@ def test_entity_cluster_perf_test(self): avg_processing_time_ERC20_bi_directional_tx_left_with_finding = processing_time_ERC20_bi_directional_tx_left_with_finding / processing_runs - avg_tx_time = (avg_processing_time_normal_contract_itearation_like_ERC30_approve + avg_tx_time = (avg_processing_time_normal_contract_itearation_like_ERC20_approve + avg_processing_time_small_transaction_with_finding + avg_processing_time_bi_directional_tx_right + avg_processing_time_bi_directional_tx_left_with_finding @@ -490,7 +490,7 @@ def test_entity_cluster_perf_test(self): + avg_processing_time_ERC20_bi_directional_tx_right + avg_processing_time_ERC20_bi_directional_tx_left_with_finding ) / 8 - avg_tx_time_weight = avg_processing_time_normal_contract_itearation_like_ERC30_approve * 0.5 \ + avg_tx_time_weight = avg_processing_time_normal_contract_itearation_like_ERC20_approve * 0.5 \ + avg_processing_time_small_transaction_with_finding * 0.11 \ + avg_processing_time_bi_directional_tx_right * 0.10 \ + avg_processing_time_bi_directional_tx_left_with_finding * 0.03\ @@ -540,7 +540,7 @@ def test_sharding_finding_bidirectional_in_redundancy_env(self): # Because this test is making actual RPC calls on ETH mainnet, # we are using a block number that will return a non-zero value # for the two addresses' `transaction_count`. - block_number = 18127797 + block_number = 18252000 @@ -602,7 +602,7 @@ def test_sharding_finding_bidirectional(self): # Because this test is making actual RPC calls on ETH mainnet, # we are using a block number that will return a non-zero value # for the two addresses' `transaction_count`. - block_number = 18127797 + block_number = 18252000 agent1 = EntityClusterAgent(DynamoPersistance()) From 2c64bad39e9ecb1bd7a44f83b4ad85825f3eec50 Mon Sep 17 00:00:00 2001 From: Vxatz Date: Fri, 8 Mar 2024 14:50:43 +0200 Subject: [PATCH 3/3] chore: Bump bot version --- entity-cluster-bot/package-lock.json | 4 ++-- entity-cluster-bot/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/entity-cluster-bot/package-lock.json b/entity-cluster-bot/package-lock.json index 5cdd0b1e..395d58a5 100644 --- a/entity-cluster-bot/package-lock.json +++ b/entity-cluster-bot/package-lock.json @@ -1,12 +1,12 @@ { "name": "entity-cluster-bot", - "version": "0.0.19", + "version": "0.0.20", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "entity-cluster-bot", - "version": "0.0.19", + "version": "0.0.20", "hasInstallScript": true, "dependencies": { "forta-agent": "^0.1.33" diff --git a/entity-cluster-bot/package.json b/entity-cluster-bot/package.json index c7168a91..51ce68c4 100644 --- a/entity-cluster-bot/package.json +++ b/entity-cluster-bot/package.json @@ -1,7 +1,7 @@ { "name": "entity-cluster-bot", "displayName": "Entity Cluster Bot", - "version": "0.0.19", + "version": "0.0.20", "description": "A bot that clusters entities", "chainIds": [ 1,