@aztec/p2p 0.0.1-commit.f2ce05ee → 0.0.1-commit.f504929
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/client/factory.d.ts +8 -8
- package/dest/client/factory.d.ts.map +1 -1
- package/dest/client/factory.js +37 -13
- package/dest/client/interface.d.ts +39 -33
- package/dest/client/interface.d.ts.map +1 -1
- package/dest/client/p2p_client.d.ts +37 -50
- package/dest/client/p2p_client.d.ts.map +1 -1
- package/dest/client/p2p_client.js +138 -199
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.js +6 -7
- package/dest/config.d.ts +29 -15
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +39 -35
- package/dest/errors/tx-pool.error.d.ts +8 -0
- package/dest/errors/tx-pool.error.d.ts.map +1 -0
- package/dest/errors/tx-pool.error.js +9 -0
- package/dest/index.d.ts +2 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -0
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +21 -12
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/attestation_pool.js +72 -38
- package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts +1 -1
- package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.js +53 -53
- package/dest/mem_pools/attestation_pool/index.d.ts +2 -2
- package/dest/mem_pools/attestation_pool/index.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/index.js +1 -1
- package/dest/mem_pools/attestation_pool/mocks.d.ts +2 -2
- package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/mocks.js +2 -2
- package/dest/mem_pools/index.d.ts +2 -1
- package/dest/mem_pools/index.d.ts.map +1 -1
- package/dest/mem_pools/instrumentation.d.ts +4 -2
- package/dest/mem_pools/instrumentation.d.ts.map +1 -1
- package/dest/mem_pools/instrumentation.js +16 -14
- package/dest/mem_pools/interface.d.ts +3 -3
- package/dest/mem_pools/interface.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.js +3 -3
- package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts +104 -0
- package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool_v2/deleted_pool.js +251 -0
- package/dest/mem_pools/tx_pool_v2/eviction/eviction_manager.d.ts +3 -3
- package/dest/mem_pools/tx_pool_v2/eviction/eviction_manager.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/eviction_manager.js +18 -9
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.d.ts +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.js +5 -2
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.d.ts +3 -3
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.js +12 -4
- package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts +2 -2
- package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/index.js +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/interfaces.d.ts +48 -5
- package/dest/mem_pools/tx_pool_v2/eviction/interfaces.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/interfaces.js +8 -0
- package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_mining_rule.js +7 -5
- package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.js +7 -5
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.d.ts +2 -2
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.js +14 -6
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.d.ts +4 -4
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.js +14 -4
- package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.d.ts +3 -3
- package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.js +2 -2
- package/dest/mem_pools/tx_pool_v2/index.d.ts +3 -2
- package/dest/mem_pools/tx_pool_v2/index.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/index.js +2 -1
- package/dest/mem_pools/tx_pool_v2/instrumentation.d.ts +15 -0
- package/dest/mem_pools/tx_pool_v2/instrumentation.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool_v2/instrumentation.js +43 -0
- package/dest/mem_pools/tx_pool_v2/interfaces.d.ts +22 -8
- package/dest/mem_pools/tx_pool_v2/interfaces.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/interfaces.js +4 -1
- package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts +56 -8
- package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_metadata.js +108 -10
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts +12 -3
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.js +36 -14
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts +9 -4
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.js +14 -6
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts +14 -5
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.js +344 -184
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts +2 -1
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts +2 -1
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts +3 -1
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/proposal_validator.js +10 -0
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts +2 -1
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.js +166 -0
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts +4 -4
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.js +3 -3
- package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts +2 -1
- package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/allowed_public_setup.js +25 -10
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts +16 -3
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/block_header_validator.js +1 -1
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts +13 -3
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/double_spend_validator.js +4 -4
- package/dest/msg_validators/tx_validator/factory.d.ts +114 -6
- package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/factory.js +219 -58
- package/dest/msg_validators/tx_validator/gas_validator.d.ts +58 -3
- package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/gas_validator.js +73 -36
- package/dest/msg_validators/tx_validator/index.d.ts +2 -1
- package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/index.js +1 -0
- package/dest/msg_validators/tx_validator/nullifier_cache.d.ts +14 -0
- package/dest/msg_validators/tx_validator/nullifier_cache.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/nullifier_cache.js +24 -0
- package/dest/msg_validators/tx_validator/phases_validator.d.ts +2 -2
- package/dest/msg_validators/tx_validator/phases_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/phases_validator.js +25 -24
- package/dest/msg_validators/tx_validator/timestamp_validator.d.ts +20 -4
- package/dest/msg_validators/tx_validator/timestamp_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/timestamp_validator.js +6 -6
- package/dest/services/dummy_service.d.ts +9 -5
- package/dest/services/dummy_service.d.ts.map +1 -1
- package/dest/services/dummy_service.js +7 -4
- package/dest/services/encoding.d.ts +3 -3
- package/dest/services/encoding.d.ts.map +1 -1
- package/dest/services/encoding.js +11 -10
- package/dest/services/gossipsub/topic_score_params.d.ts +18 -6
- package/dest/services/gossipsub/topic_score_params.d.ts.map +1 -1
- package/dest/services/gossipsub/topic_score_params.js +32 -10
- package/dest/services/libp2p/libp2p_service.d.ts +25 -14
- package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
- package/dest/services/libp2p/libp2p_service.js +143 -114
- package/dest/services/peer-manager/metrics.d.ts +3 -1
- package/dest/services/peer-manager/metrics.d.ts.map +1 -1
- package/dest/services/peer-manager/metrics.js +6 -0
- package/dest/services/peer-manager/peer_manager.d.ts +1 -1
- package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
- package/dest/services/peer-manager/peer_manager.js +2 -1
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts +4 -3
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts.map +1 -1
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.js +19 -46
- package/dest/services/reqresp/batch-tx-requester/interface.d.ts +2 -6
- package/dest/services/reqresp/batch-tx-requester/interface.d.ts.map +1 -1
- package/dest/services/reqresp/batch-tx-requester/missing_txs.d.ts +10 -13
- package/dest/services/reqresp/batch-tx-requester/missing_txs.d.ts.map +1 -1
- package/dest/services/reqresp/batch-tx-requester/missing_txs.js +25 -46
- package/dest/services/reqresp/batch-tx-requester/peer_collection.d.ts +17 -11
- package/dest/services/reqresp/batch-tx-requester/peer_collection.d.ts.map +1 -1
- package/dest/services/reqresp/batch-tx-requester/peer_collection.js +49 -15
- package/dest/services/reqresp/batch-tx-requester/tx_validator.js +2 -2
- package/dest/services/reqresp/interface.d.ts +10 -1
- package/dest/services/reqresp/interface.d.ts.map +1 -1
- package/dest/services/reqresp/interface.js +15 -1
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts +3 -3
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +7 -1
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.js +15 -0
- package/dest/services/reqresp/protocols/tx.d.ts +7 -1
- package/dest/services/reqresp/protocols/tx.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/tx.js +20 -0
- package/dest/services/reqresp/reqresp.d.ts +1 -1
- package/dest/services/reqresp/reqresp.d.ts.map +1 -1
- package/dest/services/reqresp/reqresp.js +13 -5
- package/dest/services/service.d.ts +22 -3
- package/dest/services/service.d.ts.map +1 -1
- package/dest/services/tx_collection/config.d.ts +19 -1
- package/dest/services/tx_collection/config.d.ts.map +1 -1
- package/dest/services/tx_collection/config.js +46 -0
- package/dest/services/tx_collection/fast_tx_collection.d.ts +3 -1
- package/dest/services/tx_collection/fast_tx_collection.d.ts.map +1 -1
- package/dest/services/tx_collection/fast_tx_collection.js +56 -36
- package/dest/services/tx_collection/file_store_tx_collection.d.ts +53 -0
- package/dest/services/tx_collection/file_store_tx_collection.d.ts.map +1 -0
- package/dest/services/tx_collection/file_store_tx_collection.js +167 -0
- package/dest/services/tx_collection/file_store_tx_source.d.ts +37 -0
- package/dest/services/tx_collection/file_store_tx_source.d.ts.map +1 -0
- package/dest/services/tx_collection/file_store_tx_source.js +90 -0
- package/dest/services/tx_collection/index.d.ts +2 -1
- package/dest/services/tx_collection/index.d.ts.map +1 -1
- package/dest/services/tx_collection/index.js +1 -0
- package/dest/services/tx_collection/instrumentation.d.ts +1 -1
- package/dest/services/tx_collection/instrumentation.d.ts.map +1 -1
- package/dest/services/tx_collection/instrumentation.js +2 -1
- package/dest/services/tx_collection/missing_txs_tracker.d.ts +32 -0
- package/dest/services/tx_collection/missing_txs_tracker.d.ts.map +1 -0
- package/dest/services/tx_collection/missing_txs_tracker.js +27 -0
- package/dest/services/tx_collection/proposal_tx_collector.d.ts +7 -6
- package/dest/services/tx_collection/proposal_tx_collector.d.ts.map +1 -1
- package/dest/services/tx_collection/proposal_tx_collector.js +5 -4
- package/dest/services/tx_collection/slow_tx_collection.d.ts +7 -3
- package/dest/services/tx_collection/slow_tx_collection.d.ts.map +1 -1
- package/dest/services/tx_collection/slow_tx_collection.js +60 -26
- package/dest/services/tx_collection/tx_collection.d.ts +23 -10
- package/dest/services/tx_collection/tx_collection.d.ts.map +1 -1
- package/dest/services/tx_collection/tx_collection.js +75 -3
- package/dest/services/tx_collection/tx_collection_sink.d.ts +18 -8
- package/dest/services/tx_collection/tx_collection_sink.d.ts.map +1 -1
- package/dest/services/tx_collection/tx_collection_sink.js +26 -29
- package/dest/services/tx_collection/tx_source.d.ts +8 -3
- package/dest/services/tx_collection/tx_source.d.ts.map +1 -1
- package/dest/services/tx_collection/tx_source.js +19 -2
- package/dest/services/tx_file_store/config.d.ts +1 -3
- package/dest/services/tx_file_store/config.d.ts.map +1 -1
- package/dest/services/tx_file_store/config.js +0 -4
- package/dest/services/tx_file_store/tx_file_store.d.ts +4 -3
- package/dest/services/tx_file_store/tx_file_store.d.ts.map +1 -1
- package/dest/services/tx_file_store/tx_file_store.js +9 -6
- package/dest/services/tx_provider.d.ts +4 -4
- package/dest/services/tx_provider.d.ts.map +1 -1
- package/dest/services/tx_provider.js +9 -8
- package/dest/test-helpers/make-test-p2p-clients.d.ts +7 -8
- package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
- package/dest/test-helpers/make-test-p2p-clients.js +1 -2
- package/dest/test-helpers/mock-pubsub.d.ts +30 -4
- package/dest/test-helpers/mock-pubsub.d.ts.map +1 -1
- package/dest/test-helpers/mock-pubsub.js +105 -4
- package/dest/test-helpers/reqresp-nodes.d.ts +2 -3
- package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
- package/dest/test-helpers/reqresp-nodes.js +2 -2
- package/dest/test-helpers/testbench-utils.d.ts +35 -24
- package/dest/test-helpers/testbench-utils.d.ts.map +1 -1
- package/dest/test-helpers/testbench-utils.js +93 -35
- package/dest/testbench/p2p_client_testbench_worker.d.ts +2 -2
- package/dest/testbench/p2p_client_testbench_worker.d.ts.map +1 -1
- package/dest/testbench/p2p_client_testbench_worker.js +14 -14
- package/dest/util.d.ts +2 -2
- package/dest/util.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/client/factory.ts +71 -23
- package/src/client/interface.ts +43 -33
- package/src/client/p2p_client.ts +164 -243
- package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +19 -10
- package/src/config.ts +60 -42
- package/src/errors/tx-pool.error.ts +12 -0
- package/src/index.ts +1 -0
- package/src/mem_pools/attestation_pool/attestation_pool.ts +100 -48
- package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +57 -53
- package/src/mem_pools/attestation_pool/index.ts +3 -3
- package/src/mem_pools/attestation_pool/mocks.ts +2 -1
- package/src/mem_pools/index.ts +3 -0
- package/src/mem_pools/instrumentation.ts +17 -13
- package/src/mem_pools/interface.ts +2 -2
- package/src/mem_pools/tx_pool/README.md +1 -1
- package/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts +3 -3
- package/src/mem_pools/tx_pool_v2/README.md +76 -10
- package/src/mem_pools/tx_pool_v2/deleted_pool.ts +321 -0
- package/src/mem_pools/tx_pool_v2/eviction/eviction_manager.ts +21 -8
- package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.ts +5 -2
- package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.ts +18 -4
- package/src/mem_pools/tx_pool_v2/eviction/index.ts +4 -0
- package/src/mem_pools/tx_pool_v2/eviction/interfaces.ts +49 -4
- package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_mining_rule.ts +5 -5
- package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.ts +5 -5
- package/src/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.ts +14 -9
- package/src/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.ts +24 -6
- package/src/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.ts +3 -3
- package/src/mem_pools/tx_pool_v2/index.ts +2 -1
- package/src/mem_pools/tx_pool_v2/instrumentation.ts +69 -0
- package/src/mem_pools/tx_pool_v2/interfaces.ts +23 -8
- package/src/mem_pools/tx_pool_v2/tx_metadata.ts +153 -17
- package/src/mem_pools/tx_pool_v2/tx_pool_indices.ts +43 -16
- package/src/mem_pools/tx_pool_v2/tx_pool_v2.ts +21 -7
- package/src/mem_pools/tx_pool_v2/tx_pool_v2_impl.ts +388 -182
- package/src/msg_validators/proposal_validator/block_proposal_validator.ts +1 -1
- package/src/msg_validators/proposal_validator/checkpoint_proposal_validator.ts +1 -1
- package/src/msg_validators/proposal_validator/proposal_validator.ts +15 -1
- package/src/msg_validators/proposal_validator/proposal_validator_test_suite.ts +144 -1
- package/src/msg_validators/tx_validator/README.md +115 -0
- package/src/msg_validators/tx_validator/aggregate_tx_validator.ts +5 -5
- package/src/msg_validators/tx_validator/allowed_public_setup.ts +27 -13
- package/src/msg_validators/tx_validator/block_header_validator.ts +15 -3
- package/src/msg_validators/tx_validator/double_spend_validator.ts +11 -6
- package/src/msg_validators/tx_validator/factory.ts +353 -77
- package/src/msg_validators/tx_validator/gas_validator.ts +90 -27
- package/src/msg_validators/tx_validator/index.ts +1 -0
- package/src/msg_validators/tx_validator/nullifier_cache.ts +30 -0
- package/src/msg_validators/tx_validator/phases_validator.ts +25 -29
- package/src/msg_validators/tx_validator/timestamp_validator.ts +23 -18
- package/src/services/dummy_service.ts +12 -6
- package/src/services/encoding.ts +9 -9
- package/src/services/gossipsub/README.md +29 -14
- package/src/services/gossipsub/topic_score_params.ts +49 -13
- package/src/services/libp2p/libp2p_service.ts +153 -123
- package/src/services/peer-manager/metrics.ts +7 -0
- package/src/services/peer-manager/peer_manager.ts +2 -1
- package/src/services/reqresp/batch-tx-requester/batch_tx_requester.ts +20 -48
- package/src/services/reqresp/batch-tx-requester/interface.ts +1 -5
- package/src/services/reqresp/batch-tx-requester/missing_txs.ts +23 -71
- package/src/services/reqresp/batch-tx-requester/peer_collection.ts +63 -24
- package/src/services/reqresp/batch-tx-requester/tx_validator.ts +2 -2
- package/src/services/reqresp/interface.ts +26 -1
- package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +2 -2
- package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +17 -0
- package/src/services/reqresp/protocols/tx.ts +22 -0
- package/src/services/reqresp/reqresp.ts +16 -4
- package/src/services/service.ts +31 -2
- package/src/services/tx_collection/config.ts +68 -0
- package/src/services/tx_collection/fast_tx_collection.ts +65 -32
- package/src/services/tx_collection/file_store_tx_collection.ts +202 -0
- package/src/services/tx_collection/file_store_tx_source.ts +117 -0
- package/src/services/tx_collection/index.ts +1 -0
- package/src/services/tx_collection/instrumentation.ts +7 -1
- package/src/services/tx_collection/missing_txs_tracker.ts +52 -0
- package/src/services/tx_collection/proposal_tx_collector.ts +8 -7
- package/src/services/tx_collection/slow_tx_collection.ts +66 -33
- package/src/services/tx_collection/tx_collection.ts +113 -16
- package/src/services/tx_collection/tx_collection_sink.ts +30 -34
- package/src/services/tx_collection/tx_source.ts +22 -3
- package/src/services/tx_file_store/config.ts +0 -6
- package/src/services/tx_file_store/tx_file_store.ts +10 -8
- package/src/services/tx_provider.ts +10 -9
- package/src/test-helpers/make-test-p2p-clients.ts +3 -5
- package/src/test-helpers/mock-pubsub.ts +146 -9
- package/src/test-helpers/reqresp-nodes.ts +2 -5
- package/src/test-helpers/testbench-utils.ts +108 -40
- package/src/testbench/p2p_client_testbench_worker.ts +23 -20
- package/src/util.ts +7 -1
|
@@ -370,15 +370,14 @@ function applyDecs2203RFactory() {
|
|
|
370
370
|
function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
371
371
|
return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
|
|
372
372
|
}
|
|
373
|
-
var _dec, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8,
|
|
373
|
+
var _dec, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _initProto;
|
|
374
374
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
375
|
-
import { randomInt } from '@aztec/foundation/crypto/random';
|
|
376
375
|
import { createLibp2pComponentLogger, createLogger } from '@aztec/foundation/log';
|
|
377
376
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
378
377
|
import { Timer } from '@aztec/foundation/timer';
|
|
379
378
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
380
379
|
import { GasFees } from '@aztec/stdlib/gas';
|
|
381
|
-
import { BlockProposal, CheckpointAttestation, CheckpointProposal,
|
|
380
|
+
import { BlockProposal, CheckpointAttestation, CheckpointProposal, P2PMessage, PeerErrorSeverity, TopicType, createTopicString, getTopicsForConfig, metricsTopicStrToLabels } from '@aztec/stdlib/p2p';
|
|
382
381
|
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
383
382
|
import { Tx } from '@aztec/stdlib/tx';
|
|
384
383
|
import { compressComponentVersions } from '@aztec/stdlib/versioning';
|
|
@@ -397,7 +396,7 @@ import { ENR } from '@nethermindeth/enr';
|
|
|
397
396
|
import { createLibp2p } from 'libp2p';
|
|
398
397
|
import { BlockProposalValidator, CheckpointAttestationValidator, CheckpointProposalValidator, DoubleSpendTxValidator, FishermanAttestationValidator, getDefaultAllowedSetupFunctions } from '../../msg_validators/index.js';
|
|
399
398
|
import { MessageSeenValidator } from '../../msg_validators/msg_seen_validator/msg_seen_validator.js';
|
|
400
|
-
import {
|
|
399
|
+
import { createFirstStageTxValidationsForGossipedTransactions, createSecondStageTxValidationsForGossipedTransactions, createTxValidatorForBlockProposalReceivedTxs, createTxValidatorForReqResponseReceivedTxs } from '../../msg_validators/tx_validator/factory.js';
|
|
401
400
|
import { GossipSubEvent } from '../../types/index.js';
|
|
402
401
|
import { convertToMultiaddr } from '../../util.js';
|
|
403
402
|
import { getVersions } from '../../versioning.js';
|
|
@@ -408,8 +407,7 @@ import { APP_SPECIFIC_WEIGHT, gossipScoreThresholds } from '../gossipsub/scoring
|
|
|
408
407
|
import { createAllTopicScoreParams } from '../gossipsub/topic_score_params.js';
|
|
409
408
|
import { PeerManager } from '../peer-manager/peer_manager.js';
|
|
410
409
|
import { PeerScoring } from '../peer-manager/peer_scoring.js';
|
|
411
|
-
import { DEFAULT_SUB_PROTOCOL_VALIDATORS, ReqRespSubProtocol, ValidationError } from '../reqresp/index.js';
|
|
412
|
-
import { pingHandler, reqGoodbyeHandler, reqRespBlockHandler, reqRespBlockTxsHandler, reqRespStatusHandler, reqRespTxHandler } from '../reqresp/index.js';
|
|
410
|
+
import { DEFAULT_SUB_PROTOCOL_VALIDATORS, ReqRespSubProtocol, ValidationError, pingHandler, reqGoodbyeHandler, reqRespBlockHandler, reqRespBlockTxsHandler, reqRespStatusHandler, reqRespTxHandler } from '../reqresp/index.js';
|
|
413
411
|
import { ReqResp } from '../reqresp/reqresp.js';
|
|
414
412
|
import { P2PInstrumentation } from './instrumentation.js';
|
|
415
413
|
_dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId, attestation)=>({
|
|
@@ -433,9 +431,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
433
431
|
[Attributes.TX_HASH]: requestedTxHash.toString()
|
|
434
432
|
})), _dec7 = trackSpan('Libp2pService.validateRequestedBlock', (requestedBlockNumber, _responseBlock)=>({
|
|
435
433
|
[Attributes.BLOCK_NUMBER]: requestedBlockNumber.toString()
|
|
436
|
-
})), _dec8 = trackSpan('Libp2pService.
|
|
437
|
-
[Attributes.TX_HASH]: tx.getTxHash().toString()
|
|
438
|
-
})), _dec9 = trackSpan('Libp2pService.validateCheckpointAttestation', async (_, attestation)=>({
|
|
434
|
+
})), _dec8 = trackSpan('Libp2pService.validateCheckpointAttestation', async (_, attestation)=>({
|
|
439
435
|
[Attributes.SLOT_NUMBER]: attestation.payload.header.slotNumber,
|
|
440
436
|
[Attributes.BLOCK_ARCHIVE]: attestation.archive.toString(),
|
|
441
437
|
[Attributes.P2P_ID]: await attestation.p2pMessageLoggingIdentifier().then((i)=>i.toString())
|
|
@@ -443,7 +439,6 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
443
439
|
/**
|
|
444
440
|
* Lib P2P implementation of the P2PService interface.
|
|
445
441
|
*/ export class LibP2PService extends WithTracer {
|
|
446
|
-
clientType;
|
|
447
442
|
config;
|
|
448
443
|
node;
|
|
449
444
|
peerDiscoveryService;
|
|
@@ -499,11 +494,6 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
499
494
|
[
|
|
500
495
|
_dec8,
|
|
501
496
|
2,
|
|
502
|
-
"validatePropagatedTx"
|
|
503
|
-
],
|
|
504
|
-
[
|
|
505
|
-
_dec9,
|
|
506
|
-
2,
|
|
507
497
|
"validateCheckpointAttestation"
|
|
508
498
|
]
|
|
509
499
|
], []));
|
|
@@ -518,6 +508,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
518
508
|
topicStrings;
|
|
519
509
|
feesCache;
|
|
520
510
|
/** Callback invoked when a duplicate proposal is detected (triggers slashing). */ duplicateProposalCallback;
|
|
511
|
+
/** Callback invoked when a duplicate attestation is detected (triggers slashing). */ duplicateAttestationCallback;
|
|
521
512
|
/**
|
|
522
513
|
* Callback for when a block is received from a peer.
|
|
523
514
|
* @param block - The block received from the peer.
|
|
@@ -532,8 +523,8 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
532
523
|
instrumentation;
|
|
533
524
|
telemetry;
|
|
534
525
|
logger;
|
|
535
|
-
constructor(
|
|
536
|
-
super(telemetry, 'LibP2PService'), this.
|
|
526
|
+
constructor(config, node, peerDiscoveryService, reqresp, peerManager, mempools, archiver, epochCache, proofVerifier, worldStateSynchronizer, telemetry, logger = createLogger('p2p:libp2p_service')){
|
|
527
|
+
super(telemetry, 'LibP2PService'), this.config = config, this.node = node, this.peerDiscoveryService = peerDiscoveryService, this.reqresp = reqresp, this.peerManager = peerManager, this.mempools = mempools, this.archiver = archiver, this.epochCache = epochCache, this.proofVerifier = proofVerifier, this.worldStateSynchronizer = worldStateSynchronizer, this.msgIdSeenValidators = (_initProto(this), {}), this.protocolVersion = '', this.topicStrings = {};
|
|
537
528
|
this.telemetry = telemetry;
|
|
538
529
|
// Create child logger with fisherman prefix if in fisherman mode
|
|
539
530
|
this.logger = config.fishermanMode ? logger.createChild('[FISHERMAN]') : logger;
|
|
@@ -550,10 +541,12 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
550
541
|
this.topicStrings[TopicType.checkpoint_proposal] = createTopicString(TopicType.checkpoint_proposal, this.protocolVersion);
|
|
551
542
|
this.topicStrings[TopicType.checkpoint_attestation] = createTopicString(TopicType.checkpoint_attestation, this.protocolVersion);
|
|
552
543
|
this.blockProposalValidator = new BlockProposalValidator(epochCache, {
|
|
553
|
-
txsPermitted: !config.disableTransactions
|
|
544
|
+
txsPermitted: !config.disableTransactions,
|
|
545
|
+
maxTxsPerBlock: config.maxTxsPerBlock
|
|
554
546
|
});
|
|
555
547
|
this.checkpointProposalValidator = new CheckpointProposalValidator(epochCache, {
|
|
556
|
-
txsPermitted: !config.disableTransactions
|
|
548
|
+
txsPermitted: !config.disableTransactions,
|
|
549
|
+
maxTxsPerBlock: config.maxTxsPerBlock
|
|
557
550
|
});
|
|
558
551
|
this.checkpointAttestationValidator = config.fishermanMode ? new FishermanAttestationValidator(epochCache, mempools.attestationPool, telemetry) : new CheckpointAttestationValidator(epochCache);
|
|
559
552
|
this.gossipSubEventHandler = this.handleGossipSubEvent.bind(this);
|
|
@@ -576,7 +569,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
576
569
|
* @param config - The configuration to use when creating the service.
|
|
577
570
|
* @param txPool - The transaction pool to be accessed by the service.
|
|
578
571
|
* @returns The new service.
|
|
579
|
-
*/ static async new(
|
|
572
|
+
*/ static async new(config, peerId, deps) {
|
|
580
573
|
const { worldStateSynchronizer, epochCache, l2BlockSource, mempools, proofVerifier, peerStore, telemetry, logger, packageVersion } = deps;
|
|
581
574
|
const { p2pPort, maxPeerCount, listenAddress } = config;
|
|
582
575
|
const bindAddrTcp = convertToMultiaddr(listenAddress, p2pPort, 'tcp');
|
|
@@ -619,7 +612,8 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
619
612
|
slotDurationMs: l1Constants.slotDuration * 1000,
|
|
620
613
|
heartbeatIntervalMs: config.gossipsubInterval,
|
|
621
614
|
targetCommitteeSize: l1Constants.targetCommitteeSize,
|
|
622
|
-
blockDurationMs: config.blockDurationMs
|
|
615
|
+
blockDurationMs: config.blockDurationMs,
|
|
616
|
+
expectedBlockProposalsPerSlot: config.expectedBlockProposalsPerSlot
|
|
623
617
|
});
|
|
624
618
|
const node = await createLibp2p({
|
|
625
619
|
start: false,
|
|
@@ -740,7 +734,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
740
734
|
// Note: positive topic scores can offset penalties, so alignment is best-effort.
|
|
741
735
|
node.services.pubsub.score.params.appSpecificWeight = APP_SPECIFIC_WEIGHT;
|
|
742
736
|
node.services.pubsub.score.params.appSpecificScore = (peerId)=>peerManager.shouldDisableP2PGossip(peerId) ? -Infinity : peerManager.getPeerScore(peerId);
|
|
743
|
-
return new LibP2PService(
|
|
737
|
+
return new LibP2PService(config, node, peerDiscoveryService, reqresp, peerManager, mempools, l2BlockSource, epochCache, proofVerifier, worldStateSynchronizer, telemetry, logger);
|
|
744
738
|
}
|
|
745
739
|
/**
|
|
746
740
|
* Starts the LibP2P service.
|
|
@@ -785,7 +779,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
785
779
|
await this.reqresp.start(requestResponseHandlers, reqrespSubProtocolValidators);
|
|
786
780
|
await this.node.start();
|
|
787
781
|
// Subscribe to standard GossipSub topics by default
|
|
788
|
-
for (const topic of
|
|
782
|
+
for (const topic of getTopicsForConfig(this.config.disableTransactions)){
|
|
789
783
|
this.subscribeToTopic(this.topicStrings[topic]);
|
|
790
784
|
}
|
|
791
785
|
// add GossipSub listener
|
|
@@ -833,6 +827,9 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
833
827
|
getPeers(includePending) {
|
|
834
828
|
return this.peerManager.getPeers(includePending);
|
|
835
829
|
}
|
|
830
|
+
getGossipMeshPeerCount(topicType) {
|
|
831
|
+
return this.node.services.pubsub.getMeshPeers(this.topicStrings[topicType]).length;
|
|
832
|
+
}
|
|
836
833
|
handleGossipSubEvent(e) {
|
|
837
834
|
this.logger.trace(`Received PUBSUB message.`);
|
|
838
835
|
const safeJob = async ()=>{
|
|
@@ -874,6 +871,13 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
874
871
|
this.duplicateProposalCallback = callback;
|
|
875
872
|
}
|
|
876
873
|
/**
|
|
874
|
+
* Registers a callback to be invoked when a duplicate attestation is detected.
|
|
875
|
+
* A validator signing attestations for different proposals at the same slot.
|
|
876
|
+
* This callback is triggered on the first duplicate (when count goes from 1 to 2).
|
|
877
|
+
*/ registerDuplicateAttestationCallback(callback) {
|
|
878
|
+
this.duplicateAttestationCallback = callback;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
877
881
|
* Subscribes to a topic.
|
|
878
882
|
* @param topic - The topic to subscribe to.
|
|
879
883
|
*/ subscribeToTopic(topic) {
|
|
@@ -984,9 +988,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
984
988
|
if (msg.topic === this.topicStrings[TopicType.tx]) {
|
|
985
989
|
await this.handleGossipedTx(p2pMessage.payload, msgId, source);
|
|
986
990
|
} else if (msg.topic === this.topicStrings[TopicType.checkpoint_attestation]) {
|
|
987
|
-
|
|
988
|
-
await this.processCheckpointAttestationFromPeer(p2pMessage.payload, msgId, source);
|
|
989
|
-
}
|
|
991
|
+
await this.processCheckpointAttestationFromPeer(p2pMessage.payload, msgId, source);
|
|
990
992
|
} else if (msg.topic === this.topicStrings[TopicType.block_proposal]) {
|
|
991
993
|
await this.processBlockFromPeer(p2pMessage.payload, msgId, source);
|
|
992
994
|
} else if (msg.topic === this.topicStrings[TopicType.checkpoint_proposal]) {
|
|
@@ -1054,26 +1056,71 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1054
1056
|
async handleGossipedTx(payloadData, msgId, source) {
|
|
1055
1057
|
const validationFunc = async ()=>{
|
|
1056
1058
|
const tx = Tx.fromBuffer(payloadData);
|
|
1057
|
-
const
|
|
1058
|
-
const
|
|
1059
|
+
const currentBlockNumber = await this.archiver.getBlockNumber();
|
|
1060
|
+
const { ts: nextSlotTimestamp } = this.epochCache.getEpochAndSlotInNextL1Slot();
|
|
1061
|
+
// Stage 1: fast validators (metadata, data, timestamps, double-spend, gas, phases, block header)
|
|
1062
|
+
const firstStageValidators = await this.createFirstStageMessageValidators(currentBlockNumber, nextSlotTimestamp);
|
|
1063
|
+
const firstStageOutcome = await this.runValidations(tx, firstStageValidators);
|
|
1064
|
+
if (!firstStageOutcome.allPassed) {
|
|
1065
|
+
const { name } = firstStageOutcome.failure;
|
|
1066
|
+
let { severity } = firstStageOutcome.failure;
|
|
1067
|
+
// Double spend validator has a special case handler. We perform more detailed examination
|
|
1068
|
+
// as to how recently the nullifier was entered into the tree and if the transaction should
|
|
1069
|
+
// have 'known' the nullifier existed. This determines the severity of the penalty applied to the peer.
|
|
1070
|
+
if (name === 'doubleSpendValidator') {
|
|
1071
|
+
const txBlockNumber = BlockNumber(currentBlockNumber + 1);
|
|
1072
|
+
severity = await this.handleDoubleSpendFailure(tx, txBlockNumber);
|
|
1073
|
+
}
|
|
1074
|
+
this.peerManager.penalizePeer(source, severity);
|
|
1075
|
+
return {
|
|
1076
|
+
result: TopicValidatorResult.Reject
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
// Pool pre-check: see if the pool would accept this tx before doing expensive proof verification
|
|
1080
|
+
const canAdd = await this.mempools.txPool.canAddPendingTx(tx);
|
|
1081
|
+
if (canAdd === 'ignored') {
|
|
1082
|
+
return {
|
|
1083
|
+
result: TopicValidatorResult.Ignore,
|
|
1084
|
+
obj: tx
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
// Stage 2: expensive proof verification
|
|
1088
|
+
const secondStageValidators = this.createSecondStageMessageValidators();
|
|
1089
|
+
const secondStageOutcome = await this.runValidations(tx, secondStageValidators);
|
|
1090
|
+
if (!secondStageOutcome.allPassed) {
|
|
1091
|
+
const { severity } = secondStageOutcome.failure;
|
|
1092
|
+
this.peerManager.penalizePeer(source, severity);
|
|
1093
|
+
return {
|
|
1094
|
+
result: TopicValidatorResult.Reject
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
// Pool add: persist the tx
|
|
1098
|
+
const txHash = tx.getTxHash();
|
|
1099
|
+
const addResult = await this.mempools.txPool.addPendingTxs([
|
|
1100
|
+
tx
|
|
1101
|
+
], {
|
|
1102
|
+
source: 'gossip'
|
|
1103
|
+
});
|
|
1104
|
+
const wasAccepted = addResult.accepted.some((h)=>h.equals(txHash));
|
|
1105
|
+
const wasIgnored = addResult.ignored.some((h)=>h.equals(txHash));
|
|
1059
1106
|
this.logger.trace(`Validate propagated tx`, {
|
|
1060
|
-
|
|
1061
|
-
|
|
1107
|
+
wasAccepted,
|
|
1108
|
+
wasIgnored,
|
|
1062
1109
|
[Attributes.P2P_ID]: source.toString()
|
|
1063
1110
|
});
|
|
1064
|
-
if (
|
|
1111
|
+
if (wasAccepted) {
|
|
1065
1112
|
return {
|
|
1066
|
-
result: TopicValidatorResult.
|
|
1113
|
+
result: TopicValidatorResult.Accept,
|
|
1114
|
+
obj: tx
|
|
1067
1115
|
};
|
|
1068
|
-
} else if (
|
|
1116
|
+
} else if (wasIgnored) {
|
|
1069
1117
|
return {
|
|
1070
1118
|
result: TopicValidatorResult.Ignore,
|
|
1071
1119
|
obj: tx
|
|
1072
1120
|
};
|
|
1073
1121
|
} else {
|
|
1074
1122
|
return {
|
|
1075
|
-
result: TopicValidatorResult.
|
|
1076
|
-
obj: tx
|
|
1123
|
+
result: TopicValidatorResult.Reject
|
|
1077
1124
|
};
|
|
1078
1125
|
}
|
|
1079
1126
|
};
|
|
@@ -1081,20 +1128,14 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1081
1128
|
if (result !== TopicValidatorResult.Accept || !tx) {
|
|
1082
1129
|
return;
|
|
1083
1130
|
}
|
|
1131
|
+
// Tx was accepted into pool and will be propagated - just log and record metrics
|
|
1084
1132
|
const txHash = tx.getTxHash();
|
|
1085
1133
|
const txHashString = txHash.toString();
|
|
1086
1134
|
this.logger.verbose(`Received tx ${txHashString} from external peer ${source.toString()} via gossip`, {
|
|
1087
1135
|
source: source.toString(),
|
|
1088
1136
|
txHash: txHashString
|
|
1089
1137
|
});
|
|
1090
|
-
if (this.config.dropTransactions && randomInt(1000) < this.config.dropTransactionsProbability * 1000) {
|
|
1091
|
-
this.logger.warn(`Intentionally dropping tx ${txHashString} (probability rule)`);
|
|
1092
|
-
return;
|
|
1093
|
-
}
|
|
1094
1138
|
this.instrumentation.incrementTxReceived(1);
|
|
1095
|
-
await this.mempools.txPool.addTxs([
|
|
1096
|
-
tx
|
|
1097
|
-
]);
|
|
1098
1139
|
}
|
|
1099
1140
|
/**
|
|
1100
1141
|
* Process a checkpoint attestation from a peer.
|
|
@@ -1126,38 +1167,56 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1126
1167
|
obj: attestation
|
|
1127
1168
|
};
|
|
1128
1169
|
}
|
|
1129
|
-
// Get committee size for the attestation's slot
|
|
1130
|
-
const slot = attestation.payload.header.slotNumber;
|
|
1131
|
-
const { committee } = await this.epochCache.getCommittee(slot);
|
|
1132
|
-
const committeeSize = committee?.length ?? 0;
|
|
1133
1170
|
// Try to add the attestation: this handles existence check, cap check, and adding in one call
|
|
1134
|
-
|
|
1171
|
+
// count is the number of attestations by this signer for this slot (for duplicate detection)
|
|
1172
|
+
const slot = attestation.payload.header.slotNumber;
|
|
1173
|
+
const { added, alreadyExists, count } = await this.mempools.attestationPool.tryAddCheckpointAttestation(attestation);
|
|
1135
1174
|
this.logger.trace(`Validate propagated checkpoint attestation`, {
|
|
1136
1175
|
added,
|
|
1137
1176
|
alreadyExists,
|
|
1177
|
+
count,
|
|
1138
1178
|
[Attributes.SLOT_NUMBER]: slot.toString(),
|
|
1139
1179
|
[Attributes.P2P_ID]: peerId.toString()
|
|
1140
1180
|
});
|
|
1141
|
-
//
|
|
1181
|
+
// Exact same attestation received, no need to re-broadcast
|
|
1142
1182
|
if (alreadyExists) {
|
|
1143
1183
|
return {
|
|
1144
1184
|
result: TopicValidatorResult.Ignore,
|
|
1145
1185
|
obj: attestation
|
|
1146
1186
|
};
|
|
1147
1187
|
}
|
|
1148
|
-
// Could not add (cap reached), no need to re-broadcast
|
|
1188
|
+
// Could not add (cap reached for signer), no need to re-broadcast
|
|
1149
1189
|
if (!added) {
|
|
1150
|
-
this.logger.warn(`Dropping checkpoint attestation due to
|
|
1190
|
+
this.logger.warn(`Dropping checkpoint attestation due to cap`, {
|
|
1151
1191
|
slot: slot.toString(),
|
|
1152
1192
|
archive: attestation.archive.toString(),
|
|
1153
|
-
source: peerId.toString()
|
|
1193
|
+
source: peerId.toString(),
|
|
1194
|
+
attester: attestation.getSender()?.toString(),
|
|
1195
|
+
count
|
|
1154
1196
|
});
|
|
1155
1197
|
return {
|
|
1156
1198
|
result: TopicValidatorResult.Ignore,
|
|
1157
1199
|
obj: attestation
|
|
1158
1200
|
};
|
|
1159
1201
|
}
|
|
1160
|
-
//
|
|
1202
|
+
// Check if this is a duplicate attestation (signer attested to a different proposal at the same slot)
|
|
1203
|
+
// count is the number of attestations by this signer for this slot
|
|
1204
|
+
if (count === 2) {
|
|
1205
|
+
const attester = attestation.getSender();
|
|
1206
|
+
if (attester) {
|
|
1207
|
+
this.logger.warn(`Detected duplicate attestation (equivocation) at slot ${slot}`, {
|
|
1208
|
+
slot: slot.toString(),
|
|
1209
|
+
archive: attestation.archive.toString(),
|
|
1210
|
+
source: peerId.toString(),
|
|
1211
|
+
attester: attester.toString()
|
|
1212
|
+
});
|
|
1213
|
+
this.duplicateAttestationCallback?.({
|
|
1214
|
+
slot,
|
|
1215
|
+
attester
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
// Attestation was added successfully - accept it so other nodes can also detect the equivocation
|
|
1161
1220
|
return {
|
|
1162
1221
|
result: TopicValidatorResult.Accept,
|
|
1163
1222
|
obj: attestation
|
|
@@ -1187,8 +1246,8 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1187
1246
|
};
|
|
1188
1247
|
}
|
|
1189
1248
|
// Try to add the proposal: this handles existence check, cap check, and adding in one call
|
|
1190
|
-
const { added, alreadyExists,
|
|
1191
|
-
const isEquivocated =
|
|
1249
|
+
const { added, alreadyExists, count } = await this.mempools.attestationPool.tryAddBlockProposal(block);
|
|
1250
|
+
const isEquivocated = count !== undefined && count > 1;
|
|
1192
1251
|
// Duplicate proposal received, no need to re-broadcast
|
|
1193
1252
|
if (alreadyExists) {
|
|
1194
1253
|
this.logger.debug(`Ignoring duplicate block proposal received`, {
|
|
@@ -1211,7 +1270,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1211
1270
|
this.logger.warn(`Penalizing peer for block proposal exceeding per-position cap`, {
|
|
1212
1271
|
...block.toBlockInfo(),
|
|
1213
1272
|
indexWithinCheckpoint: block.indexWithinCheckpoint,
|
|
1214
|
-
|
|
1273
|
+
count,
|
|
1215
1274
|
proposer: block.getSender()?.toString(),
|
|
1216
1275
|
source: peerId.toString()
|
|
1217
1276
|
});
|
|
@@ -1232,7 +1291,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1232
1291
|
proposer: proposer?.toString()
|
|
1233
1292
|
});
|
|
1234
1293
|
// Invoke the duplicate callback on the first duplicate spotted only
|
|
1235
|
-
if (proposer &&
|
|
1294
|
+
if (proposer && count === 2) {
|
|
1236
1295
|
this.duplicateProposalCallback?.({
|
|
1237
1296
|
slot: block.slotNumber,
|
|
1238
1297
|
proposer,
|
|
@@ -1262,8 +1321,8 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1262
1321
|
source: sender.toString(),
|
|
1263
1322
|
...block.toBlockInfo()
|
|
1264
1323
|
});
|
|
1265
|
-
// Mark the txs in this proposal as
|
|
1266
|
-
await this.mempools.txPool.
|
|
1324
|
+
// Mark the txs in this proposal as protected
|
|
1325
|
+
await this.mempools.txPool.protectTxs(block.txHashes, block.blockHeader);
|
|
1267
1326
|
// Call the block received callback to validate the proposal.
|
|
1268
1327
|
// Note: Validators do NOT attest to individual blocks, only to checkpoint proposals.
|
|
1269
1328
|
const isValid = await this.blockReceivedCallback(block, sender);
|
|
@@ -1330,8 +1389,8 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1330
1389
|
// Try to add the checkpoint proposal core: this handles existence check, cap check, and adding in one call
|
|
1331
1390
|
const checkpointCore = checkpoint.toCore();
|
|
1332
1391
|
const tryAddResult = await this.mempools.attestationPool.tryAddCheckpointProposal(checkpointCore);
|
|
1333
|
-
const { added, alreadyExists,
|
|
1334
|
-
const isEquivocated =
|
|
1392
|
+
const { added, alreadyExists, count } = tryAddResult;
|
|
1393
|
+
const isEquivocated = count !== undefined && count > 1;
|
|
1335
1394
|
// Duplicate proposal received, do not re-broadcast
|
|
1336
1395
|
if (alreadyExists) {
|
|
1337
1396
|
this.logger.debug(`Ignoring duplicate checkpoint proposal received`, {
|
|
@@ -1353,7 +1412,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1353
1412
|
this.peerManager.penalizePeer(peerId, PeerErrorSeverity.HighToleranceError);
|
|
1354
1413
|
this.logger.warn(`Penalizing peer for checkpoint proposal exceeding per-slot cap`, {
|
|
1355
1414
|
...checkpoint.toCheckpointInfo(),
|
|
1356
|
-
|
|
1415
|
+
count,
|
|
1357
1416
|
source: peerId.toString()
|
|
1358
1417
|
});
|
|
1359
1418
|
return {
|
|
@@ -1375,7 +1434,7 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1375
1434
|
proposer: proposer?.toString()
|
|
1376
1435
|
});
|
|
1377
1436
|
// Invoke the duplicate callback on the first duplicate spotted only
|
|
1378
|
-
if (proposer &&
|
|
1437
|
+
if (proposer && count === 2) {
|
|
1379
1438
|
this.duplicateProposalCallback?.({
|
|
1380
1439
|
slot: checkpoint.slotNumber,
|
|
1381
1440
|
proposer,
|
|
@@ -1586,33 +1645,11 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1586
1645
|
}
|
|
1587
1646
|
}
|
|
1588
1647
|
createRequestedTxValidator() {
|
|
1589
|
-
return
|
|
1648
|
+
return createTxValidatorForReqResponseReceivedTxs(this.proofVerifier, {
|
|
1590
1649
|
l1ChainId: this.config.l1ChainId,
|
|
1591
1650
|
rollupVersion: this.config.rollupVersion
|
|
1592
1651
|
});
|
|
1593
1652
|
}
|
|
1594
|
-
async validatePropagatedTx(tx, peerId) {
|
|
1595
|
-
const currentBlockNumber = await this.archiver.getBlockNumber();
|
|
1596
|
-
// We accept transactions if they are not expired by the next slot (checked based on the IncludeByTimestamp field)
|
|
1597
|
-
const { ts: nextSlotTimestamp } = this.epochCache.getEpochAndSlotInNextL1Slot();
|
|
1598
|
-
const messageValidators = await this.createMessageValidators(currentBlockNumber, nextSlotTimestamp);
|
|
1599
|
-
for (const validator of messageValidators){
|
|
1600
|
-
const outcome = await this.runValidations(tx, validator);
|
|
1601
|
-
if (outcome.allPassed) {
|
|
1602
|
-
continue;
|
|
1603
|
-
}
|
|
1604
|
-
const { name } = outcome.failure;
|
|
1605
|
-
let { severity } = outcome.failure;
|
|
1606
|
-
// Double spend validator has a special case handler
|
|
1607
|
-
if (name === 'doubleSpendValidator') {
|
|
1608
|
-
const txBlockNumber = BlockNumber(currentBlockNumber + 1); // tx is expected to be in the next block
|
|
1609
|
-
severity = await this.handleDoubleSpendFailure(tx, txBlockNumber);
|
|
1610
|
-
}
|
|
1611
|
-
this.peerManager.penalizePeer(peerId, severity);
|
|
1612
|
-
return false;
|
|
1613
|
-
}
|
|
1614
|
-
return true;
|
|
1615
|
-
}
|
|
1616
1653
|
async getGasFees(blockNumber) {
|
|
1617
1654
|
if (blockNumber === this.feesCache?.blockNumber) {
|
|
1618
1655
|
return this.feesCache.gasFees;
|
|
@@ -1639,38 +1676,30 @@ _dec = trackSpan('Libp2pService.validateAndStoreCheckpointAttestation', (_peerId
|
|
|
1639
1676
|
peerScoring: this.peerManager
|
|
1640
1677
|
};
|
|
1641
1678
|
}
|
|
1642
|
-
async
|
|
1643
|
-
const
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
await Promise.all(txs.map(async (tx)=>{
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
if (!outcome.allPassed) {
|
|
1651
|
-
throw new Error('Invalid tx detected', {
|
|
1652
|
-
cause: {
|
|
1653
|
-
outcome
|
|
1654
|
-
}
|
|
1655
|
-
});
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1679
|
+
async validateTxsReceivedInBlockProposal(txs) {
|
|
1680
|
+
const validator = createTxValidatorForBlockProposalReceivedTxs(this.proofVerifier, {
|
|
1681
|
+
l1ChainId: this.config.l1ChainId,
|
|
1682
|
+
rollupVersion: this.config.rollupVersion
|
|
1683
|
+
}, this.logger.getBindings());
|
|
1684
|
+
const results = await Promise.all(txs.map(async (tx)=>{
|
|
1685
|
+
const result = await validator.validateTx(tx);
|
|
1686
|
+
return result.result !== 'invalid';
|
|
1658
1687
|
}));
|
|
1688
|
+
if (results.some((value)=>value === false)) {
|
|
1689
|
+
throw new Error('Invalid tx detected');
|
|
1690
|
+
}
|
|
1659
1691
|
}
|
|
1660
|
-
/**
|
|
1661
|
-
* Create message validators for the given block number and timestamp.
|
|
1662
|
-
*
|
|
1663
|
-
* Each validator is a pair of a validator and a severity.
|
|
1664
|
-
* If a validator fails, the peer is penalized with the severity of the validator.
|
|
1665
|
-
*
|
|
1666
|
-
* @param currentBlockNumber - The current synced block number.
|
|
1667
|
-
* @param nextSlotTimestamp - The timestamp of the next slot (used to validate txs are not expired).
|
|
1668
|
-
* @returns The message validators.
|
|
1669
|
-
*/ async createMessageValidators(currentBlockNumber, nextSlotTimestamp) {
|
|
1692
|
+
/** Creates the first stage (fast) validators for gossiped transactions. */ async createFirstStageMessageValidators(currentBlockNumber, nextSlotTimestamp) {
|
|
1670
1693
|
const gasFees = await this.getGasFees(currentBlockNumber);
|
|
1671
|
-
const allowedInSetup =
|
|
1672
|
-
|
|
1673
|
-
|
|
1694
|
+
const allowedInSetup = [
|
|
1695
|
+
...await getDefaultAllowedSetupFunctions(),
|
|
1696
|
+
...this.config.txPublicSetupAllowListExtend ?? []
|
|
1697
|
+
];
|
|
1698
|
+
const blockNumber = BlockNumber(currentBlockNumber + 1);
|
|
1699
|
+
return createFirstStageTxValidationsForGossipedTransactions(nextSlotTimestamp, blockNumber, this.worldStateSynchronizer, gasFees, this.config.l1ChainId, this.config.rollupVersion, protocolContractsHash, this.archiver, !this.config.disableTransactions, allowedInSetup, this.logger.getBindings());
|
|
1700
|
+
}
|
|
1701
|
+
/** Creates the second stage (expensive proof verification) validators for gossiped transactions. */ createSecondStageMessageValidators() {
|
|
1702
|
+
return createSecondStageTxValidationsForGossipedTransactions(this.proofVerifier, this.logger.getBindings());
|
|
1674
1703
|
}
|
|
1675
1704
|
/**
|
|
1676
1705
|
* Run validations on a tx.
|
|
@@ -6,6 +6,7 @@ export declare class PeerManagerMetrics {
|
|
|
6
6
|
private sentGoodbyes;
|
|
7
7
|
private receivedGoodbyes;
|
|
8
8
|
private peerCount;
|
|
9
|
+
private healthyPeerCount;
|
|
9
10
|
private lowScoreDisconnects;
|
|
10
11
|
private peerConnectionDuration;
|
|
11
12
|
private peerConnectedAt;
|
|
@@ -14,8 +15,9 @@ export declare class PeerManagerMetrics {
|
|
|
14
15
|
recordGoodbyeSent(reason: GoodByeReason): void;
|
|
15
16
|
recordGoodbyeReceived(reason: GoodByeReason): void;
|
|
16
17
|
recordPeerCount(count: number): void;
|
|
18
|
+
recordHealthyPeerCount(count: number): void;
|
|
17
19
|
recordLowScoreDisconnect(scoreState: 'Banned' | 'Disconnect'): void;
|
|
18
20
|
peerConnected(id: PeerId): void;
|
|
19
21
|
peerDisconnected(id: PeerId): void;
|
|
20
22
|
}
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0cmljcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NlcnZpY2VzL3BlZXItbWFuYWdlci9tZXRyaWNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFLTCxLQUFLLGVBQWUsRUFDcEIsS0FBSyxNQUFNLEVBSVosTUFBTSx5QkFBeUIsQ0FBQztBQUVqQyxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUVoRCxPQUFPLEVBQUUsYUFBYSxFQUF1QixNQUFNLCtCQUErQixDQUFDO0FBRW5GLHFCQUFhLGtCQUFrQjthQWFYLGVBQWUsRUFBRSxlQUFlO0lBWmxELE9BQU8sQ0FBQyxZQUFZLENBQWdCO0lBQ3BDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBZ0I7SUFDeEMsT0FBTyxDQUFDLFNBQVMsQ0FBUTtJQUN6QixPQUFPLENBQUMsZ0JBQWdCLENBQVE7SUFDaEMsT0FBTyxDQUFDLG1CQUFtQixDQUFnQjtJQUMzQyxPQUFPLENBQUMsc0JBQXNCLENBQVk7SUFFMUMsT0FBTyxDQUFDLGVBQWUsQ0FBa0Q7SUFFekUsU0FBZ0IsTUFBTSxFQUFFLE1BQU0sQ0FBQztJQUUvQixZQUNrQixlQUFlLEdBQUUsZUFBc0MsRUFDdkUsSUFBSSxTQUFnQixFQTJCckI7SUFFTSxpQkFBaUIsQ0FBQyxNQUFNLEVBQUUsYUFBYSxRQUU3QztJQUVNLHFCQUFxQixDQUFDLE1BQU0sRUFBRSxhQUFhLFFBRWpEO0lBRU0sZUFBZSxDQUFDLEtBQUssRUFBRSxNQUFNLFFBRW5DO0lBRU0sc0JBQXNCLENBQUMsS0FBSyxFQUFFLE1BQU0sUUFFMUM7SUFFTSx3QkFBd0IsQ0FBQyxVQUFVLEVBQUUsUUFBUSxHQUFHLFlBQVksUUFFbEU7SUFFTSxhQUFhLENBQUMsRUFBRSxFQUFFLE1BQU0sUUFFOUI7SUFFTSxnQkFBZ0IsQ0FBQyxFQUFFLEVBQUUsTUFBTSxRQU1qQztDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/services/peer-manager/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EAIZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AAEnF,qBAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/services/peer-manager/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EAIZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AAEnF,qBAAa,kBAAkB;aAaX,eAAe,EAAE,eAAe;IAZlD,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,gBAAgB,CAAgB;IACxC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,sBAAsB,CAAY;IAE1C,OAAO,CAAC,eAAe,CAAkD;IAEzE,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,YACkB,eAAe,GAAE,eAAsC,EACvE,IAAI,SAAgB,EA2BrB;IAEM,iBAAiB,CAAC,MAAM,EAAE,aAAa,QAE7C;IAEM,qBAAqB,CAAC,MAAM,EAAE,aAAa,QAEjD;IAEM,eAAe,CAAC,KAAK,EAAE,MAAM,QAEnC;IAEM,sBAAsB,CAAC,KAAK,EAAE,MAAM,QAE1C;IAEM,wBAAwB,CAAC,UAAU,EAAE,QAAQ,GAAG,YAAY,QAElE;IAEM,aAAa,CAAC,EAAE,EAAE,MAAM,QAE9B;IAEM,gBAAgB,CAAC,EAAE,EAAE,MAAM,QAMjC;CACF"}
|
|
@@ -5,6 +5,7 @@ export class PeerManagerMetrics {
|
|
|
5
5
|
sentGoodbyes;
|
|
6
6
|
receivedGoodbyes;
|
|
7
7
|
peerCount;
|
|
8
|
+
healthyPeerCount;
|
|
8
9
|
lowScoreDisconnects;
|
|
9
10
|
peerConnectionDuration;
|
|
10
11
|
peerConnectedAt;
|
|
@@ -27,6 +28,7 @@ export class PeerManagerMetrics {
|
|
|
27
28
|
this.sentGoodbyes = createUpDownCounterWithDefault(meter, Metrics.PEER_MANAGER_GOODBYES_SENT, goodbyeReasonAttrs);
|
|
28
29
|
this.receivedGoodbyes = createUpDownCounterWithDefault(meter, Metrics.PEER_MANAGER_GOODBYES_RECEIVED, goodbyeReasonAttrs);
|
|
29
30
|
this.peerCount = meter.createGauge(Metrics.PEER_MANAGER_PEER_COUNT);
|
|
31
|
+
this.healthyPeerCount = meter.createGauge(Metrics.PEER_MANAGER_HEALTHY_PEER_COUNT);
|
|
30
32
|
this.lowScoreDisconnects = createUpDownCounterWithDefault(meter, Metrics.PEER_MANAGER_LOW_SCORE_DISCONNECTS, {
|
|
31
33
|
[Attributes.P2P_PEER_SCORE_STATE]: [
|
|
32
34
|
'Banned',
|
|
@@ -48,6 +50,9 @@ export class PeerManagerMetrics {
|
|
|
48
50
|
recordPeerCount(count) {
|
|
49
51
|
this.peerCount.record(count);
|
|
50
52
|
}
|
|
53
|
+
recordHealthyPeerCount(count) {
|
|
54
|
+
this.healthyPeerCount.record(count);
|
|
55
|
+
}
|
|
51
56
|
recordLowScoreDisconnect(scoreState) {
|
|
52
57
|
this.lowScoreDisconnects.add(1, {
|
|
53
58
|
[Attributes.P2P_PEER_SCORE_STATE]: scoreState
|
|
@@ -60,6 +65,7 @@ export class PeerManagerMetrics {
|
|
|
60
65
|
const connectedAt = this.peerConnectedAt.get(id.toString());
|
|
61
66
|
if (connectedAt) {
|
|
62
67
|
this.peerConnectionDuration.record(Date.now() - connectedAt);
|
|
68
|
+
this.peerConnectedAt.delete(id.toString());
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
}
|
|
@@ -171,4 +171,4 @@ export declare class PeerManager implements PeerManagerInterface {
|
|
|
171
171
|
handleAuthRequestFromPeer(_authRequest: AuthRequest, peerId: PeerId): Promise<StatusMessage>;
|
|
172
172
|
private updateAuthenticatedPeers;
|
|
173
173
|
}
|
|
174
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
174
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVlcl9tYW5hZ2VyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2VydmljZXMvcGVlci1tYW5hZ2VyL3BlZXJfbWFuYWdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxtQkFBbUIsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRzlELE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUEr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@ -406,7 +406,8 @@ export class PeerManager {
|
|
|
406
406
|
cachedPeers: this.cachedPeers.size,
|
|
407
407
|
...this.peerScoring.getStats()
|
|
408
408
|
});
|
|
409
|
-
this.metrics.recordPeerCount(
|
|
409
|
+
this.metrics.recordPeerCount(connections.length);
|
|
410
|
+
this.metrics.recordHealthyPeerCount(healthyConnections.length);
|
|
410
411
|
// Exit if no peers to connect
|
|
411
412
|
if (peersToConnect <= 0) {
|
|
412
413
|
return;
|