Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity Clustering - New account max nonce update #586

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions entity-cluster-bot/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion entity-cluster-bot/package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
14 changes: 7 additions & 7 deletions entity-cluster-bot/src/agent_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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\
Expand Down Expand Up @@ -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



Expand Down Expand Up @@ -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())

Expand Down
2 changes: 1 addition & 1 deletion entity-cluster-bot/src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down