@aztec/p2p 5.0.0-private.20260319 → 5.0.0-rc.2
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/README.md +4 -1
- package/dest/bootstrap/bootstrap.d.ts +1 -1
- package/dest/bootstrap/bootstrap.d.ts.map +1 -1
- package/dest/bootstrap/bootstrap.js +22 -6
- package/dest/client/factory.d.ts +4 -3
- package/dest/client/factory.d.ts.map +1 -1
- package/dest/client/factory.js +33 -24
- package/dest/client/interface.d.ts +43 -11
- package/dest/client/interface.d.ts.map +1 -1
- package/dest/client/p2p_client.d.ts +33 -19
- package/dest/client/p2p_client.d.ts.map +1 -1
- package/dest/client/p2p_client.js +100 -44
- package/dest/config.d.ts +137 -107
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +64 -23
- package/dest/errors/p2p-service.error.d.ts +9 -0
- package/dest/errors/p2p-service.error.d.ts.map +1 -0
- package/dest/errors/p2p-service.error.js +10 -0
- package/dest/errors/reqresp.error.d.ts +1 -20
- package/dest/errors/reqresp.error.d.ts.map +1 -1
- package/dest/errors/reqresp.error.js +0 -21
- package/dest/index.d.ts +1 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +0 -1
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +98 -56
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/attestation_pool.js +265 -196
- 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 +175 -59
- package/dest/mem_pools/attestation_pool/mocks.d.ts +1 -1
- package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/mocks.js +6 -4
- package/dest/mem_pools/index.d.ts +1 -2
- package/dest/mem_pools/index.d.ts.map +1 -1
- package/dest/mem_pools/instrumentation.d.ts +1 -1
- package/dest/mem_pools/instrumentation.d.ts.map +1 -1
- package/dest/mem_pools/instrumentation.js +17 -1
- package/dest/mem_pools/tx_pool_v2/archive/tx_archive.d.ts +1 -5
- package/dest/mem_pools/tx_pool_v2/archive/tx_archive.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/archive/tx_archive.js +1 -7
- package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts +3 -3
- package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/deleted_pool.js +6 -6
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.js +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts +2 -1
- 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 -0
- package/dest/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.d.ts +16 -0
- package/dest/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.js +62 -0
- package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.js +2 -2
- package/dest/mem_pools/tx_pool_v2/interfaces.d.ts +22 -5
- package/dest/mem_pools/tx_pool_v2/interfaces.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts +5 -2
- package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_metadata.js +13 -6
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts +7 -1
- 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 +10 -0
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts +8 -3
- 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 +7 -4
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts +8 -3
- 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 +153 -111
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts +10 -3
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts.map +1 -1
- package/dest/msg_validators/attestation_validator/attestation_validator.js +38 -16
- package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.d.ts +7 -3
- package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.d.ts.map +1 -1
- package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.js +4 -5
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts +8 -3
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/block_proposal_validator.js +2 -2
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts +8 -3
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.js +8 -2
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts +25 -3
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/proposal_validator.js +77 -14
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts +1 -1
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.js +8 -15
- package/dest/msg_validators/tx_validator/allowed_public_setup.js +3 -3
- package/dest/msg_validators/tx_validator/archive_cache.js +1 -1
- package/dest/msg_validators/tx_validator/cached_tx_validator.d.ts +15 -0
- package/dest/msg_validators/tx_validator/cached_tx_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/cached_tx_validator.js +19 -0
- package/dest/msg_validators/tx_validator/contract_instance_validator.d.ts +9 -0
- package/dest/msg_validators/tx_validator/contract_instance_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/contract_instance_validator.js +48 -0
- package/dest/msg_validators/tx_validator/data_validator.d.ts +2 -1
- package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/data_validator.js +36 -2
- package/dest/msg_validators/tx_validator/factory.d.ts +14 -15
- package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/factory.js +36 -17
- package/dest/msg_validators/tx_validator/gas_validator.d.ts +47 -10
- package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/gas_validator.js +65 -48
- package/dest/msg_validators/tx_validator/index.d.ts +3 -1
- package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/index.js +2 -0
- package/dest/msg_validators/tx_validator/phases_validator.js +3 -3
- package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts +2 -1
- package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/tx_proof_validator.js +2 -0
- package/dest/msg_validators/tx_validator/tx_validation_cache.d.ts +48 -0
- package/dest/msg_validators/tx_validator/tx_validation_cache.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/tx_validation_cache.js +68 -0
- package/dest/services/data_store.d.ts +1 -1
- package/dest/services/data_store.d.ts.map +1 -1
- package/dest/services/data_store.js +5 -5
- package/dest/services/discv5/discV5_service.d.ts +13 -2
- package/dest/services/discv5/discV5_service.d.ts.map +1 -1
- package/dest/services/discv5/discV5_service.js +119 -23
- package/dest/services/discv5/persisted_enr_store.d.ts +38 -0
- package/dest/services/discv5/persisted_enr_store.d.ts.map +1 -0
- package/dest/services/discv5/persisted_enr_store.js +145 -0
- package/dest/services/dummy_service.d.ts +15 -15
- package/dest/services/dummy_service.d.ts.map +1 -1
- package/dest/services/dummy_service.js +15 -16
- package/dest/services/encoding.d.ts +8 -8
- package/dest/services/encoding.d.ts.map +1 -1
- package/dest/services/encoding.js +11 -15
- package/dest/services/gossipsub/topic_score_params.d.ts +6 -12
- package/dest/services/gossipsub/topic_score_params.d.ts.map +1 -1
- package/dest/services/gossipsub/topic_score_params.js +4 -14
- package/dest/services/libp2p/instrumentation.d.ts +3 -1
- package/dest/services/libp2p/instrumentation.d.ts.map +1 -1
- package/dest/services/libp2p/instrumentation.js +14 -0
- package/dest/services/libp2p/libp2p_service.d.ts +44 -39
- package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
- package/dest/services/libp2p/libp2p_service.js +383 -278
- package/dest/services/peer-manager/peer_manager.d.ts +20 -3
- package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
- package/dest/services/peer-manager/peer_manager.js +79 -23
- package/dest/services/peer-manager/peer_scoring.d.ts +34 -2
- package/dest/services/peer-manager/peer_scoring.d.ts.map +1 -1
- package/dest/services/peer-manager/peer_scoring.js +102 -13
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts +1 -8
- 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 +38 -44
- package/dest/services/reqresp/batch-tx-requester/interface.d.ts +8 -5
- package/dest/services/reqresp/batch-tx-requester/interface.d.ts.map +1 -1
- package/dest/services/reqresp/batch-tx-requester/tx_validator.d.ts +5 -14
- package/dest/services/reqresp/batch-tx-requester/tx_validator.d.ts.map +1 -1
- package/dest/services/reqresp/batch-tx-requester/tx_validator.js +6 -20
- package/dest/services/reqresp/config.d.ts +3 -3
- package/dest/services/reqresp/config.d.ts.map +1 -1
- package/dest/services/reqresp/interface.d.ts +16 -18
- package/dest/services/reqresp/interface.d.ts.map +1 -1
- package/dest/services/reqresp/interface.js +10 -20
- package/dest/services/reqresp/metrics.d.ts +1 -1
- package/dest/services/reqresp/metrics.d.ts.map +1 -1
- package/dest/services/reqresp/metrics.js +0 -1
- package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts +4 -3
- package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/block_txs/bitvector.js +3 -2
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts +1 -1
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.js +31 -28
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +12 -7
- 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 +42 -24
- package/dest/services/reqresp/protocols/index.d.ts +1 -2
- package/dest/services/reqresp/protocols/index.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/index.js +0 -1
- package/dest/services/reqresp/protocols/tx.d.ts +1 -1
- package/dest/services/reqresp/protocols/tx.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/tx.js +1 -3
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts +5 -4
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts.map +1 -1
- package/dest/services/reqresp/rate-limiter/rate_limiter.js +10 -8
- package/dest/services/reqresp/rate-limiter/rate_limits.d.ts +1 -1
- package/dest/services/reqresp/rate-limiter/rate_limits.d.ts.map +1 -1
- package/dest/services/reqresp/rate-limiter/rate_limits.js +0 -10
- package/dest/services/reqresp/reqresp.d.ts +7 -29
- package/dest/services/reqresp/reqresp.d.ts.map +1 -1
- package/dest/services/reqresp/reqresp.js +26 -207
- package/dest/services/service.d.ts +25 -12
- package/dest/services/service.d.ts.map +1 -1
- package/dest/services/tx_collection/config.d.ts +2 -23
- package/dest/services/tx_collection/config.d.ts.map +1 -1
- package/dest/services/tx_collection/config.js +2 -55
- package/dest/services/tx_collection/file_store_tx_collection.d.ts +12 -28
- package/dest/services/tx_collection/file_store_tx_collection.d.ts.map +1 -1
- package/dest/services/tx_collection/file_store_tx_collection.js +43 -83
- package/dest/services/tx_collection/file_store_tx_source.d.ts +5 -4
- package/dest/services/tx_collection/file_store_tx_source.d.ts.map +1 -1
- package/dest/services/tx_collection/file_store_tx_source.js +39 -29
- package/dest/services/tx_collection/index.d.ts +2 -3
- package/dest/services/tx_collection/index.d.ts.map +1 -1
- package/dest/services/tx_collection/index.js +0 -1
- 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 +0 -2
- package/dest/services/tx_collection/tx_collection.d.ts +35 -51
- package/dest/services/tx_collection/tx_collection.d.ts.map +1 -1
- package/dest/services/tx_collection/tx_collection.js +275 -119
- package/dest/services/tx_collection/tx_collection_sink.d.ts +1 -1
- package/dest/services/tx_collection/tx_collection_sink.js +2 -2
- package/dest/services/tx_collection/tx_source.d.ts +6 -5
- package/dest/services/tx_collection/tx_source.d.ts.map +1 -1
- package/dest/services/tx_collection/tx_source.js +13 -8
- package/dest/services/tx_file_store/tx_file_store.d.ts +1 -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 +4 -14
- package/dest/services/tx_provider.d.ts +3 -1
- package/dest/services/tx_provider.d.ts.map +1 -1
- package/dest/services/tx_provider.js +3 -0
- package/dest/test-helpers/make-test-p2p-clients.d.ts +1 -1
- package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
- package/dest/test-helpers/make-test-p2p-clients.js +5 -2
- package/dest/test-helpers/mock-pubsub.d.ts +23 -9
- package/dest/test-helpers/mock-pubsub.d.ts.map +1 -1
- package/dest/test-helpers/mock-pubsub.js +44 -44
- package/dest/test-helpers/reqresp-nodes.d.ts +4 -5
- package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
- package/dest/test-helpers/reqresp-nodes.js +16 -18
- package/dest/test-helpers/test_tx_provider.d.ts +3 -1
- package/dest/test-helpers/test_tx_provider.d.ts.map +1 -1
- package/dest/test-helpers/test_tx_provider.js +3 -0
- package/dest/test-helpers/testbench-utils.d.ts +14 -14
- package/dest/test-helpers/testbench-utils.d.ts.map +1 -1
- package/dest/test-helpers/testbench-utils.js +25 -13
- package/dest/testbench/p2p_client_testbench_worker.d.ts +3 -5
- package/dest/testbench/p2p_client_testbench_worker.d.ts.map +1 -1
- package/dest/testbench/p2p_client_testbench_worker.js +102 -41
- package/dest/testbench/worker_client_manager.d.ts +10 -6
- package/dest/testbench/worker_client_manager.d.ts.map +1 -1
- package/dest/testbench/worker_client_manager.js +51 -9
- package/dest/util.d.ts +11 -6
- package/dest/util.d.ts.map +1 -1
- package/dest/util.js +35 -14
- package/dest/versioning.d.ts +3 -6
- package/dest/versioning.d.ts.map +1 -1
- package/dest/versioning.js +3 -24
- package/package.json +16 -16
- package/src/bootstrap/bootstrap.ts +17 -3
- package/src/client/factory.ts +52 -24
- package/src/client/interface.ts +38 -17
- package/src/client/p2p_client.ts +118 -76
- package/src/client/test/{tx_proposal_collector/README.md → p2p_client.batch_tx_requester.bench.README.md} +23 -53
- package/src/config.ts +130 -31
- package/src/errors/p2p-service.error.ts +11 -0
- package/src/errors/reqresp.error.ts +0 -25
- package/src/index.ts +0 -1
- package/src/mem_pools/attestation_pool/attestation_pool.ts +319 -238
- package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +198 -62
- package/src/mem_pools/attestation_pool/mocks.ts +13 -8
- package/src/mem_pools/index.ts +0 -3
- package/src/mem_pools/instrumentation.ts +5 -1
- package/src/mem_pools/tx_pool_v2/archive/tx_archive.ts +1 -9
- package/src/mem_pools/tx_pool_v2/deleted_pool.ts +7 -7
- package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.ts +1 -1
- package/src/mem_pools/tx_pool_v2/eviction/index.ts +1 -0
- package/src/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.ts +65 -0
- package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.ts +3 -3
- package/src/mem_pools/tx_pool_v2/interfaces.ts +18 -4
- package/src/mem_pools/tx_pool_v2/tx_metadata.ts +20 -8
- package/src/mem_pools/tx_pool_v2/tx_pool_indices.ts +12 -0
- package/src/mem_pools/tx_pool_v2/tx_pool_v2.ts +8 -4
- package/src/mem_pools/tx_pool_v2/tx_pool_v2_impl.ts +163 -117
- package/src/msg_validators/attestation_validator/attestation_validator.ts +46 -15
- package/src/msg_validators/attestation_validator/fisherman_attestation_validator.ts +15 -7
- package/src/msg_validators/proposal_validator/README.md +1 -1
- package/src/msg_validators/proposal_validator/block_proposal_validator.ts +15 -3
- package/src/msg_validators/proposal_validator/checkpoint_proposal_validator.ts +26 -3
- package/src/msg_validators/proposal_validator/proposal_validator.ts +89 -11
- package/src/msg_validators/tx_validator/README.md +13 -3
- package/src/msg_validators/tx_validator/aggregate_tx_validator.ts +3 -12
- package/src/msg_validators/tx_validator/allowed_public_setup.ts +3 -3
- package/src/msg_validators/tx_validator/archive_cache.ts +1 -1
- package/src/msg_validators/tx_validator/cached_tx_validator.ts +31 -0
- package/src/msg_validators/tx_validator/contract_instance_validator.ts +56 -0
- package/src/msg_validators/tx_validator/data_validator.ts +44 -1
- package/src/msg_validators/tx_validator/factory.ts +44 -20
- package/src/msg_validators/tx_validator/gas_validator.ts +99 -54
- package/src/msg_validators/tx_validator/index.ts +2 -0
- package/src/msg_validators/tx_validator/phases_validator.ts +3 -3
- package/src/msg_validators/tx_validator/tx_proof_validator.ts +2 -0
- package/src/msg_validators/tx_validator/tx_validation_cache.ts +101 -0
- package/src/services/data_store.ts +5 -13
- package/src/services/discv5/discV5_service.ts +126 -14
- package/src/services/discv5/persisted_enr_store.ts +158 -0
- package/src/services/dummy_service.ts +20 -39
- package/src/services/encoding.ts +11 -21
- package/src/services/gossipsub/README.md +33 -11
- package/src/services/gossipsub/topic_score_params.ts +9 -18
- package/src/services/libp2p/instrumentation.ts +14 -0
- package/src/services/libp2p/libp2p_service.ts +436 -311
- package/src/services/peer-manager/peer_manager.ts +86 -22
- package/src/services/peer-manager/peer_scoring.ts +102 -8
- package/src/services/reqresp/README.md +0 -14
- package/src/services/reqresp/batch-tx-requester/batch_tx_requester.ts +42 -52
- package/src/services/reqresp/batch-tx-requester/interface.ts +11 -4
- package/src/services/reqresp/batch-tx-requester/tx_validator.ts +12 -25
- package/src/services/reqresp/config.ts +2 -2
- package/src/services/reqresp/interface.ts +21 -47
- package/src/services/reqresp/metrics.ts +0 -1
- package/src/services/reqresp/protocols/block_txs/bitvector.ts +3 -2
- package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +34 -30
- package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +47 -20
- package/src/services/reqresp/protocols/index.ts +0 -1
- package/src/services/reqresp/protocols/tx.ts +1 -3
- package/src/services/reqresp/rate-limiter/rate_limiter.ts +13 -9
- package/src/services/reqresp/rate-limiter/rate_limits.ts +0 -10
- package/src/services/reqresp/reqresp.ts +29 -252
- package/src/services/service.ts +31 -28
- package/src/services/tx_collection/config.ts +3 -80
- package/src/services/tx_collection/file_store_tx_collection.ts +54 -103
- package/src/services/tx_collection/file_store_tx_source.ts +43 -31
- package/src/services/tx_collection/index.ts +1 -6
- package/src/services/tx_collection/instrumentation.ts +1 -7
- package/src/services/tx_collection/tx_collection.ts +330 -173
- package/src/services/tx_collection/tx_collection_sink.ts +2 -2
- package/src/services/tx_collection/tx_source.ts +10 -8
- package/src/services/tx_file_store/tx_file_store.ts +5 -17
- package/src/services/tx_provider.ts +5 -0
- package/src/test-helpers/make-test-p2p-clients.ts +3 -0
- package/src/test-helpers/mock-pubsub.ts +46 -60
- package/src/test-helpers/reqresp-nodes.ts +12 -22
- package/src/test-helpers/test_tx_provider.ts +5 -0
- package/src/test-helpers/testbench-utils.ts +31 -26
- package/src/testbench/p2p_client_testbench_worker.ts +110 -55
- package/src/testbench/worker_client_manager.ts +59 -20
- package/src/util.ts +32 -17
- package/src/versioning.ts +3 -33
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.d.ts +0 -2
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.d.ts.map +0 -1
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.js +0 -305
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.d.ts +0 -73
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.d.ts.map +0 -1
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.js +0 -8
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts +0 -125
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.js +0 -596
- package/dest/mem_pools/tx_pool/eviction/eviction_manager.d.ts +0 -32
- package/dest/mem_pools/tx_pool/eviction/eviction_manager.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/eviction_manager.js +0 -112
- package/dest/mem_pools/tx_pool/eviction/eviction_strategy.d.ts +0 -157
- package/dest/mem_pools/tx_pool/eviction/eviction_strategy.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/eviction_strategy.js +0 -52
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts +0 -16
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.js +0 -123
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.d.ts +0 -17
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.js +0 -84
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.d.ts +0 -19
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.js +0 -78
- package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.d.ts +0 -26
- package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.js +0 -84
- package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.d.ts +0 -25
- package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.js +0 -57
- package/dest/mem_pools/tx_pool/index.d.ts +0 -3
- package/dest/mem_pools/tx_pool/index.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/index.js +0 -2
- package/dest/mem_pools/tx_pool/priority.d.ts +0 -12
- package/dest/mem_pools/tx_pool/priority.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/priority.js +0 -15
- package/dest/mem_pools/tx_pool/tx_pool.d.ts +0 -127
- package/dest/mem_pools/tx_pool/tx_pool.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/tx_pool.js +0 -3
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts +0 -7
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.js +0 -402
- package/dest/msg_validators/clock_tolerance.d.ts +0 -21
- package/dest/msg_validators/clock_tolerance.d.ts.map +0 -1
- package/dest/msg_validators/clock_tolerance.js +0 -38
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts +0 -64
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts.map +0 -1
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.js +0 -151
- package/dest/services/reqresp/protocols/block.d.ts +0 -9
- package/dest/services/reqresp/protocols/block.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/block.js +0 -32
- package/dest/services/tx_collection/fast_tx_collection.d.ts +0 -51
- package/dest/services/tx_collection/fast_tx_collection.d.ts.map +0 -1
- package/dest/services/tx_collection/fast_tx_collection.js +0 -311
- package/dest/services/tx_collection/proposal_tx_collector.d.ts +0 -48
- package/dest/services/tx_collection/proposal_tx_collector.d.ts.map +0 -1
- package/dest/services/tx_collection/proposal_tx_collector.js +0 -50
- package/dest/services/tx_collection/slow_tx_collection.d.ts +0 -57
- package/dest/services/tx_collection/slow_tx_collection.d.ts.map +0 -1
- package/dest/services/tx_collection/slow_tx_collection.js +0 -211
- package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +0 -344
- package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.ts +0 -43
- package/src/mem_pools/tx_pool/README.md +0 -270
- package/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +0 -746
- package/src/mem_pools/tx_pool/eviction/eviction_manager.ts +0 -132
- package/src/mem_pools/tx_pool/eviction/eviction_strategy.ts +0 -208
- package/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts +0 -163
- package/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts +0 -104
- package/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.ts +0 -93
- package/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.ts +0 -106
- package/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.ts +0 -75
- package/src/mem_pools/tx_pool/index.ts +0 -2
- package/src/mem_pools/tx_pool/priority.ts +0 -20
- package/src/mem_pools/tx_pool/tx_pool.ts +0 -141
- package/src/mem_pools/tx_pool/tx_pool_test_suite.ts +0 -321
- package/src/msg_validators/clock_tolerance.ts +0 -52
- package/src/services/reqresp/connection-sampler/batch_connection_sampler.ts +0 -161
- package/src/services/reqresp/protocols/block.ts +0 -37
- package/src/services/tx_collection/fast_tx_collection.ts +0 -361
- package/src/services/tx_collection/proposal_tx_collector.ts +0 -108
- package/src/services/tx_collection/slow_tx_collection.ts +0 -266
|
@@ -371,13 +371,12 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
|
371
371
|
return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
|
|
372
372
|
}
|
|
373
373
|
var _dec, _dec1, _initProto;
|
|
374
|
-
import { GENESIS_BLOCK_HEADER_HASH } from '@aztec/constants';
|
|
375
374
|
import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
376
375
|
import { createLogger } from '@aztec/foundation/log';
|
|
377
|
-
import { RunningPromise } from '@aztec/foundation/promise';
|
|
378
376
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
379
377
|
import { L2TipsKVStore } from '@aztec/kv-store/stores';
|
|
380
378
|
import { L2BlockStream } from '@aztec/stdlib/block';
|
|
379
|
+
import { getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
381
380
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
382
381
|
import { Attributes, WithTracer, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
383
382
|
import { getP2PDefaultConfig } from '../config.js';
|
|
@@ -435,8 +434,7 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
435
434
|
txProvider;
|
|
436
435
|
validatorAddresses;
|
|
437
436
|
/** Tracks the last slot for which we called prepareForSlot */ lastSlotProcessed;
|
|
438
|
-
|
|
439
|
-
constructor(store, l2BlockSource, mempools, p2pService, txCollection, txFileStore, epochCache, config = {}, _dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('p2p')){
|
|
437
|
+
constructor(store, l2BlockSource, mempools, p2pService, txCollection, txFileStore, epochCache, config = {}, _dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('p2p'), initialBlockHash){
|
|
440
438
|
super(telemetry, 'P2PClient'), this.store = store, this.l2BlockSource = l2BlockSource, this.p2pService = p2pService, this.txCollection = txCollection, this.txFileStore = txFileStore, this.epochCache = epochCache, this._dateProvider = _dateProvider, this.telemetry = telemetry, this.log = log, this.currentState = (_initProto(this), P2PClientState.IDLE), this.syncPromise = Promise.resolve(), this.syncResolve = undefined, this.latestBlockNumberAtStart = -1, this.provenBlockNumberAtStart = -1, this.finalizedBlockNumberAtStart = -1, this.validatorAddresses = [], this.lastSlotProcessed = SlotNumber.ZERO;
|
|
441
439
|
this.config = {
|
|
442
440
|
...getP2PDefaultConfig(),
|
|
@@ -445,7 +443,7 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
445
443
|
this.txPool = mempools.txPool;
|
|
446
444
|
this.attestationPool = mempools.attestationPool;
|
|
447
445
|
this.txProvider = new TxProvider(this.txCollection, this.txPool, this, this.log.createChild('tx-provider'), this.telemetry);
|
|
448
|
-
this.l2Tips = new L2TipsKVStore(store, 'p2p_client');
|
|
446
|
+
this.l2Tips = new L2TipsKVStore(store, 'p2p_client', initialBlockHash);
|
|
449
447
|
this.synchedLatestSlot = store.openSingleton('p2p_pool_last_l2_slot');
|
|
450
448
|
}
|
|
451
449
|
registerThisValidatorAddresses(addresses) {
|
|
@@ -491,7 +489,10 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
491
489
|
const from = BlockNumber(oldFinalizedBlockNum + 1);
|
|
492
490
|
const limit = event.block.number - from + 1;
|
|
493
491
|
if (limit > 0) {
|
|
494
|
-
const oldBlocks = await this.l2BlockSource.
|
|
492
|
+
const oldBlocks = await this.l2BlockSource.getBlocksData({
|
|
493
|
+
from,
|
|
494
|
+
limit
|
|
495
|
+
});
|
|
495
496
|
await this.handleFinalizedL2Blocks(oldBlocks);
|
|
496
497
|
}
|
|
497
498
|
break;
|
|
@@ -501,10 +502,12 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
501
502
|
break;
|
|
502
503
|
case 'chain-pruned':
|
|
503
504
|
this.txCollection.stopCollectingForBlocksAfter(event.block.number);
|
|
504
|
-
await this.handlePruneL2Blocks(event.block, event.checkpoint);
|
|
505
|
+
await this.handlePruneL2Blocks(event.block, event.checkpointed.checkpoint);
|
|
505
506
|
break;
|
|
506
507
|
case 'chain-checkpointed':
|
|
507
508
|
break;
|
|
509
|
+
case 'chain-proposed':
|
|
510
|
+
break;
|
|
508
511
|
default:
|
|
509
512
|
{
|
|
510
513
|
const _ = event;
|
|
@@ -572,16 +575,16 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
572
575
|
syncedFinalizedBlock
|
|
573
576
|
});
|
|
574
577
|
}
|
|
578
|
+
// Should never happen: all branches above call initBlockStream()
|
|
579
|
+
if (!this.blockStream) {
|
|
580
|
+
throw new Error('Block stream not initialized');
|
|
581
|
+
}
|
|
575
582
|
this.blockStream.start();
|
|
576
|
-
await this.txCollection.start();
|
|
577
583
|
this.txFileStore?.start();
|
|
578
|
-
// Start slot monitor to call prepareForSlot when the slot changes
|
|
579
|
-
this.slotMonitor = new RunningPromise(()=>this.maybeCallPrepareForSlot(), this.log, this.config.slotCheckIntervalMS);
|
|
580
|
-
this.slotMonitor.start();
|
|
581
584
|
return this.syncPromise;
|
|
582
585
|
}
|
|
583
|
-
addReqRespSubProtocol(subProtocol, handler
|
|
584
|
-
return this.p2pService.addReqRespSubProtocol(subProtocol, handler
|
|
586
|
+
addReqRespSubProtocol(subProtocol, handler) {
|
|
587
|
+
return this.p2pService.addReqRespSubProtocol(subProtocol, handler);
|
|
585
588
|
}
|
|
586
589
|
initBlockStream(startingBlock) {
|
|
587
590
|
if (!this.blockStream) {
|
|
@@ -598,8 +601,6 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
598
601
|
* 'ready' will now return 'false' and the running promise that keeps the client synced is interrupted.
|
|
599
602
|
*/ async stop() {
|
|
600
603
|
this.log.debug('Stopping p2p client...');
|
|
601
|
-
await this.slotMonitor?.stop();
|
|
602
|
-
this.log.debug('Stopped slot monitor');
|
|
603
604
|
await tryStop(this.txCollection);
|
|
604
605
|
this.log.debug('Stopped tx collection service');
|
|
605
606
|
await this.txFileStore?.stop();
|
|
@@ -616,6 +617,10 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
616
617
|
}
|
|
617
618
|
/** Triggers a sync to the archiver. Used for testing. */ async sync() {
|
|
618
619
|
this.initBlockStream();
|
|
620
|
+
// Should never happen: initBlockStream() creates blockStream if absent
|
|
621
|
+
if (!this.blockStream) {
|
|
622
|
+
throw new Error('Block stream not initialized');
|
|
623
|
+
}
|
|
619
624
|
await this.blockStream.sync();
|
|
620
625
|
}
|
|
621
626
|
async broadcastProposal(proposal) {
|
|
@@ -642,36 +647,64 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
642
647
|
// Store our own last-block proposal so we can respond to req/resp requests for it.
|
|
643
648
|
await this.attestationPool.tryAddBlockProposal(blockProposal);
|
|
644
649
|
}
|
|
650
|
+
const checkpointCore = proposal.toCore();
|
|
651
|
+
const { count } = await this.attestationPool.tryAddCheckpointProposal(checkpointCore);
|
|
652
|
+
if (count > 1) {
|
|
653
|
+
if (this.config.broadcastEquivocatedProposals) {
|
|
654
|
+
this.log.warn(`Broadcasting equivocated checkpoint proposal for slot ${proposal.slotNumber}`, {
|
|
655
|
+
slot: proposal.slotNumber,
|
|
656
|
+
archive: proposal.archive.toString(),
|
|
657
|
+
count
|
|
658
|
+
});
|
|
659
|
+
} else {
|
|
660
|
+
throw new Error(`Attempted to broadcast a duplicate checkpoint proposal for slot ${proposal.slotNumber}`);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
645
663
|
return this.p2pService.propagate(proposal);
|
|
646
664
|
}
|
|
647
665
|
async broadcastCheckpointAttestations(attestations) {
|
|
648
666
|
this.log.verbose(`Broadcasting ${attestations.length} checkpoint attestations to peers`);
|
|
649
667
|
await Promise.all(attestations.map((att)=>this.p2pService.propagate(att)));
|
|
650
668
|
}
|
|
651
|
-
async getCheckpointAttestationsForSlot(slot,
|
|
652
|
-
return await (
|
|
669
|
+
async getCheckpointAttestationsForSlot(slot, proposalPayloadHash) {
|
|
670
|
+
return await (proposalPayloadHash ? this.attestationPool.getCheckpointAttestationsForSlotAndProposal(slot, proposalPayloadHash) : this.attestationPool.getCheckpointAttestationsForSlot(slot));
|
|
653
671
|
}
|
|
654
672
|
addOwnCheckpointAttestations(attestations) {
|
|
655
673
|
return this.attestationPool.addOwnCheckpointAttestations(attestations);
|
|
656
674
|
}
|
|
675
|
+
getProposalsForSlot(slot) {
|
|
676
|
+
return this.attestationPool.getProposalsForSlot(slot);
|
|
677
|
+
}
|
|
657
678
|
hasBlockProposalsForSlot(slot) {
|
|
658
679
|
return this.attestationPool.hasBlockProposalsForSlot(slot);
|
|
659
680
|
}
|
|
681
|
+
hasCheckpointProposalForSlot(slot) {
|
|
682
|
+
return this.attestationPool.hasCheckpointProposalForSlot(slot);
|
|
683
|
+
}
|
|
660
684
|
// REVIEW: https://github.com/AztecProtocol/aztec-packages/issues/7963
|
|
661
685
|
// ^ This pattern is not my favorite (md)
|
|
662
686
|
registerBlockProposalHandler(handler) {
|
|
663
687
|
this.p2pService.registerBlockReceivedCallback(handler);
|
|
664
688
|
}
|
|
665
|
-
|
|
666
|
-
this.p2pService.
|
|
689
|
+
registerValidatorCheckpointProposalHandler(handler) {
|
|
690
|
+
this.p2pService.registerValidatorCheckpointReceivedCallback(handler);
|
|
691
|
+
}
|
|
692
|
+
registerAllNodesCheckpointProposalHandler(handler) {
|
|
693
|
+
this.p2pService.registerAllNodesCheckpointReceivedCallback(handler);
|
|
667
694
|
}
|
|
668
695
|
registerDuplicateProposalCallback(callback) {
|
|
669
696
|
this.p2pService.registerDuplicateProposalCallback(callback);
|
|
670
697
|
}
|
|
698
|
+
registerOversizedProposalCallback(callback) {
|
|
699
|
+
this.p2pService.registerOversizedProposalCallback(callback);
|
|
700
|
+
}
|
|
671
701
|
registerDuplicateAttestationCallback(callback) {
|
|
672
702
|
this.p2pService.registerDuplicateAttestationCallback(callback);
|
|
673
703
|
}
|
|
674
|
-
|
|
704
|
+
registerCheckpointAttestationCallback(callback) {
|
|
705
|
+
this.p2pService.registerCheckpointAttestationCallback(callback);
|
|
706
|
+
}
|
|
707
|
+
async getPendingTxs(limit, after, options) {
|
|
675
708
|
if (limit !== undefined && limit <= 0) {
|
|
676
709
|
throw new TypeError('limit must be greater than 0');
|
|
677
710
|
}
|
|
@@ -686,23 +719,27 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
686
719
|
}
|
|
687
720
|
const endIndex = limit !== undefined ? startIndex + limit : undefined;
|
|
688
721
|
txHashes = txHashes.slice(startIndex, endIndex);
|
|
689
|
-
|
|
722
|
+
// This is a public-facing API (exposed via both the node and the p2p RPC), so proofs are opt-in.
|
|
723
|
+
const includeProof = !!options?.includeProof;
|
|
724
|
+
const maybeTxs = await Promise.all(txHashes.map((txHash)=>this.txPool.getTxByHash(txHash, {
|
|
725
|
+
includeProof
|
|
726
|
+
})));
|
|
690
727
|
return maybeTxs.filter((tx)=>!!tx);
|
|
691
728
|
}
|
|
692
729
|
getPendingTxCount() {
|
|
693
730
|
return this.txPool.getPendingTxCount();
|
|
694
731
|
}
|
|
695
|
-
async *iteratePendingTxs() {
|
|
732
|
+
async *iteratePendingTxs(opts) {
|
|
696
733
|
for (const txHash of (await this.txPool.getPendingTxHashes())){
|
|
697
|
-
const tx = await this.txPool.getTxByHash(txHash);
|
|
734
|
+
const tx = await this.txPool.getTxByHash(txHash, opts);
|
|
698
735
|
if (tx) {
|
|
699
736
|
yield tx;
|
|
700
737
|
}
|
|
701
738
|
}
|
|
702
739
|
}
|
|
703
|
-
async *iterateEligiblePendingTxs() {
|
|
740
|
+
async *iterateEligiblePendingTxs(opts) {
|
|
704
741
|
for (const txHash of (await this.txPool.getEligiblePendingTxHashes())){
|
|
705
|
-
const tx = await this.txPool.getTxByHash(txHash);
|
|
742
|
+
const tx = await this.txPool.getTxByHash(txHash, opts);
|
|
706
743
|
if (tx) {
|
|
707
744
|
yield tx;
|
|
708
745
|
}
|
|
@@ -711,16 +748,18 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
711
748
|
/**
|
|
712
749
|
* Returns a transaction in the transaction pool by its hash.
|
|
713
750
|
* @param txHash - Hash of the transaction to look for in the pool.
|
|
751
|
+
* @param opts - Set `includeProof: false` to skip loading the tx proof from the DB.
|
|
714
752
|
* @returns A single tx or undefined.
|
|
715
|
-
*/ getTxByHashFromPool(txHash) {
|
|
716
|
-
return this.txPool.getTxByHash(txHash);
|
|
753
|
+
*/ getTxByHashFromPool(txHash, opts) {
|
|
754
|
+
return this.txPool.getTxByHash(txHash, opts);
|
|
717
755
|
}
|
|
718
756
|
/**
|
|
719
757
|
* Returns transactions in the transaction pool by hash.
|
|
720
758
|
* @param txHashes - Hashes of the transactions to look for.
|
|
759
|
+
* @param opts - Set `includeProof: false` to skip loading tx proofs from the DB.
|
|
721
760
|
* @returns The txs found, in the same order as the requested hashes. If a tx is not found, it will be undefined.
|
|
722
|
-
*/ getTxsByHashFromPool(txHashes) {
|
|
723
|
-
return this.txPool.getTxsByHash(txHashes);
|
|
761
|
+
*/ getTxsByHashFromPool(txHashes, opts) {
|
|
762
|
+
return this.txPool.getTxsByHash(txHashes, opts);
|
|
724
763
|
}
|
|
725
764
|
hasTxsInPool(txHashes) {
|
|
726
765
|
return this.txPool.hasTxs(txHashes);
|
|
@@ -808,7 +847,9 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
808
847
|
* @returns Information about p2p client status: state & syncedToBlockNum.
|
|
809
848
|
*/ async getStatus() {
|
|
810
849
|
const blockNumber = await this.getSyncedLatestBlockNum();
|
|
811
|
-
const blockHash =
|
|
850
|
+
const blockHash = await this.l2BlockSource.getBlockData({
|
|
851
|
+
number: blockNumber
|
|
852
|
+
}).then((data)=>data?.header.hash()).then((hash)=>hash?.toString());
|
|
812
853
|
return {
|
|
813
854
|
state: this.currentState,
|
|
814
855
|
syncedToL2Block: {
|
|
@@ -834,13 +875,17 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
834
875
|
if (!blocks.length) {
|
|
835
876
|
return;
|
|
836
877
|
}
|
|
837
|
-
await this.handleMinedBlocks(blocks);
|
|
838
|
-
await this.maybeCallPrepareForSlot();
|
|
839
|
-
await this.startCollectingMissingTxs(blocks);
|
|
840
878
|
const lastBlock = blocks.at(-1);
|
|
841
|
-
|
|
879
|
+
const lastSlot = lastBlock.header.getSlot();
|
|
880
|
+
// Mark txs mined before releasing protections: a block landing at this slot supersedes any
|
|
881
|
+
// protection for txs it includes, so mined-marking must run first to keep just-landed txs from
|
|
882
|
+
// being unprotected into pending where they could be evicted before they are recorded as mined.
|
|
883
|
+
await this.handleMinedBlocks(blocks);
|
|
884
|
+
await this.maybeCallPrepareForSlot(lastSlot);
|
|
885
|
+
await this.collectingMissingTxs(blocks);
|
|
886
|
+
await this.synchedLatestSlot.set(BigInt(lastSlot));
|
|
842
887
|
}
|
|
843
|
-
/** Request txs for unproven blocks so the prover node
|
|
888
|
+
/** Request txs for unproven blocks so the prover node can prove. */ async collectingMissingTxs(blocks) {
|
|
844
889
|
try {
|
|
845
890
|
// TODO(#15435): If the archiver has lagged behind L1, the reported proven block number may
|
|
846
891
|
// be much lower than the actual one, and it does not update until the pending chain is
|
|
@@ -848,7 +893,9 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
848
893
|
// are already proven, but the archiver has not yet updated its state. Until this is properly
|
|
849
894
|
// fixed, it is mitigated by the expiration date of collection requests, which depends on
|
|
850
895
|
// the slot number of the block.
|
|
851
|
-
const provenBlockNumber = await this.l2BlockSource.
|
|
896
|
+
const provenBlockNumber = await this.l2BlockSource.getBlockNumber({
|
|
897
|
+
tag: 'proven'
|
|
898
|
+
}) ?? BlockNumber.ZERO;
|
|
852
899
|
const unprovenBlocks = blocks.filter((block)=>block.number > provenBlockNumber);
|
|
853
900
|
for (const block of unprovenBlocks){
|
|
854
901
|
const txHashes = block.body.txEffects.map((txEffect)=>txEffect.txHash);
|
|
@@ -859,7 +906,19 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
859
906
|
blockNumber: block.number,
|
|
860
907
|
blockHash: await block.hash().then((h)=>h.toString())
|
|
861
908
|
});
|
|
862
|
-
|
|
909
|
+
// Both `slashDataWithholdingToleranceSlots` and `p2pMissingTxCollectionDeadlineSlots`
|
|
910
|
+
// count *full slots after the block slot* — value N means collection runs until
|
|
911
|
+
// `slotStart(block.slot + N + 1)`. Take the larger of the two so collection never
|
|
912
|
+
// gives up before the data-withholding slash verdict is rendered.
|
|
913
|
+
const blockSlot = block.header.getSlot();
|
|
914
|
+
const toleranceSlots = this.config.slashDataWithholdingToleranceSlots;
|
|
915
|
+
const configuredSlots = this.config.p2pMissingTxCollectionDeadlineSlots ?? 0;
|
|
916
|
+
const deadlineSlot = SlotNumber(blockSlot + Math.max(toleranceSlots, configuredSlots) + 1);
|
|
917
|
+
const deadlineSeconds = getTimestampForSlot(deadlineSlot, this.epochCache.getL1Constants());
|
|
918
|
+
const deadline = new Date(Number(deadlineSeconds) * 1000);
|
|
919
|
+
await this.txCollection.collectFastForBlock(block, missingTxHashes, {
|
|
920
|
+
deadline
|
|
921
|
+
});
|
|
863
922
|
}
|
|
864
923
|
}
|
|
865
924
|
} catch (err) {
|
|
@@ -914,15 +973,12 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
|
|
|
914
973
|
}
|
|
915
974
|
return isEpochPrune;
|
|
916
975
|
}
|
|
917
|
-
/**
|
|
918
|
-
|
|
919
|
-
// Knowledege of pending checkpoints is in the PR above
|
|
920
|
-
const { targetSlot } = this.epochCache.getTargetAndNextSlot();
|
|
921
|
-
if (targetSlot <= this.lastSlotProcessed) {
|
|
976
|
+
/** Calls prepareForSlot for the given slot if it advances past the last slot we prepared for. */ async maybeCallPrepareForSlot(slot) {
|
|
977
|
+
if (slot <= this.lastSlotProcessed) {
|
|
922
978
|
return;
|
|
923
979
|
}
|
|
924
|
-
this.lastSlotProcessed =
|
|
925
|
-
await this.txPool.prepareForSlot(
|
|
980
|
+
this.lastSlotProcessed = slot;
|
|
981
|
+
await this.txPool.prepareForSlot(slot);
|
|
926
982
|
}
|
|
927
983
|
async startServiceIfSynched() {
|
|
928
984
|
if (this.currentState !== P2PClientState.SYNCHING) {
|
package/dest/config.d.ts
CHANGED
|
@@ -8,21 +8,15 @@ import { type TxFileStoreConfig } from './services/tx_file_store/config.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* P2P client configuration values.
|
|
10
10
|
*/
|
|
11
|
-
export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, ChainConfig, TxCollectionConfig, TxFileStoreConfig, Pick<SequencerConfig, '
|
|
11
|
+
export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, ChainConfig, TxCollectionConfig, TxFileStoreConfig, Pick<SequencerConfig, 'expectedBlockProposalsPerSlot' | 'maxTxsPerBlock' | 'checkpointProposalSyncGraceSeconds' | 'maxBlocksPerCheckpoint'>, Required<Pick<SequencerConfig, 'blockDurationMs'>> {
|
|
12
12
|
/** Maximum transactions per block for validation. Overrides maxTxsPerBlock for gossip validation when set. */
|
|
13
13
|
validateMaxTxsPerBlock?: number;
|
|
14
14
|
/** Maximum transactions per checkpoint for validation. Used as fallback for maxTxsPerBlock when that is not set. */
|
|
15
15
|
validateMaxTxsPerCheckpoint?: number;
|
|
16
|
-
/** Maximum L2 gas per block for validation. When set, txs exceeding this limit are rejected. */
|
|
17
|
-
validateMaxL2BlockGas?: number;
|
|
18
|
-
/** Maximum DA gas per block for validation. When set, txs exceeding this limit are rejected. */
|
|
19
|
-
validateMaxDABlockGas?: number;
|
|
20
16
|
/** A flag dictating whether the P2P subsystem should be enabled. */
|
|
21
17
|
p2pEnabled: boolean;
|
|
22
18
|
/** The frequency in which to check for new L2 blocks. */
|
|
23
19
|
blockCheckIntervalMS: number;
|
|
24
|
-
/** The frequency in which to check for new L2 slots. */
|
|
25
|
-
slotCheckIntervalMS: number;
|
|
26
20
|
/** The number of blocks to fetch in a single batch. */
|
|
27
21
|
blockRequestBatchSize: number;
|
|
28
22
|
/** DEBUG: Disable colocation penalty - for testing purposes only */
|
|
@@ -55,6 +49,10 @@ export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, Cha
|
|
|
55
49
|
maxPeerCount: number;
|
|
56
50
|
/** If announceUdpAddress or announceTcpAddress are not provided, query for the IP address of the machine. Default is false. */
|
|
57
51
|
queryForIp: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* HTTPS URLs that return plain-text public IPv4, tried in order when resolving the announce IP (e.g. when `queryForIp` is true and `p2pIp` is unset).
|
|
54
|
+
*/
|
|
55
|
+
publicIpServices: string[];
|
|
58
56
|
/** The interval of the gossipsub heartbeat to perform maintenance tasks. */
|
|
59
57
|
gossipsubInterval: number;
|
|
60
58
|
/** The D parameter for the gossipsub protocol. */
|
|
@@ -73,6 +71,12 @@ export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, Cha
|
|
|
73
71
|
gossipsubMcacheGossip: number;
|
|
74
72
|
/** How long to keep message IDs in the seen cache (ms). */
|
|
75
73
|
gossipsubSeenTTL: number;
|
|
74
|
+
/**
|
|
75
|
+
* Maximum clock-disparity tolerance (ms) applied to proposal/attestation gossip receive windows. Both
|
|
76
|
+
* ends of each acceptance window are widened by this much so peers are not penalized for messages valid
|
|
77
|
+
* when sent but arriving slightly early or late due to clock skew (Ethereum's MAXIMUM_GOSSIP_CLOCK_DISPARITY).
|
|
78
|
+
*/
|
|
79
|
+
maxGossipClockDisparityMs: number;
|
|
76
80
|
/** The 'age' (in # of L2 blocks) of a processed tx after which we heavily penalize a peer for re-sending it. */
|
|
77
81
|
doubleSpendSeverePeerPenaltyWindow: number;
|
|
78
82
|
/** The weight of the tx topic for the gossipsub protocol. This determines how much the score for this specific topic contributes to the overall peer score. */
|
|
@@ -83,6 +87,8 @@ export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, Cha
|
|
|
83
87
|
gossipsubTxInvalidMessageDeliveriesDecay: number;
|
|
84
88
|
/** The values for the peer scoring system. Passed as a comma separated list of values in order: low, mid, high tolerance errors. */
|
|
85
89
|
peerPenaltyValues: number[];
|
|
90
|
+
/** How long (in seconds) a peer is banned for once its score drops below the ban threshold. */
|
|
91
|
+
peerBanDurationSeconds: number;
|
|
86
92
|
/** Limit of transactions to archive in the tx pool. Once the archived tx limit is reached, the oldest archived txs will be purged. */
|
|
87
93
|
archivedTxLimit: number;
|
|
88
94
|
/** A list of trusted peers. */
|
|
@@ -99,6 +105,8 @@ export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, Cha
|
|
|
99
105
|
maxPendingTxCount: number;
|
|
100
106
|
/** The node's seen message ID cache size */
|
|
101
107
|
seenMessageCacheSize: number;
|
|
108
|
+
/** Maximum number of (validator, tx) pairs to keep in the tx validation LRU cache. */
|
|
109
|
+
txValidationCacheSize: number;
|
|
102
110
|
/** True to disable the status handshake on peer connected. */
|
|
103
111
|
p2pDisableStatusHandshake?: boolean;
|
|
104
112
|
/** True to only permit validators to connect */
|
|
@@ -121,10 +129,34 @@ export interface P2PConfig extends P2PReqRespConfig, BatchTxRequesterConfig, Cha
|
|
|
121
129
|
broadcastEquivocatedProposals?: boolean;
|
|
122
130
|
/** Minimum age (ms) a transaction must have been in the pool before it's eligible for block building. */
|
|
123
131
|
minTxPoolAgeMs: number;
|
|
132
|
+
/**
|
|
133
|
+
* Number of full L2 slots to wait after a checkpoint's slot before declaring its txs missing
|
|
134
|
+
* for data-withholding slashing.
|
|
135
|
+
*/
|
|
136
|
+
slashDataWithholdingToleranceSlots: number;
|
|
137
|
+
/**
|
|
138
|
+
* Number of L2 slots after a mined block's slot to keep collecting its missing txs. Clamped
|
|
139
|
+
* up so that collection always runs at least until the data-withholding slash verdict is
|
|
140
|
+
* rendered (`block.slot + slashDataWithholdingToleranceSlots + 1`). Defaults to undefined,
|
|
141
|
+
* in which case the tolerance window is used directly.
|
|
142
|
+
*/
|
|
143
|
+
p2pMissingTxCollectionDeadlineSlots?: number;
|
|
124
144
|
/** Minimum percentage fee increase required to replace an existing tx via RPC (0 = no bump). */
|
|
125
145
|
priceBumpPercentage: bigint;
|
|
146
|
+
/** Drop incoming block and checkpoint proposals at the libp2p dispatch layer (for testing only) */
|
|
147
|
+
skipIncomingProposals?: boolean;
|
|
148
|
+
/** Accept proposal gossip regardless of slot timing (for testing only). */
|
|
149
|
+
skipProposalSlotValidation?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Whether this node skips checkpoint proposal validation and always attests. When set, the checkpoint
|
|
152
|
+
* attestation is created and broadcast before the embedded last block is processed, so it is not delayed
|
|
153
|
+
* past the slot's attestation window by that block's re-execution. Mirrors the validator config flag.
|
|
154
|
+
*/
|
|
155
|
+
skipCheckpointProposalValidation?: boolean;
|
|
126
156
|
}
|
|
127
157
|
export declare const DEFAULT_P2P_PORT = 40400;
|
|
158
|
+
/** Default endpoints used to discover this machine's public IPv4 when `queryForIp` is enabled. */
|
|
159
|
+
export declare const DEFAULT_PUBLIC_IP_SERVICES: string[];
|
|
128
160
|
export declare const p2pConfigMappings: ConfigMappingsType<P2PConfig>;
|
|
129
161
|
/**
|
|
130
162
|
* Gets the config values for p2p client from environment variables.
|
|
@@ -135,106 +167,104 @@ export declare function getP2PDefaultConfig(): P2PConfig;
|
|
|
135
167
|
/**
|
|
136
168
|
* Required P2P config values for a bootstrap node.
|
|
137
169
|
*/
|
|
138
|
-
export type BootnodeConfig = Pick<P2PConfig, 'p2pIp' | 'p2pPort' | 'p2pBroadcastPort' | 'peerIdPrivateKey' | 'peerIdPrivateKeyPath' | 'bootstrapNodes' | 'listenAddress' | 'queryForIp'> & Required<Pick<P2PConfig, 'p2pIp' | 'p2pPort'>> & Pick<DataStoreConfig, 'dataDirectory' | 'dataStoreMapSizeKb'> & Pick<ChainConfig, 'l1ChainId'>;
|
|
170
|
+
export type BootnodeConfig = Pick<P2PConfig, 'p2pIp' | 'p2pPort' | 'p2pBroadcastPort' | 'peerIdPrivateKey' | 'peerIdPrivateKeyPath' | 'bootstrapNodes' | 'listenAddress' | 'queryForIp' | 'publicIpServices'> & Required<Pick<P2PConfig, 'p2pIp' | 'p2pPort'>> & Pick<DataStoreConfig, 'dataDirectory' | 'dataStoreMapSizeKb'> & Pick<ChainConfig, 'l1ChainId'>;
|
|
139
171
|
export declare const bootnodeConfigMappings: ConfigMappingsType<Pick<{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
dialTimeoutMs:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
validateMaxTxsPerCheckpoint: unknown;
|
|
237
|
-
}, "bootstrapNodes" | "dataDirectory" | "dataStoreMapSizeKb" | "l1ChainId" | "listenAddress" | "p2pBroadcastPort" | "p2pIp" | "p2pPort" | "peerIdPrivateKey" | "peerIdPrivateKeyPath" | "queryForIp">>;
|
|
172
|
+
maxTxsPerBlock: number;
|
|
173
|
+
maxBlocksPerCheckpoint: number;
|
|
174
|
+
blockDurationMs: number;
|
|
175
|
+
checkpointProposalSyncGraceSeconds: number;
|
|
176
|
+
expectedBlockProposalsPerSlot: number;
|
|
177
|
+
l1ChainId: number;
|
|
178
|
+
rollupVersion: number;
|
|
179
|
+
dataDirectory: string;
|
|
180
|
+
dataStoreMapSizeKb: number;
|
|
181
|
+
batchTxRequesterSmartParallelWorkerCount: number;
|
|
182
|
+
batchTxRequesterDumbParallelWorkerCount: number;
|
|
183
|
+
batchTxRequesterTxBatchSize: number;
|
|
184
|
+
batchTxRequesterBadPeerThreshold: number;
|
|
185
|
+
overallRequestTimeoutMs: number;
|
|
186
|
+
individualRequestTimeoutMs: number;
|
|
187
|
+
p2pOptimisticNegotiation: boolean;
|
|
188
|
+
dialTimeoutMs: number;
|
|
189
|
+
txCollectionFastNodesTimeoutBeforeReqRespMs: number;
|
|
190
|
+
txCollectionFastNodeIntervalMs: number;
|
|
191
|
+
txCollectionNodeRpcUrls: string[];
|
|
192
|
+
txCollectionFastMaxParallelRequestsPerNode: number;
|
|
193
|
+
txCollectionNodeRpcMaxBatchSize: number;
|
|
194
|
+
txCollectionFileStoreUrls: string[];
|
|
195
|
+
txCollectionFileStoreFastDelayMs: number;
|
|
196
|
+
txCollectionFileStoreFastWorkerCount: number;
|
|
197
|
+
txCollectionFileStoreFastBackoffBaseMs: number;
|
|
198
|
+
txCollectionFileStoreFastBackoffMaxMs: number;
|
|
199
|
+
txFileStoreUrl: string;
|
|
200
|
+
txFileStoreUploadConcurrency: number;
|
|
201
|
+
txFileStoreMaxQueueSize: number;
|
|
202
|
+
txFileStoreEnabled: boolean;
|
|
203
|
+
validateMaxTxsPerBlock: number;
|
|
204
|
+
validateMaxTxsPerCheckpoint: number;
|
|
205
|
+
p2pEnabled: boolean;
|
|
206
|
+
blockCheckIntervalMS: number;
|
|
207
|
+
blockRequestBatchSize: number;
|
|
208
|
+
debugDisableColocationPenalty: boolean;
|
|
209
|
+
peerCheckIntervalMS: number;
|
|
210
|
+
peerFailedBanTimeMs: number;
|
|
211
|
+
l2QueueSize: number;
|
|
212
|
+
p2pPort: number;
|
|
213
|
+
p2pBroadcastPort: number;
|
|
214
|
+
p2pIp: string;
|
|
215
|
+
listenAddress: string;
|
|
216
|
+
peerIdPrivateKey: SecretValue<string>;
|
|
217
|
+
peerIdPrivateKeyPath: string;
|
|
218
|
+
bootstrapNodes: string[];
|
|
219
|
+
bootstrapNodeEnrVersionCheck: boolean;
|
|
220
|
+
bootstrapNodesAsFullPeers: boolean;
|
|
221
|
+
maxPeerCount: number;
|
|
222
|
+
queryForIp: boolean;
|
|
223
|
+
publicIpServices: string[];
|
|
224
|
+
gossipsubInterval: number;
|
|
225
|
+
gossipsubD: number;
|
|
226
|
+
gossipsubDlo: number;
|
|
227
|
+
gossipsubDhi: number;
|
|
228
|
+
gossipsubDLazy: number;
|
|
229
|
+
gossipsubFloodPublish: boolean;
|
|
230
|
+
gossipsubMcacheLength: number;
|
|
231
|
+
gossipsubMcacheGossip: number;
|
|
232
|
+
gossipsubSeenTTL: number;
|
|
233
|
+
maxGossipClockDisparityMs: number;
|
|
234
|
+
doubleSpendSeverePeerPenaltyWindow: number;
|
|
235
|
+
gossipsubTxTopicWeight: number;
|
|
236
|
+
gossipsubTxInvalidMessageDeliveriesWeight: number;
|
|
237
|
+
gossipsubTxInvalidMessageDeliveriesDecay: number;
|
|
238
|
+
peerPenaltyValues: number[];
|
|
239
|
+
peerBanDurationSeconds: number;
|
|
240
|
+
archivedTxLimit: number;
|
|
241
|
+
trustedPeers: string[];
|
|
242
|
+
privatePeers: string[];
|
|
243
|
+
preferredPeers: string[];
|
|
244
|
+
p2pStoreMapSizeKb: number;
|
|
245
|
+
txPublicSetupAllowListExtend: AllowedElement[];
|
|
246
|
+
maxPendingTxCount: number;
|
|
247
|
+
seenMessageCacheSize: number;
|
|
248
|
+
txValidationCacheSize: number;
|
|
249
|
+
p2pDisableStatusHandshake: boolean;
|
|
250
|
+
p2pAllowOnlyValidators: boolean;
|
|
251
|
+
p2pDiscoveryDisabled: boolean;
|
|
252
|
+
p2pMaxFailedAuthAttemptsAllowed: number;
|
|
253
|
+
disableTransactions: boolean;
|
|
254
|
+
dropTransactionsProbability: number;
|
|
255
|
+
txPoolDeleteTxsAfterReorg: boolean;
|
|
256
|
+
debugP2PInstrumentMessages: boolean;
|
|
257
|
+
fishermanMode: boolean;
|
|
258
|
+
broadcastEquivocatedProposals: boolean;
|
|
259
|
+
minTxPoolAgeMs: number;
|
|
260
|
+
slashDataWithholdingToleranceSlots: number;
|
|
261
|
+
p2pMissingTxCollectionDeadlineSlots: number;
|
|
262
|
+
priceBumpPercentage: bigint;
|
|
263
|
+
skipIncomingProposals: boolean;
|
|
264
|
+
skipProposalSlotValidation: boolean;
|
|
265
|
+
skipCheckpointProposalValidation: boolean;
|
|
266
|
+
rollupAddress: import("@aztec/foundation/eth-address").EthAddress;
|
|
267
|
+
}, "bootstrapNodes" | "dataDirectory" | "dataStoreMapSizeKb" | "l1ChainId" | "listenAddress" | "p2pBroadcastPort" | "p2pIp" | "p2pPort" | "peerIdPrivateKey" | "peerIdPrivateKeyPath" | "publicIpServices" | "queryForIp">>;
|
|
238
268
|
/**
|
|
239
269
|
* Parses a string to a list of allowed elements.
|
|
240
270
|
* Each entry is expected to be of one of the following formats:
|
|
@@ -249,4 +279,4 @@ export declare const bootnodeConfigMappings: ConfigMappingsType<Pick<{
|
|
|
249
279
|
* @returns A list of allowed elements
|
|
250
280
|
*/
|
|
251
281
|
export declare function parseAllowList(value: string): AllowedElement[];
|
|
252
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
282
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxLQUFLLGtCQUFrQixFQUN2QixXQUFXLEVBVVosTUFBTSwwQkFBMEIsQ0FBQztBQUlsQyxPQUFPLEVBQ0wsS0FBSyxjQUFjLEVBQ25CLEtBQUssV0FBVyxFQUNoQixLQUFLLGVBQWUsRUFHckIsTUFBTSxzQkFBc0IsQ0FBQztBQUM5QixPQUFPLEVBQUUsS0FBSyxlQUFlLEVBQXNCLE1BQU0sd0JBQXdCLENBQUM7QUFFbEYsT0FBTyxFQUNMLEtBQUssc0JBQXNCLEVBRTVCLE1BQU0saURBQWlELENBQUM7QUFDekQsT0FBTyxFQUFFLEtBQUssZ0JBQWdCLEVBQTRCLE1BQU0sOEJBQThCLENBQUM7QUFDL0YsT0FBTyxFQUFFLEtBQUssa0JBQWtCLEVBQThCLE1BQU0sb0NBQW9DLENBQUM7QUFDekcsT0FBTyxFQUFFLEtBQUssaUJBQWlCLEVBQTZCLE1BQU0sb0NBQW9DLENBQUM7QUFFdkc7O0dBRUc7QUFDSCxNQUFNLFdBQVcsU0FDZixTQUFR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