diff --git a/crawlers/deploy/zksync-era-testnet-missing.service b/crawlers/deploy/zksync-era-testnet-missing.service deleted file mode 100644 index 1b49ec56..00000000 --- a/crawlers/deploy/zksync-era-testnet-missing.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Fill missing blocks at ZkSync Era testnet database -After=network.target - -[Service] -Type=oneshot -WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl -EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env -ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain zksync_era_testnet -n -CPUWeight=50 -SyslogIdentifier=zksync-era-testnet-missing \ No newline at end of file diff --git a/crawlers/deploy/zksync-era-testnet-missing.timer b/crawlers/deploy/zksync-era-testnet-missing.timer deleted file mode 100644 index 5837fb09..00000000 --- a/crawlers/deploy/zksync-era-testnet-missing.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Fill missing blocks at ZkSync Era testnet database - -[Timer] -OnBootSec=120s -OnUnitActiveSec=15m - -[Install] -WantedBy=timers.target \ No newline at end of file diff --git a/crawlers/deploy/zksync-era-testnet-moonworm-crawler.service b/crawlers/deploy/zksync-era-testnet-moonworm-crawler.service deleted file mode 100644 index a825a2ee..00000000 --- a/crawlers/deploy/zksync-era-testnet-moonworm-crawler.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=ZkSync Era testnet moonworm crawler -After=network.target -StartLimitIntervalSec=300 -StartLimitBurst=3 - -[Service] -WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl -EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env -Restart=on-failure -RestartSec=15s -ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b zksync_era_testnet --confirmations 20 --min-blocks-batch 20 -CPUWeight=70 -SyslogIdentifier=zksync-era-testnet-moonworm-crawler - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/crawlers/deploy/zksync-era-testnet-synchronize.service b/crawlers/deploy/zksync-era-testnet-synchronize.service deleted file mode 100644 index 348ba1e0..00000000 --- a/crawlers/deploy/zksync-era-testnet-synchronize.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=ZkSync Era testnet block with transactions synchronizer -StartLimitIntervalSec=300 -StartLimitBurst=3 -After=network.target - -[Service] -Restart=on-failure -RestartSec=15s -WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl -EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env -ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain zksync_era_testnet -c 20 -j 2 -CPUWeight=90 -SyslogIdentifier=zksync-era-testnet-synchronize - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/crawlers/mooncrawl/mooncrawl/blockchain.py b/crawlers/mooncrawl/mooncrawl/blockchain.py index 1ab29a00..e5e97564 100644 --- a/crawlers/mooncrawl/mooncrawl/blockchain.py +++ b/crawlers/mooncrawl/mooncrawl/blockchain.py @@ -34,7 +34,6 @@ from .settings import ( MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI, MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI, MOONSTREAM_NODE_ZKSYNC_ERA_SEPOLIA_A_EXTERNAL_URI, - MOONSTREAM_NODE_ZKSYNC_ERA_TESTNET_A_EXTERNAL_URI, WEB3_CLIENT_REQUEST_TIMEOUT_SECONDS, ) @@ -67,8 +66,6 @@ def connect( web3_uri = MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI elif blockchain_type == AvailableBlockchainType.XDAI: web3_uri = MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI - elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET: - web3_uri = MOONSTREAM_NODE_ZKSYNC_ERA_TESTNET_A_EXTERNAL_URI elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA: web3_uri = MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA: @@ -151,6 +148,7 @@ def add_block(db_session, block: Any, blockchain_type: AvailableBlockchainType) block_obj.author = block.author if ( blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET + or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA ): block_obj.mix_hash = block.get("mixHash", "") @@ -225,6 +223,7 @@ def add_block_transactions( ) if ( blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET + or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA ): tx_obj.l1_batch_number = ( diff --git a/crawlers/mooncrawl/mooncrawl/settings.py b/crawlers/mooncrawl/mooncrawl/settings.py index e6659d5e..9c479fcf 100644 --- a/crawlers/mooncrawl/mooncrawl/settings.py +++ b/crawlers/mooncrawl/mooncrawl/settings.py @@ -102,14 +102,6 @@ MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI = os.environ.get( if MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI == "": raise Exception("MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI env variable is not set") -MOONSTREAM_NODE_ZKSYNC_ERA_TESTNET_A_EXTERNAL_URI = os.environ.get( - "MOONSTREAM_NODE_ZKSYNC_ERA_TESTNET_A_EXTERNAL_URI", "" -) -if MOONSTREAM_NODE_ZKSYNC_ERA_TESTNET_A_EXTERNAL_URI == "": - raise Exception( - "MOONSTREAM_NODE_ZKSYNC_ERA_TESTNET_A_EXTERNAL_URI env variable is not set" - ) - MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI = os.environ.get( "MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI", "" ) @@ -258,14 +250,6 @@ NB_DATA_SOURCE_HEADER = os.environ.get( "NB_DATA_SOURCE_HEADER", "x-node-balancer-data-source" ) -NB_CONTROLLER_ACCESS_ID: Optional[UUID] = None -NB_CONTROLLER_ACCESS_ID_RAW = os.environ.get("NB_CONTROLLER_ACCESS_ID", "") -try: - NB_CONTROLLER_ACCESS_ID = UUID(NB_CONTROLLER_ACCESS_ID_RAW) -except: - pass - - # HTTPProvider for web3 client WEB3_CLIENT_REQUEST_TIMEOUT_SECONDS = 600 diff --git a/crawlers/mooncrawl/sample.env b/crawlers/mooncrawl/sample.env index 095e99e0..9819b89f 100644 --- a/crawlers/mooncrawl/sample.env +++ b/crawlers/mooncrawl/sample.env @@ -25,7 +25,6 @@ export MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI="https://" export MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI="https://" export MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI="https://" -export NB_CONTROLLER_ACCESS_ID="" # AWS environment variables export MOONSTREAM_S3_SMARTCONTRACTS_BUCKET=""