@aztec/p2p 0.0.0-test.0 → 0.0.1-commit.023c3e5
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/bootstrap/bootstrap.d.ts +4 -3
- package/dest/bootstrap/bootstrap.d.ts.map +1 -1
- package/dest/bootstrap/bootstrap.js +26 -13
- package/dest/client/factory.d.ts +15 -5
- package/dest/client/factory.d.ts.map +1 -1
- package/dest/client/factory.js +61 -25
- package/dest/client/index.d.ts +2 -1
- package/dest/client/index.d.ts.map +1 -1
- package/dest/client/index.js +1 -0
- package/dest/client/interface.d.ts +170 -0
- package/dest/client/interface.d.ts.map +1 -0
- package/dest/client/interface.js +9 -0
- package/dest/client/p2p_client.d.ts +75 -193
- package/dest/client/p2p_client.d.ts.map +1 -1
- package/dest/client/p2p_client.js +765 -229
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.d.ts +2 -0
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.d.ts.map +1 -0
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.js +305 -0
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.d.ts +73 -0
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.d.ts.map +1 -0
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.js +8 -0
- package/dest/config.d.ts +154 -125
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +182 -34
- package/dest/enr/generate-enr.d.ts +11 -3
- package/dest/enr/generate-enr.d.ts.map +1 -1
- package/dest/enr/generate-enr.js +27 -5
- package/dest/enr/index.d.ts +1 -1
- package/dest/errors/attestation-pool.error.d.ts +7 -0
- package/dest/errors/attestation-pool.error.d.ts.map +1 -0
- package/dest/errors/attestation-pool.error.js +12 -0
- package/dest/errors/reqresp.error.d.ts +1 -1
- package/dest/errors/reqresp.error.d.ts.map +1 -1
- package/dest/index.d.ts +4 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -0
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +104 -25
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +1 -1
- 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 +299 -174
- package/dest/mem_pools/attestation_pool/index.d.ts +1 -1
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts +29 -11
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.js +168 -62
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts +24 -10
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.js +133 -82
- package/dest/mem_pools/attestation_pool/mocks.d.ts +234 -11
- package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/mocks.js +19 -21
- package/dest/mem_pools/index.d.ts +1 -1
- package/dest/mem_pools/instrumentation.d.ts +16 -12
- package/dest/mem_pools/instrumentation.d.ts.map +1 -1
- package/dest/mem_pools/instrumentation.js +56 -41
- package/dest/mem_pools/interface.d.ts +3 -4
- package/dest/mem_pools/interface.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts +75 -16
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.js +493 -142
- package/dest/mem_pools/tx_pool/eviction/eviction_manager.d.ts +32 -0
- package/dest/mem_pools/tx_pool/eviction/eviction_manager.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/eviction_manager.js +112 -0
- package/dest/mem_pools/tx_pool/eviction/eviction_strategy.d.ts +157 -0
- package/dest/mem_pools/tx_pool/eviction/eviction_strategy.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/eviction_strategy.js +52 -0
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts +16 -0
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.js +122 -0
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.d.ts +17 -0
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.js +84 -0
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.d.ts +19 -0
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.js +78 -0
- package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.d.ts +26 -0
- package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.js +84 -0
- package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.d.ts +25 -0
- package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.d.ts.map +1 -0
- package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.js +57 -0
- package/dest/mem_pools/tx_pool/index.d.ts +1 -2
- package/dest/mem_pools/tx_pool/index.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/index.js +0 -1
- package/dest/mem_pools/tx_pool/priority.d.ts +5 -1
- package/dest/mem_pools/tx_pool/priority.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/priority.js +7 -2
- package/dest/mem_pools/tx_pool/tx_pool.d.ts +72 -11
- package/dest/mem_pools/tx_pool/tx_pool.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts +1 -1
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.js +276 -45
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts +7 -5
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts.map +1 -1
- package/dest/msg_validators/attestation_validator/attestation_validator.js +79 -10
- package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.d.ts +20 -0
- package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.d.ts.map +1 -0
- package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.js +76 -0
- package/dest/msg_validators/attestation_validator/index.d.ts +2 -1
- package/dest/msg_validators/attestation_validator/index.d.ts.map +1 -1
- package/dest/msg_validators/attestation_validator/index.js +1 -0
- package/dest/msg_validators/clock_tolerance.d.ts +21 -0
- package/dest/msg_validators/clock_tolerance.d.ts.map +1 -0
- package/dest/msg_validators/clock_tolerance.js +37 -0
- package/dest/msg_validators/index.d.ts +2 -2
- package/dest/msg_validators/index.d.ts.map +1 -1
- package/dest/msg_validators/index.js +1 -1
- package/dest/msg_validators/msg_seen_validator/msg_seen_validator.d.ts +10 -0
- package/dest/msg_validators/msg_seen_validator/msg_seen_validator.d.ts.map +1 -0
- package/dest/msg_validators/msg_seen_validator/msg_seen_validator.js +36 -0
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts +9 -0
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts.map +1 -0
- package/dest/msg_validators/proposal_validator/block_proposal_validator.js +6 -0
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts +9 -0
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts.map +1 -0
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.js +6 -0
- package/dest/msg_validators/proposal_validator/index.d.ts +4 -0
- package/dest/msg_validators/proposal_validator/index.d.ts.map +1 -0
- package/dest/msg_validators/proposal_validator/index.js +3 -0
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts +13 -0
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts.map +1 -0
- package/dest/msg_validators/proposal_validator/proposal_validator.js +104 -0
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts +23 -0
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts.map +1 -0
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.js +212 -0
- 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/allowed_public_setup.d.ts +3 -0
- package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/allowed_public_setup.js +27 -0
- package/dest/msg_validators/tx_validator/archive_cache.d.ts +14 -0
- package/dest/msg_validators/tx_validator/archive_cache.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/archive_cache.js +22 -0
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts +5 -4
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/block_header_validator.js +7 -6
- package/dest/msg_validators/tx_validator/data_validator.d.ts +3 -1
- package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/data_validator.js +60 -87
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts +3 -4
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/double_spend_validator.js +24 -29
- package/dest/msg_validators/tx_validator/factory.d.ts +21 -0
- package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/factory.js +84 -0
- package/dest/msg_validators/tx_validator/fee_payer_balance.d.ts +10 -0
- package/dest/msg_validators/tx_validator/fee_payer_balance.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/fee_payer_balance.js +20 -0
- package/dest/msg_validators/tx_validator/gas_validator.d.ts +12 -0
- package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/gas_validator.js +110 -0
- package/dest/msg_validators/tx_validator/index.d.ts +9 -1
- package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/index.js +8 -0
- package/dest/msg_validators/tx_validator/metadata_validator.d.ts +10 -5
- package/dest/msg_validators/tx_validator/metadata_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/metadata_validator.js +40 -21
- package/dest/msg_validators/tx_validator/phases_validator.d.ts +15 -0
- package/dest/msg_validators/tx_validator/phases_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/phases_validator.js +93 -0
- package/dest/msg_validators/tx_validator/size_validator.d.ts +8 -0
- package/dest/msg_validators/tx_validator/size_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/size_validator.js +23 -0
- package/dest/msg_validators/tx_validator/test_utils.d.ts +17 -0
- package/dest/msg_validators/tx_validator/test_utils.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/test_utils.js +22 -0
- package/dest/msg_validators/tx_validator/timestamp_validator.d.ts +14 -0
- package/dest/msg_validators/tx_validator/timestamp_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/timestamp_validator.js +32 -0
- package/dest/msg_validators/tx_validator/tx_permitted_validator.d.ts +9 -0
- package/dest/msg_validators/tx_validator/tx_permitted_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/tx_permitted_validator.js +24 -0
- package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts +3 -2
- package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/tx_proof_validator.js +8 -7
- 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 +10 -6
- package/dest/services/discv5/discV5_service.d.ts +10 -9
- package/dest/services/discv5/discV5_service.d.ts.map +1 -1
- package/dest/services/discv5/discV5_service.js +64 -37
- package/dest/services/dummy_service.d.ts +66 -11
- package/dest/services/dummy_service.d.ts.map +1 -1
- package/dest/services/dummy_service.js +130 -5
- package/dest/services/encoding.d.ts +26 -7
- package/dest/services/encoding.d.ts.map +1 -1
- package/dest/services/encoding.js +75 -6
- package/dest/services/gossipsub/scoring.d.ts +1 -1
- package/dest/services/index.d.ts +5 -1
- package/dest/services/index.d.ts.map +1 -1
- package/dest/services/index.js +4 -0
- package/dest/services/libp2p/instrumentation.d.ts +20 -0
- package/dest/services/libp2p/instrumentation.d.ts.map +1 -0
- package/dest/services/libp2p/instrumentation.js +122 -0
- package/dest/services/libp2p/libp2p_service.d.ts +107 -95
- package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
- package/dest/services/libp2p/libp2p_service.js +1328 -313
- package/dest/services/peer-manager/interface.d.ts +23 -0
- package/dest/services/peer-manager/interface.d.ts.map +1 -0
- package/dest/services/peer-manager/interface.js +1 -0
- package/dest/services/peer-manager/metrics.d.ts +12 -3
- package/dest/services/peer-manager/metrics.d.ts.map +1 -1
- package/dest/services/peer-manager/metrics.js +44 -12
- package/dest/services/peer-manager/peer_manager.d.ts +103 -23
- package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
- package/dest/services/peer-manager/peer_manager.js +551 -82
- package/dest/services/peer-manager/peer_scoring.d.ts +7 -2
- package/dest/services/peer-manager/peer_scoring.d.ts.map +1 -1
- package/dest/services/peer-manager/peer_scoring.js +43 -2
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts +47 -0
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts.map +1 -0
- package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.js +566 -0
- package/dest/services/reqresp/batch-tx-requester/config.d.ts +17 -0
- package/dest/services/reqresp/batch-tx-requester/config.d.ts.map +1 -0
- package/dest/services/reqresp/batch-tx-requester/config.js +27 -0
- package/dest/services/reqresp/batch-tx-requester/interface.d.ts +50 -0
- package/dest/services/reqresp/batch-tx-requester/interface.d.ts.map +1 -0
- package/dest/services/reqresp/batch-tx-requester/interface.js +1 -0
- package/dest/services/reqresp/batch-tx-requester/missing_txs.d.ts +37 -0
- package/dest/services/reqresp/batch-tx-requester/missing_txs.d.ts.map +1 -0
- package/dest/services/reqresp/batch-tx-requester/missing_txs.js +151 -0
- package/dest/services/reqresp/batch-tx-requester/peer_collection.d.ts +54 -0
- package/dest/services/reqresp/batch-tx-requester/peer_collection.d.ts.map +1 -0
- package/dest/services/reqresp/batch-tx-requester/peer_collection.js +139 -0
- package/dest/services/reqresp/batch-tx-requester/tx_validator.d.ts +20 -0
- package/dest/services/reqresp/batch-tx-requester/tx_validator.d.ts.map +1 -0
- package/dest/services/reqresp/batch-tx-requester/tx_validator.js +21 -0
- package/dest/services/reqresp/config.d.ts +11 -9
- package/dest/services/reqresp/config.d.ts.map +1 -1
- package/dest/services/reqresp/config.js +18 -4
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts +23 -4
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts.map +1 -1
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.js +73 -10
- package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts +32 -17
- package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts.map +1 -1
- package/dest/services/reqresp/connection-sampler/connection_sampler.js +154 -84
- package/dest/services/reqresp/constants.d.ts +12 -0
- package/dest/services/reqresp/constants.d.ts.map +1 -0
- package/dest/services/reqresp/constants.js +7 -0
- package/dest/services/reqresp/index.d.ts +3 -2
- package/dest/services/reqresp/index.d.ts.map +1 -1
- package/dest/services/reqresp/index.js +2 -1
- package/dest/services/reqresp/interface.d.ts +75 -24
- package/dest/services/reqresp/interface.d.ts.map +1 -1
- package/dest/services/reqresp/interface.js +46 -27
- package/dest/services/reqresp/metrics.d.ts +6 -5
- package/dest/services/reqresp/metrics.d.ts.map +1 -1
- package/dest/services/reqresp/metrics.js +17 -21
- package/dest/services/reqresp/protocols/auth.d.ts +43 -0
- package/dest/services/reqresp/protocols/auth.d.ts.map +1 -0
- package/dest/services/reqresp/protocols/auth.js +71 -0
- package/dest/services/reqresp/protocols/block.d.ts +6 -1
- package/dest/services/reqresp/protocols/block.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/block.js +30 -6
- package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts +34 -0
- package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts.map +1 -0
- package/dest/services/reqresp/protocols/block_txs/bitvector.js +87 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts +11 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts.map +1 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_handler.js +52 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +59 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts.map +1 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.js +105 -0
- package/dest/services/reqresp/protocols/block_txs/index.d.ts +4 -0
- package/dest/services/reqresp/protocols/block_txs/index.d.ts.map +1 -0
- package/dest/services/reqresp/protocols/block_txs/index.js +3 -0
- package/dest/services/reqresp/protocols/goodbye.d.ts +3 -5
- package/dest/services/reqresp/protocols/goodbye.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/goodbye.js +7 -7
- package/dest/services/reqresp/protocols/index.d.ts +3 -1
- package/dest/services/reqresp/protocols/index.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/index.js +2 -0
- package/dest/services/reqresp/protocols/ping.d.ts +1 -3
- package/dest/services/reqresp/protocols/ping.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/status.d.ts +40 -7
- package/dest/services/reqresp/protocols/status.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/status.js +76 -5
- package/dest/services/reqresp/protocols/tx.d.ts +14 -4
- package/dest/services/reqresp/protocols/tx.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/tx.js +34 -6
- package/dest/services/reqresp/rate-limiter/index.d.ts +1 -1
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts +6 -4
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts.map +1 -1
- package/dest/services/reqresp/rate-limiter/rate_limiter.js +10 -2
- 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 +21 -1
- package/dest/services/reqresp/reqresp.d.ts +29 -66
- package/dest/services/reqresp/reqresp.d.ts.map +1 -1
- package/dest/services/reqresp/reqresp.js +753 -248
- package/dest/services/reqresp/status.d.ts +10 -4
- package/dest/services/reqresp/status.d.ts.map +1 -1
- package/dest/services/reqresp/status.js +9 -2
- package/dest/services/service.d.ts +40 -20
- package/dest/services/service.d.ts.map +1 -1
- package/dest/services/tx_collection/config.d.ts +28 -0
- package/dest/services/tx_collection/config.d.ts.map +1 -0
- package/dest/services/tx_collection/config.js +66 -0
- package/dest/services/tx_collection/fast_tx_collection.d.ts +53 -0
- package/dest/services/tx_collection/fast_tx_collection.d.ts.map +1 -0
- package/dest/services/tx_collection/fast_tx_collection.js +311 -0
- package/dest/services/tx_collection/index.d.ts +4 -0
- package/dest/services/tx_collection/index.d.ts.map +1 -0
- package/dest/services/tx_collection/index.js +3 -0
- package/dest/services/tx_collection/instrumentation.d.ts +10 -0
- package/dest/services/tx_collection/instrumentation.d.ts.map +1 -0
- package/dest/services/tx_collection/instrumentation.js +31 -0
- package/dest/services/tx_collection/proposal_tx_collector.d.ts +48 -0
- package/dest/services/tx_collection/proposal_tx_collector.d.ts.map +1 -0
- package/dest/services/tx_collection/proposal_tx_collector.js +50 -0
- package/dest/services/tx_collection/slow_tx_collection.d.ts +53 -0
- package/dest/services/tx_collection/slow_tx_collection.d.ts.map +1 -0
- package/dest/services/tx_collection/slow_tx_collection.js +177 -0
- package/dest/services/tx_collection/tx_collection.d.ts +110 -0
- package/dest/services/tx_collection/tx_collection.d.ts.map +1 -0
- package/dest/services/tx_collection/tx_collection.js +128 -0
- package/dest/services/tx_collection/tx_collection_sink.d.ts +30 -0
- package/dest/services/tx_collection/tx_collection_sink.d.ts.map +1 -0
- package/dest/services/tx_collection/tx_collection_sink.js +111 -0
- package/dest/services/tx_collection/tx_source.d.ts +18 -0
- package/dest/services/tx_collection/tx_source.d.ts.map +1 -0
- package/dest/services/tx_collection/tx_source.js +31 -0
- package/dest/services/tx_provider.d.ts +51 -0
- package/dest/services/tx_provider.d.ts.map +1 -0
- package/dest/services/tx_provider.js +219 -0
- package/dest/services/tx_provider_instrumentation.d.ts +16 -0
- package/dest/services/tx_provider_instrumentation.d.ts.map +1 -0
- package/dest/services/tx_provider_instrumentation.js +34 -0
- package/dest/test-helpers/generate-peer-id-private-keys.d.ts +1 -1
- package/dest/test-helpers/get-ports.d.ts +1 -1
- package/dest/test-helpers/get-ports.d.ts.map +1 -1
- package/dest/test-helpers/index.d.ts +4 -1
- package/dest/test-helpers/index.d.ts.map +1 -1
- package/dest/test-helpers/index.js +3 -0
- package/dest/test-helpers/make-enrs.d.ts +1 -1
- package/dest/test-helpers/make-enrs.d.ts.map +1 -1
- package/dest/test-helpers/make-enrs.js +4 -5
- package/dest/test-helpers/make-test-p2p-clients.d.ts +33 -5
- package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
- package/dest/test-helpers/make-test-p2p-clients.js +86 -16
- package/dest/test-helpers/mock-pubsub.d.ts +59 -0
- package/dest/test-helpers/mock-pubsub.d.ts.map +1 -0
- package/dest/test-helpers/mock-pubsub.js +130 -0
- package/dest/test-helpers/mock-tx-helpers.d.ts +12 -0
- package/dest/test-helpers/mock-tx-helpers.d.ts.map +1 -0
- package/dest/test-helpers/mock-tx-helpers.js +19 -0
- package/dest/test-helpers/reqresp-nodes.d.ts +15 -11
- package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
- package/dest/test-helpers/reqresp-nodes.js +62 -28
- package/dest/test-helpers/test_tx_provider.d.ts +40 -0
- package/dest/test-helpers/test_tx_provider.d.ts.map +1 -0
- package/dest/test-helpers/test_tx_provider.js +41 -0
- package/dest/test-helpers/testbench-utils.d.ts +158 -0
- package/dest/test-helpers/testbench-utils.d.ts.map +1 -0
- package/dest/test-helpers/testbench-utils.js +297 -0
- package/dest/testbench/p2p_client_testbench_worker.d.ts +28 -2
- package/dest/testbench/p2p_client_testbench_worker.d.ts.map +1 -1
- package/dest/testbench/p2p_client_testbench_worker.js +259 -90
- package/dest/testbench/parse_log_file.d.ts +1 -1
- package/dest/testbench/parse_log_file.js +4 -4
- package/dest/testbench/testbench.d.ts +1 -1
- package/dest/testbench/testbench.js +4 -4
- package/dest/testbench/worker_client_manager.d.ts +51 -11
- package/dest/testbench/worker_client_manager.d.ts.map +1 -1
- package/dest/testbench/worker_client_manager.js +232 -53
- package/dest/types/index.d.ts +4 -2
- package/dest/types/index.d.ts.map +1 -1
- package/dest/types/index.js +2 -0
- package/dest/util.d.ts +24 -16
- package/dest/util.d.ts.map +1 -1
- package/dest/util.js +75 -69
- package/dest/versioning.d.ts +4 -4
- package/dest/versioning.d.ts.map +1 -1
- package/dest/versioning.js +8 -3
- package/package.json +32 -27
- package/src/bootstrap/bootstrap.ts +34 -15
- package/src/client/factory.ts +135 -53
- package/src/client/index.ts +1 -0
- package/src/client/interface.ts +213 -0
- package/src/client/p2p_client.ts +476 -383
- package/src/client/test/tx_proposal_collector/README.md +227 -0
- package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +336 -0
- package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.ts +43 -0
- package/src/config.ts +304 -134
- package/src/enr/generate-enr.ts +39 -6
- package/src/errors/attestation-pool.error.ts +13 -0
- package/src/index.ts +4 -0
- package/src/mem_pools/attestation_pool/attestation_pool.ts +119 -24
- package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +352 -201
- package/src/mem_pools/attestation_pool/kv_attestation_pool.ts +233 -72
- package/src/mem_pools/attestation_pool/memory_attestation_pool.ts +199 -96
- package/src/mem_pools/attestation_pool/mocks.ts +24 -17
- package/src/mem_pools/instrumentation.ts +72 -48
- package/src/mem_pools/interface.ts +2 -4
- package/src/mem_pools/tx_pool/README.md +270 -0
- package/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +580 -143
- package/src/mem_pools/tx_pool/eviction/eviction_manager.ts +132 -0
- package/src/mem_pools/tx_pool/eviction/eviction_strategy.ts +208 -0
- package/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts +162 -0
- package/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts +104 -0
- package/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.ts +93 -0
- package/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.ts +106 -0
- package/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.ts +75 -0
- package/src/mem_pools/tx_pool/index.ts +0 -1
- package/src/mem_pools/tx_pool/priority.ts +9 -2
- package/src/mem_pools/tx_pool/tx_pool.ts +75 -10
- package/src/mem_pools/tx_pool/tx_pool_test_suite.ts +225 -36
- package/src/msg_validators/attestation_validator/attestation_validator.ts +72 -14
- package/src/msg_validators/attestation_validator/fisherman_attestation_validator.ts +94 -0
- package/src/msg_validators/attestation_validator/index.ts +1 -0
- package/src/msg_validators/clock_tolerance.ts +51 -0
- package/src/msg_validators/index.ts +1 -1
- package/src/msg_validators/msg_seen_validator/msg_seen_validator.ts +36 -0
- package/src/msg_validators/proposal_validator/block_proposal_validator.ts +10 -0
- package/src/msg_validators/proposal_validator/checkpoint_proposal_validator.ts +13 -0
- package/src/msg_validators/proposal_validator/index.ts +3 -0
- package/src/msg_validators/proposal_validator/proposal_validator.ts +92 -0
- package/src/msg_validators/proposal_validator/proposal_validator_test_suite.ts +230 -0
- package/src/msg_validators/tx_validator/allowed_public_setup.ts +35 -0
- package/src/msg_validators/tx_validator/archive_cache.ts +28 -0
- package/src/msg_validators/tx_validator/block_header_validator.ts +10 -9
- package/src/msg_validators/tx_validator/data_validator.ts +95 -71
- package/src/msg_validators/tx_validator/double_spend_validator.ts +23 -20
- package/src/msg_validators/tx_validator/factory.ts +151 -0
- package/src/msg_validators/tx_validator/fee_payer_balance.ts +40 -0
- package/src/msg_validators/tx_validator/gas_validator.ts +123 -0
- package/src/msg_validators/tx_validator/index.ts +8 -0
- package/src/msg_validators/tx_validator/metadata_validator.ts +72 -24
- package/src/msg_validators/tx_validator/phases_validator.ts +118 -0
- package/src/msg_validators/tx_validator/size_validator.ts +22 -0
- package/src/msg_validators/tx_validator/test_utils.ts +43 -0
- package/src/msg_validators/tx_validator/timestamp_validator.ts +52 -0
- package/src/msg_validators/tx_validator/tx_permitted_validator.ts +22 -0
- package/src/msg_validators/tx_validator/tx_proof_validator.ts +14 -8
- package/src/services/data_store.ts +10 -7
- package/src/services/discv5/discV5_service.ts +85 -39
- package/src/services/dummy_service.ts +198 -9
- package/src/services/encoding.ts +82 -6
- package/src/services/index.ts +4 -0
- package/src/services/libp2p/instrumentation.ts +126 -0
- package/src/services/libp2p/libp2p_service.ts +1170 -353
- package/src/services/peer-manager/interface.ts +29 -0
- package/src/services/peer-manager/metrics.ts +55 -12
- package/src/services/peer-manager/peer_manager.ts +657 -80
- package/src/services/peer-manager/peer_scoring.ts +45 -3
- package/src/services/reqresp/batch-tx-requester/README.md +305 -0
- package/src/services/reqresp/batch-tx-requester/batch_tx_requester.ts +706 -0
- package/src/services/reqresp/batch-tx-requester/config.ts +40 -0
- package/src/services/reqresp/batch-tx-requester/interface.ts +57 -0
- package/src/services/reqresp/batch-tx-requester/missing_txs.ts +209 -0
- package/src/services/reqresp/batch-tx-requester/peer_collection.ts +205 -0
- package/src/services/reqresp/batch-tx-requester/tx_validator.ts +37 -0
- package/src/services/reqresp/config.ts +26 -9
- package/src/services/reqresp/connection-sampler/batch_connection_sampler.ts +77 -10
- package/src/services/reqresp/connection-sampler/connection_sampler.ts +166 -95
- package/src/services/reqresp/constants.ts +14 -0
- package/src/services/reqresp/index.ts +2 -0
- package/src/services/reqresp/interface.ts +95 -37
- package/src/services/reqresp/metrics.ts +40 -28
- package/src/services/reqresp/protocols/auth.ts +83 -0
- package/src/services/reqresp/protocols/block.ts +26 -4
- package/src/services/reqresp/protocols/block_txs/bitvector.ts +106 -0
- package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +67 -0
- package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +121 -0
- package/src/services/reqresp/protocols/block_txs/index.ts +3 -0
- package/src/services/reqresp/protocols/goodbye.ts +9 -7
- package/src/services/reqresp/protocols/index.ts +2 -0
- package/src/services/reqresp/protocols/status.ts +121 -5
- package/src/services/reqresp/protocols/tx.ts +36 -8
- package/src/services/reqresp/rate-limiter/rate_limiter.ts +12 -3
- package/src/services/reqresp/rate-limiter/rate_limits.ts +21 -1
- package/src/services/reqresp/reqresp.ts +449 -271
- package/src/services/reqresp/status.ts +12 -3
- package/src/services/service.ts +65 -22
- package/src/services/tx_collection/config.ts +98 -0
- package/src/services/tx_collection/fast_tx_collection.ts +364 -0
- package/src/services/tx_collection/index.ts +7 -0
- package/src/services/tx_collection/instrumentation.ts +35 -0
- package/src/services/tx_collection/proposal_tx_collector.ts +114 -0
- package/src/services/tx_collection/slow_tx_collection.ts +233 -0
- package/src/services/tx_collection/tx_collection.ts +216 -0
- package/src/services/tx_collection/tx_collection_sink.ts +129 -0
- package/src/services/tx_collection/tx_source.ts +37 -0
- package/src/services/tx_provider.ts +232 -0
- package/src/services/tx_provider_instrumentation.ts +54 -0
- package/src/test-helpers/index.ts +3 -0
- package/src/test-helpers/make-enrs.ts +4 -5
- package/src/test-helpers/make-test-p2p-clients.ts +111 -21
- package/src/test-helpers/mock-pubsub.ts +188 -0
- package/src/test-helpers/mock-tx-helpers.ts +24 -0
- package/src/test-helpers/reqresp-nodes.ts +87 -36
- package/src/test-helpers/test_tx_provider.ts +64 -0
- package/src/test-helpers/testbench-utils.ts +374 -0
- package/src/testbench/p2p_client_testbench_worker.ts +434 -89
- package/src/testbench/parse_log_file.ts +4 -4
- package/src/testbench/testbench.ts +4 -4
- package/src/testbench/worker_client_manager.ts +315 -59
- package/src/types/index.ts +2 -0
- package/src/util.ts +105 -91
- package/src/versioning.ts +11 -4
- package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts +0 -56
- package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/memory_tx_pool.js +0 -141
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.d.ts +0 -8
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.d.ts.map +0 -1
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.js +0 -21
- package/dest/msg_validators/block_proposal_validator/index.d.ts +0 -2
- package/dest/msg_validators/block_proposal_validator/index.d.ts.map +0 -1
- package/dest/msg_validators/block_proposal_validator/index.js +0 -1
- package/src/mem_pools/tx_pool/memory_tx_pool.ts +0 -174
- package/src/msg_validators/block_proposal_validator/block_proposal_validator.ts +0 -29
- package/src/msg_validators/block_proposal_validator/index.ts +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
2
|
+
import { MAX_TXS_PER_BLOCK } from '../../constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* BitVector helper class for representing and serializing bit vectors
|
|
5
|
+
*/ export class BitVector {
|
|
6
|
+
buffer;
|
|
7
|
+
length;
|
|
8
|
+
constructor(buffer, length){
|
|
9
|
+
this.buffer = buffer;
|
|
10
|
+
this.length = length;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Creates new BitVector instance
|
|
14
|
+
* @param length - Length of the bit vector
|
|
15
|
+
* @param indices - Array of indices to set to 1 in the bit vector
|
|
16
|
+
*
|
|
17
|
+
* @returns A new BitVector instance with specified length and set indices
|
|
18
|
+
* */ static init(length, indices) {
|
|
19
|
+
if (indices.length > length) {
|
|
20
|
+
throw new Error('Indices length exceeds specified length');
|
|
21
|
+
}
|
|
22
|
+
const buffer = Buffer.alloc(BitVector.byteLength(length));
|
|
23
|
+
indices.forEach((idx)=>{
|
|
24
|
+
const invalidIndex = idx < 0 || idx >= length;
|
|
25
|
+
if (invalidIndex) {
|
|
26
|
+
throw new Error(`Index ${idx} is out of bounds for BitVector of length ${length}`);
|
|
27
|
+
}
|
|
28
|
+
const byteIndex = Math.floor(idx / 8);
|
|
29
|
+
const bitIndex = idx % 8;
|
|
30
|
+
buffer[byteIndex] |= 1 << bitIndex;
|
|
31
|
+
});
|
|
32
|
+
return new BitVector(buffer, length);
|
|
33
|
+
}
|
|
34
|
+
getLength() {
|
|
35
|
+
return this.length;
|
|
36
|
+
}
|
|
37
|
+
/*
|
|
38
|
+
* Checks if element at index is set to true
|
|
39
|
+
*
|
|
40
|
+
* @param index - Index of the bit to check
|
|
41
|
+
*
|
|
42
|
+
* @returns True if the bit at index is set, false otherwise
|
|
43
|
+
* */ isSet(index) {
|
|
44
|
+
return index >= 0 && index < this.length && !!(this.buffer[Math.floor(index / 8)] & 1 << index % 8);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Returns all indices which are set to true
|
|
48
|
+
* */ getTrueIndices() {
|
|
49
|
+
return Array.from({
|
|
50
|
+
length: this.length
|
|
51
|
+
}, (_, i)=>i).filter((i)=>this.isSet(i));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Returns true if no indices are set to true
|
|
55
|
+
* */ isEmpty() {
|
|
56
|
+
return this.getTrueIndices().length === 0;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Serializes the BitVector object into a Buffer
|
|
60
|
+
*
|
|
61
|
+
* @returns Buffer representation of the BitVector object
|
|
62
|
+
* */ toBuffer() {
|
|
63
|
+
return serializeToBuffer([
|
|
64
|
+
this.length,
|
|
65
|
+
this.buffer
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Deserializes buffer into new BitVector
|
|
70
|
+
*
|
|
71
|
+
* @returns A new BitVector instance
|
|
72
|
+
* */ static fromBuffer(buffer) {
|
|
73
|
+
const reader = BufferReader.asReader(buffer);
|
|
74
|
+
const length = reader.readNumber();
|
|
75
|
+
if (length < 0) {
|
|
76
|
+
throw new Error(`BitVector length ${length} cannot be negative`);
|
|
77
|
+
}
|
|
78
|
+
if (length > MAX_TXS_PER_BLOCK) {
|
|
79
|
+
throw new Error(`BitVector length ${length} exceeds maximum ${MAX_TXS_PER_BLOCK}`);
|
|
80
|
+
}
|
|
81
|
+
const bitBuffer = reader.readBytes(BitVector.byteLength(length));
|
|
82
|
+
return new BitVector(bitBuffer, length);
|
|
83
|
+
}
|
|
84
|
+
static byteLength(length) {
|
|
85
|
+
return Math.ceil(length / 8);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AttestationPool } from '../../../../mem_pools/attestation_pool/attestation_pool.js';
|
|
2
|
+
import type { TxPool } from '../../../../mem_pools/index.js';
|
|
3
|
+
import type { ReqRespSubProtocolHandler } from '../../interface.js';
|
|
4
|
+
/**
|
|
5
|
+
* Handler for block txs requests
|
|
6
|
+
* @param attestationPool - the attestation pool to check for block proposals
|
|
7
|
+
* @param mempools - the mempools containing the tx pool
|
|
8
|
+
* @returns the BlockTxs request handler
|
|
9
|
+
*/
|
|
10
|
+
export declare function reqRespBlockTxsHandler(attestationPool: AttestationPool, txPool: TxPool): ReqRespSubProtocolHandler;
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfdHhzX2hhbmRsZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9zZXJ2aWNlcy9yZXFyZXNwL3Byb3RvY29scy9ibG9ja190eHMvYmxvY2tfdHhzX2hhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0EsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0sNERBQTRELENBQUM7QUFDbEcsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDN0QsT0FBTyxLQUFLLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUtwRTs7Ozs7R0FLRztBQUNILHdCQUFnQixzQkFBc0IsQ0FBQyxlQUFlLEVBQUUsZUFBZSxFQUFFLE1BQU0sRUFBRSxNQUFNLEdBQUcseUJBQXlCLENBZ0RsSCJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block_txs_handler.d.ts","sourceRoot":"","sources":["../../../../../src/services/reqresp/protocols/block_txs/block_txs_handler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAKpE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,yBAAyB,CAgDlH"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { TxArray } from '@aztec/stdlib/tx';
|
|
3
|
+
import { ReqRespStatus, ReqRespStatusError } from '../../status.js';
|
|
4
|
+
import { BitVector } from './bitvector.js';
|
|
5
|
+
import { BlockTxsRequest, BlockTxsResponse } from './block_txs_reqresp.js';
|
|
6
|
+
/**
|
|
7
|
+
* Handler for block txs requests
|
|
8
|
+
* @param attestationPool - the attestation pool to check for block proposals
|
|
9
|
+
* @param mempools - the mempools containing the tx pool
|
|
10
|
+
* @returns the BlockTxs request handler
|
|
11
|
+
*/ export function reqRespBlockTxsHandler(attestationPool, txPool) {
|
|
12
|
+
/**
|
|
13
|
+
* Handler for block txs requests
|
|
14
|
+
* @param msg - the block txs request message
|
|
15
|
+
* @returns the block txs response message
|
|
16
|
+
* @throws if msg is not a valid block txs request
|
|
17
|
+
*/ return async (_peerId, msg)=>{
|
|
18
|
+
let request;
|
|
19
|
+
try {
|
|
20
|
+
request = BlockTxsRequest.fromBuffer(msg);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
throw new ReqRespStatusError(ReqRespStatus.BADLY_FORMED_REQUEST, {
|
|
23
|
+
cause: err
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const blockProposal = await attestationPool.getBlockProposal(request.archiveRoot.toString());
|
|
27
|
+
let requestedTxsHashes;
|
|
28
|
+
if (request.txHashes.length > 0) {
|
|
29
|
+
requestedTxsHashes = request.txHashes;
|
|
30
|
+
}
|
|
31
|
+
// This is scenario in which we don't have this block proposal the peer is requesting from us
|
|
32
|
+
// But peer has sent requested tx hashes, so we can send them the transactions
|
|
33
|
+
if (!blockProposal && requestedTxsHashes !== undefined) {
|
|
34
|
+
const responseTxs = (await txPool.getTxsByHash(requestedTxsHashes)).filter((tx)=>!!tx);
|
|
35
|
+
const response = new BlockTxsResponse(Fr.zero(), new TxArray(...responseTxs), BitVector.init(0, []));
|
|
36
|
+
return response.toBuffer();
|
|
37
|
+
}
|
|
38
|
+
// If don't have this block proposal and peer has not sent requested tx hashes
|
|
39
|
+
if (!blockProposal) {
|
|
40
|
+
throw new ReqRespStatusError(ReqRespStatus.NOT_FOUND);
|
|
41
|
+
}
|
|
42
|
+
const txsAvailableInPool = await txPool.hasTxs(blockProposal.txHashes);
|
|
43
|
+
//Map txs in the pool to their indices in the block proposal
|
|
44
|
+
const availableIndices = txsAvailableInPool.map((hasTx, idx)=>hasTx ? idx : -1).filter((idx)=>idx !== -1);
|
|
45
|
+
const responseBitVector = BitVector.init(blockProposal.txHashes.length, availableIndices);
|
|
46
|
+
const requestedIndices = new Set(request.txIndices.getTrueIndices());
|
|
47
|
+
requestedTxsHashes = blockProposal.txHashes.filter((_, idx)=>requestedIndices.has(idx));
|
|
48
|
+
const responseTxs = (await txPool.getTxsByHash(requestedTxsHashes)).filter((tx)=>!!tx);
|
|
49
|
+
const response = new BlockTxsResponse(request.archiveRoot, new TxArray(...responseTxs), responseBitVector);
|
|
50
|
+
return response.toBuffer();
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
|
+
import type { BlockProposal } from '@aztec/stdlib/p2p';
|
|
4
|
+
import { TxArray, TxHash, TxHashArray } from '@aztec/stdlib/tx';
|
|
5
|
+
import { BitVector } from './bitvector.js';
|
|
6
|
+
/**
|
|
7
|
+
* Request message for requesting specific transactions from a block
|
|
8
|
+
*/
|
|
9
|
+
export declare class BlockTxsRequest {
|
|
10
|
+
readonly archiveRoot: Fr;
|
|
11
|
+
readonly txHashes: TxHashArray;
|
|
12
|
+
readonly txIndices: BitVector;
|
|
13
|
+
constructor(archiveRoot: Fr, txHashes: TxHashArray, txIndices: BitVector);
|
|
14
|
+
/**
|
|
15
|
+
* Creates new BlockTxsRequest given proposal and missing tx hashes
|
|
16
|
+
*
|
|
17
|
+
* @param: blockProposal - The block proposal for which we are making request
|
|
18
|
+
* @param: missingTxHashes - Tx hashes from the proposal we are missing
|
|
19
|
+
* @param: includeFullTxHashes - Whether to include full list of missing tx hashes in the request or just Bitvector indices
|
|
20
|
+
*
|
|
21
|
+
* @returns undefined if there were no missingTxHashes matching BlockProposal hashes, otherwise
|
|
22
|
+
* returns new BlockTxsRequest*/
|
|
23
|
+
static fromBlockProposalAndMissingTxs(blockProposal: BlockProposal, missingTxHashes: TxHash[], includeFullTxHashes?: boolean): BlockTxsRequest | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Deserializes the BlockTxRequest object from a Buffer
|
|
26
|
+
* @param buffer - Buffer or BufferReader object to deserialize
|
|
27
|
+
* @returns An instance of BlockTxRequest
|
|
28
|
+
*/
|
|
29
|
+
static fromBuffer(buffer: Buffer | BufferReader): BlockTxsRequest;
|
|
30
|
+
/**
|
|
31
|
+
* Serializes the BlockTxRequest object into a Buffer
|
|
32
|
+
* @returns Buffer representation of the BlockTxRequest object
|
|
33
|
+
*/
|
|
34
|
+
toBuffer(): Buffer;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Response message containing requested transactions from a block
|
|
38
|
+
*/
|
|
39
|
+
export declare class BlockTxsResponse {
|
|
40
|
+
readonly archiveRoot: Fr;
|
|
41
|
+
readonly txs: TxArray;
|
|
42
|
+
readonly txIndices: BitVector;
|
|
43
|
+
constructor(archiveRoot: Fr, txs: TxArray, txIndices: BitVector);
|
|
44
|
+
/**
|
|
45
|
+
* Deserializes the BlockTxResponse object from a Buffer
|
|
46
|
+
* @param buffer - Buffer or BufferReader object to deserialize
|
|
47
|
+
* @returns An instance of BlockTxResponse
|
|
48
|
+
*/
|
|
49
|
+
static fromBuffer(buffer: Buffer | BufferReader): BlockTxsResponse;
|
|
50
|
+
/**
|
|
51
|
+
* Serializes the BlockTxResponse object into a Buffer
|
|
52
|
+
* @dev: In current implementation, txIndices is serialized as Buffer of unknown length,
|
|
53
|
+
* thus we serialize it last
|
|
54
|
+
* @returns Buffer representation of the BlockTxResponse object
|
|
55
|
+
*/
|
|
56
|
+
toBuffer(): Buffer;
|
|
57
|
+
static empty(): BlockTxsResponse;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfdHhzX3JlcXJlc3AuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9zZXJ2aWNlcy9yZXFyZXNwL3Byb3RvY29scy9ibG9ja190eHMvYmxvY2tfdHhzX3JlcXJlc3AudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxZQUFZLEVBQXFCLE1BQU0sNkJBQTZCLENBQUM7QUFDOUUsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDdkQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFaEUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRTNDOztHQUVHO0FBQ0gscUJBQWEsZUFBZTtJQUd4QixRQUFRLENBQUMsV0FBVyxFQUFFLEVBQUU7SUFFeEIsUUFBUSxDQUFDLFFBQVEsRUFBRSxXQUFXO0lBSzlCLFFBQVEsQ0FBQyxTQUFTLEVBQUUsU0FBUztJQVQvQixZQUVXLFdBQVcsRUFBRSxFQUFFLEVBRWYsUUFBUSxFQUFFLFdBQVcsRUFLckIsU0FBUyxFQUFFLFNBQVMsRUFDM0I7SUFFSjs7Ozs7Ozs7b0NBUWdDO0lBQ2hDLE1BQU0sQ0FBQyw4QkFBOEIsQ0FDbkMsYUFBYSxFQUFFLGFBQWEsRUFDNUIsZUFBZSxFQUFFLE1BQU0sRUFBRSxFQUN6QixtQkFBbUIsVUFBUSxHQUMxQixlQUFlLEdBQUcsU0FBUyxDQW9CN0I7SUFFRDs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEVBQUUsTUFBTSxHQUFHLFlBQVksR0FBRyxlQUFlLENBT2hFO0lBRUQ7OztPQUdHO0lBQ0gsUUFBUSxJQUFJLE1BQU0sQ0FFakI7Q0FDRjtBQUVEOztHQUVHO0FBQ0gscUJBQWEsZ0JBQWdCO0lBRXpCLFFBQVEsQ0FBQyxXQUFXLEVBQUUsRUFBRTtJQUN4QixRQUFRLENBQUMsR0FBRyxFQUFFLE9BQU87SUFHckIsUUFBUSxDQUFDLFNBQVMsRUFBRSxTQUFTO0lBTC9CLFlBQ1csV0FBVyxFQUFFLEVBQUUsRUFDZixHQUFHLEVBQUUsT0FBTyxFQUdaLFNBQVMsRUFBRSxTQUFTLEVBQzNCO0lBRUo7Ozs7T0FJRztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUMsTUFBTSxFQUFFLE1BQU0sR0FBRyxZQUFZLEdBQUcsZ0JBQWdCLENBT2pFO0lBRUQ7Ozs7O09BS0c7SUFDSCxRQUFRLElBQUksTUFBTSxDQUVqQjtJQUVELE1BQU0sQ0FBQyxLQUFLLElBQUksZ0JBQWdCLENBRS9CO0NBQ0YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block_txs_reqresp.d.ts","sourceRoot":"","sources":["../../../../../src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,eAAe;IAGxB,QAAQ,CAAC,WAAW,EAAE,EAAE;IAExB,QAAQ,CAAC,QAAQ,EAAE,WAAW;IAK9B,QAAQ,CAAC,SAAS,EAAE,SAAS;IAT/B,YAEW,WAAW,EAAE,EAAE,EAEf,QAAQ,EAAE,WAAW,EAKrB,SAAS,EAAE,SAAS,EAC3B;IAEJ;;;;;;;;oCAQgC;IAChC,MAAM,CAAC,8BAA8B,CACnC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,MAAM,EAAE,EACzB,mBAAmB,UAAQ,GAC1B,eAAe,GAAG,SAAS,CAoB7B;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,eAAe,CAOhE;IAED;;;OAGG;IACH,QAAQ,IAAI,MAAM,CAEjB;CACF;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAEzB,QAAQ,CAAC,WAAW,EAAE,EAAE;IACxB,QAAQ,CAAC,GAAG,EAAE,OAAO;IAGrB,QAAQ,CAAC,SAAS,EAAE,SAAS;IAL/B,YACW,WAAW,EAAE,EAAE,EACf,GAAG,EAAE,OAAO,EAGZ,SAAS,EAAE,SAAS,EAC3B;IAEJ;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,gBAAgB,CAOjE;IAED;;;;;OAKG;IACH,QAAQ,IAAI,MAAM,CAEjB;IAED,MAAM,CAAC,KAAK,IAAI,gBAAgB,CAE/B;CACF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
+
import { TxArray, TxHashArray } from '@aztec/stdlib/tx';
|
|
4
|
+
import { BitVector } from './bitvector.js';
|
|
5
|
+
/**
|
|
6
|
+
* Request message for requesting specific transactions from a block
|
|
7
|
+
*/ export class BlockTxsRequest {
|
|
8
|
+
archiveRoot;
|
|
9
|
+
txHashes;
|
|
10
|
+
txIndices;
|
|
11
|
+
constructor(// Archive root after the proposed block is applied (proposal identifier)
|
|
12
|
+
archiveRoot, // Hashes of txs we are requesting
|
|
13
|
+
txHashes, // BitVector indicating which txs from the proposal we are requesting
|
|
14
|
+
// 1 means we want the tx, 0 means we don't
|
|
15
|
+
// If we know peer has the Block Proposal then we can use this BitVector
|
|
16
|
+
// Otherwise we can use this optimization
|
|
17
|
+
txIndices){
|
|
18
|
+
this.archiveRoot = archiveRoot;
|
|
19
|
+
this.txHashes = txHashes;
|
|
20
|
+
this.txIndices = txIndices;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates new BlockTxsRequest given proposal and missing tx hashes
|
|
24
|
+
*
|
|
25
|
+
* @param: blockProposal - The block proposal for which we are making request
|
|
26
|
+
* @param: missingTxHashes - Tx hashes from the proposal we are missing
|
|
27
|
+
* @param: includeFullTxHashes - Whether to include full list of missing tx hashes in the request or just Bitvector indices
|
|
28
|
+
*
|
|
29
|
+
* @returns undefined if there were no missingTxHashes matching BlockProposal hashes, otherwise
|
|
30
|
+
* returns new BlockTxsRequest*/ static fromBlockProposalAndMissingTxs(blockProposal, missingTxHashes, includeFullTxHashes = false) {
|
|
31
|
+
if (missingTxHashes.length === 0) {
|
|
32
|
+
return undefined; // No missing txs to request
|
|
33
|
+
}
|
|
34
|
+
const missingHashesSet = new Set(missingTxHashes.map((t)=>t.toString()));
|
|
35
|
+
// We cannot request txs that are not part of the block proposal
|
|
36
|
+
if (!missingHashesSet.isSubsetOf(new Set(blockProposal.txHashes.map((t)=>t.toString())))) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
const missingIndices = blockProposal.txHashes.map((hash, idx)=>missingHashesSet.has(hash.toString()) ? idx : -1).filter((i)=>i != -1);
|
|
40
|
+
const requestBitVector = BitVector.init(blockProposal.txHashes.length, missingIndices);
|
|
41
|
+
const hashes = includeFullTxHashes ? new TxHashArray(...missingTxHashes) : new TxHashArray();
|
|
42
|
+
return new BlockTxsRequest(blockProposal.archive, hashes, requestBitVector);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Deserializes the BlockTxRequest object from a Buffer
|
|
46
|
+
* @param buffer - Buffer or BufferReader object to deserialize
|
|
47
|
+
* @returns An instance of BlockTxRequest
|
|
48
|
+
*/ static fromBuffer(buffer) {
|
|
49
|
+
const reader = BufferReader.asReader(buffer);
|
|
50
|
+
const archiveRoot = Fr.fromBuffer(reader);
|
|
51
|
+
const txHashes = TxHashArray.fromBuffer(reader);
|
|
52
|
+
const txIndices = BitVector.fromBuffer(reader);
|
|
53
|
+
return new BlockTxsRequest(archiveRoot, txHashes, txIndices);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Serializes the BlockTxRequest object into a Buffer
|
|
57
|
+
* @returns Buffer representation of the BlockTxRequest object
|
|
58
|
+
*/ toBuffer() {
|
|
59
|
+
return serializeToBuffer([
|
|
60
|
+
this.archiveRoot,
|
|
61
|
+
this.txHashes.toBuffer(),
|
|
62
|
+
this.txIndices.toBuffer()
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Response message containing requested transactions from a block
|
|
68
|
+
*/ export class BlockTxsResponse {
|
|
69
|
+
archiveRoot;
|
|
70
|
+
txs;
|
|
71
|
+
txIndices;
|
|
72
|
+
constructor(archiveRoot, txs, // BitVector indicating which txs from the proposal are available at the peer
|
|
73
|
+
// 1 means the tx is available, 0 means it is not
|
|
74
|
+
txIndices){
|
|
75
|
+
this.archiveRoot = archiveRoot;
|
|
76
|
+
this.txs = txs;
|
|
77
|
+
this.txIndices = txIndices;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Deserializes the BlockTxResponse object from a Buffer
|
|
81
|
+
* @param buffer - Buffer or BufferReader object to deserialize
|
|
82
|
+
* @returns An instance of BlockTxResponse
|
|
83
|
+
*/ static fromBuffer(buffer) {
|
|
84
|
+
const reader = BufferReader.asReader(buffer);
|
|
85
|
+
const archiveRoot = Fr.fromBuffer(reader);
|
|
86
|
+
const txs = TxArray.fromBuffer(reader);
|
|
87
|
+
const txIndices = BitVector.fromBuffer(reader);
|
|
88
|
+
return new BlockTxsResponse(archiveRoot, txs, txIndices);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Serializes the BlockTxResponse object into a Buffer
|
|
92
|
+
* @dev: In current implementation, txIndices is serialized as Buffer of unknown length,
|
|
93
|
+
* thus we serialize it last
|
|
94
|
+
* @returns Buffer representation of the BlockTxResponse object
|
|
95
|
+
*/ toBuffer() {
|
|
96
|
+
return serializeToBuffer([
|
|
97
|
+
this.archiveRoot,
|
|
98
|
+
this.txs.toBuffer(),
|
|
99
|
+
this.txIndices.toBuffer()
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
static empty() {
|
|
103
|
+
return new BlockTxsResponse(Fr.ZERO, new TxArray(), BitVector.init(0, []));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './block_txs_handler.js';
|
|
2
|
+
export * from './bitvector.js';
|
|
3
|
+
export * from './block_txs_reqresp.js';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9zZXJ2aWNlcy9yZXFyZXNwL3Byb3RvY29scy9ibG9ja190eHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsd0JBQXdCLENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/reqresp/protocols/block_txs/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
import type { PeerId } from '@libp2p/interface';
|
|
4
|
-
import type {
|
|
2
|
+
import type { PeerManagerInterface } from '../../peer-manager/interface.js';
|
|
5
3
|
import { type ReqRespSubProtocolHandler } from '../interface.js';
|
|
6
4
|
import type { ReqResp } from '../reqresp.js';
|
|
7
5
|
/**
|
|
@@ -47,5 +45,5 @@ export declare class GoodbyeProtocolHandler {
|
|
|
47
45
|
* @param peerManager - The peer manager.
|
|
48
46
|
* @returns A resolved promise with the goodbye response.
|
|
49
47
|
*/
|
|
50
|
-
export declare function reqGoodbyeHandler(peerManager:
|
|
51
|
-
//# sourceMappingURL=
|
|
48
|
+
export declare function reqGoodbyeHandler(peerManager: PeerManagerInterface): ReqRespSubProtocolHandler;
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29vZGJ5ZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3NlcnZpY2VzL3JlcXJlc3AvcHJvdG9jb2xzL2dvb2RieWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFaEQsT0FBTyxLQUFLLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUM1RSxPQUFPLEVBQXNCLEtBQUsseUJBQXlCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNyRixPQUFPLEtBQUssRUFBRSxPQUFPLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFN0M7O0dBRUc7QUFDSCxvQkFBWSxhQUFhO0lBQ3ZCLDBGQUEwRjtJQUMxRixRQUFRLElBQU07SUFDZCxzSUFBc0k7SUFDdEksU0FBUyxJQUFNO0lBQ2YsZ0ZBQWdGO0lBQ2hGLFNBQVMsSUFBTTtJQUNmLDJFQUEyRTtJQUMzRSxNQUFNLElBQU07SUFDWiwyQkFBMkI7SUFDM0IsYUFBYSxJQUFNO0lBQ25CLHFCQUFxQjtJQUNyQixPQUFPLElBQU07Q0FDZDtBQUVELHdCQUFnQixtQkFBbUIsQ0FBQyxNQUFNLEVBQUUsYUFBYSxHQUFHLE1BQU0sQ0FFakU7QUFFRCx3QkFBZ0IsbUJBQW1CLENBQUMsTUFBTSxFQUFFLE1BQU0sR0FBRyxhQUFhLENBU2pFO0FBRUQ7Ozs7R0FJRztBQUNILHdCQUFnQixtQkFBbUIsQ0FBQyxNQUFNLEVBQUUsYUFBYSxHQUFHLE1BQU0sQ0FnQmpFO0FBRUQ7O0dBRUc7QUFDSCxxQkFBYSxzQkFBc0I7SUFHckIsT0FBTyxDQUFDLE9BQU87SUFGM0IsT0FBTyxDQUFDLE1BQU0sQ0FBd0M7SUFFdEQsWUFBb0IsT0FBTyxFQUFFLE9BQU8sRUFBSTtJQUUzQixXQUFXLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsYUFBYSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FPN0U7Q0FDRjtBQUVEOzs7Ozs7OztHQVFHO0FBQ0gsd0JBQWdCLGlCQUFpQixDQUFDLFdBQVcsRUFBRSxvQkFBb0IsR0FBRyx5QkFBeUIsQ0FXOUYifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goodbye.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/goodbye.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"goodbye.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/goodbye.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAsB,KAAK,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;GAEG;AACH,oBAAY,aAAa;IACvB,0FAA0F;IAC1F,QAAQ,IAAM;IACd,sIAAsI;IACtI,SAAS,IAAM;IACf,gFAAgF;IAChF,SAAS,IAAM;IACf,2EAA2E;IAC3E,MAAM,IAAM;IACZ,2BAA2B;IAC3B,aAAa,IAAM;IACnB,qBAAqB;IACrB,OAAO,IAAM;CACd;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAEjE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CASjE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAgBjE;AAED;;GAEG;AACH,qBAAa,sBAAsB;IAGrB,OAAO,CAAC,OAAO;IAF3B,OAAO,CAAC,MAAM,CAAwC;IAEtD,YAAoB,OAAO,EAAE,OAAO,EAAI;IAE3B,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7E;CACF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,oBAAoB,GAAG,yBAAyB,CAW9F"}
|
|
@@ -22,7 +22,7 @@ export function decodeGoodbyeReason(buffer) {
|
|
|
22
22
|
throw new Error('Invalid goodbye reason buffer length');
|
|
23
23
|
}
|
|
24
24
|
return buffer[0];
|
|
25
|
-
} catch
|
|
25
|
+
} catch {
|
|
26
26
|
return 6;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -76,12 +76,12 @@ export function decodeGoodbyeReason(buffer) {
|
|
|
76
76
|
* @param peerManager - The peer manager.
|
|
77
77
|
* @returns A resolved promise with the goodbye response.
|
|
78
78
|
*/ export function reqGoodbyeHandler(peerManager) {
|
|
79
|
-
return (peerId,
|
|
80
|
-
const reason = decodeGoodbyeReason(
|
|
79
|
+
return (peerId, msg)=>{
|
|
80
|
+
const reason = decodeGoodbyeReason(msg);
|
|
81
81
|
peerManager.goodbyeReceived(peerId, reason);
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
// NOTE: In the current implementation this won't be sent to peer,
|
|
83
|
+
// as the connection to peer has been already closed by peerManager.goodbyeReceived
|
|
84
|
+
// We have this just to satisfy interface
|
|
85
|
+
return Promise.resolve(Buffer.alloc(0));
|
|
86
86
|
};
|
|
87
87
|
}
|
|
@@ -6,4 +6,6 @@ export * from './status.js';
|
|
|
6
6
|
export * from './tx.js';
|
|
7
7
|
export * from './goodbye.js';
|
|
8
8
|
export * from './block.js';
|
|
9
|
-
|
|
9
|
+
export * from './auth.js';
|
|
10
|
+
export * from './block_txs/index.js';
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9zZXJ2aWNlcy9yZXFyZXNwL3Byb3RvY29scy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILGNBQWMsV0FBVyxDQUFDO0FBQzFCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsU0FBUyxDQUFDO0FBQ3hCLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsV0FBVyxDQUFDO0FBQzFCLGNBQWMsc0JBQXNCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
1
|
/**
|
|
4
2
|
* Handles the ping request.
|
|
5
3
|
* @param _msg - The ping request message.
|
|
6
4
|
* @returns A resolved promise with the pong response.
|
|
7
5
|
*/
|
|
8
6
|
export declare function pingHandler(_msg: any): Promise<Buffer>;
|
|
9
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3NlcnZpY2VzL3JlcXJlc3AvcHJvdG9jb2xzL3BpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7R0FJRztBQUNILHdCQUFnQixXQUFXLENBQUMsSUFBSSxFQUFFLEdBQUcsR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBRXREIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/ping.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/ping.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtD"}
|
|
@@ -1,9 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
3
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
|
+
import type { WorldStateSyncStatus, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
5
|
+
import type { PeerId } from '@libp2p/interface';
|
|
6
|
+
export declare class StatusMessage {
|
|
7
|
+
readonly compressedComponentsVersion: string;
|
|
8
|
+
readonly latestBlockNumber: BlockNumber;
|
|
9
|
+
readonly latestBlockHash: string;
|
|
10
|
+
readonly finalizedBlockNumber: BlockNumber;
|
|
11
|
+
constructor(compressedComponentsVersion: string, latestBlockNumber: BlockNumber, latestBlockHash: string, finalizedBlockNumber: BlockNumber);
|
|
12
|
+
/**
|
|
13
|
+
* Deserializes the StatusMessage object from a Buffer.
|
|
14
|
+
* @param buffer - Buffer or BufferReader object to deserialize.
|
|
15
|
+
* @returns An instance of StatusMessage.
|
|
16
|
+
*/
|
|
17
|
+
static fromBuffer(buffer: Buffer | BufferReader): StatusMessage;
|
|
18
|
+
/**
|
|
19
|
+
* Serializes the StatusMessage object into a Buffer.
|
|
20
|
+
* @returns Buffer representation of the StatusMessage object.
|
|
21
|
+
*/
|
|
22
|
+
toBuffer(): Buffer<ArrayBufferLike>;
|
|
23
|
+
/**
|
|
24
|
+
* Builds Status message
|
|
25
|
+
* @param version - Compressed Components Version
|
|
26
|
+
* @param worldStateSyncStatus - Info about the current sync status
|
|
27
|
+
* @returns StatusMessage instance
|
|
28
|
+
*/
|
|
29
|
+
static fromWorldStateSyncStatus(version: string, syncStatus: WorldStateSyncStatus): StatusMessage;
|
|
30
|
+
static random(): StatusMessage;
|
|
31
|
+
validate(peerStatus: StatusMessage): boolean;
|
|
32
|
+
equals(other: StatusMessage): boolean;
|
|
33
|
+
}
|
|
3
34
|
/**
|
|
4
|
-
* Handles the status request.
|
|
5
|
-
* @param
|
|
6
|
-
* @
|
|
35
|
+
* Handles the status request. By immediately responding with the current node status.
|
|
36
|
+
* @param compressedComponentsVersion - Compressed Components Version
|
|
37
|
+
* @param worldStateSynchronizer - World State Synchronizer to fetch the sync status from.
|
|
38
|
+
* Note the WorldStateSynchronizer must be injected to fetch the fresh sync status, we cannot pass in pre-built StatusMessage.
|
|
39
|
+
* @returns Status message handler
|
|
7
40
|
*/
|
|
8
|
-
export declare function
|
|
9
|
-
//# sourceMappingURL=
|
|
41
|
+
export declare function reqRespStatusHandler(compressedComponentsVersion: string, worldStateSynchronizer: WorldStateSynchronizer, logger?: Logger): (peerId: PeerId, _msg: Buffer<ArrayBufferLike>) => Promise<Buffer<ArrayBufferLike>>;
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHVzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvc2VydmljZXMvcmVxcmVzcC9wcm90b2NvbHMvc3RhdHVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUU5RCxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNwRCxPQUFPLEVBQUUsWUFBWSxFQUFxQixNQUFNLDZCQUE2QixDQUFDO0FBRTlFLE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLHNCQUFzQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFFcEcsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFVaEQscUJBQWEsYUFBYTtJQUV0QixRQUFRLENBQUMsMkJBQTJCLEVBQUUsTUFBTTtJQUM1QyxRQUFRLENBQUMsaUJBQWlCLEVBQUUsV0FBVztJQUN2QyxRQUFRLENBQUMsZUFBZSxFQUFFLE1BQU07SUFDaEMsUUFBUSxDQUFDLG9CQUFvQixFQUFFLFdBQVc7SUFKNUMsWUFDVywyQkFBMkIsRUFBRSxNQUFNLEVBQ25DLGlCQUFpQixFQUFFLFdBQVcsRUFDOUIsZUFBZSxFQUFFLE1BQU0sRUFDdkIsb0JBQW9CLEVBQUUsV0FBVyxFQUkzQztJQUVEOzs7O09BSUc7SUFDSCxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQU0sRUFBRSxNQUFNLEdBQUcsWUFBWSxHQUFHLGFBQWEsQ0FVOUQ7SUFFRDs7O09BR0c7SUFDSCxRQUFRLDRCQVNQO0lBRUQ7Ozs7O09BS0c7SUFDSCxNQUFNLENBQUMsd0JBQXdCLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsb0JBQW9CLEdBQUcsYUFBYSxDQVFoRztJQUVELE1BQU0sQ0FBQyxNQUFNLElBQUksYUFBYSxDQVE3QjtJQUVELFFBQVEsQ0FBQyxVQUFVLEVBQUUsYUFBYSxHQUFHLE9BQU8sQ0FHM0M7SUFFRCxNQUFNLENBQUMsS0FBSyxFQUFFLGFBQWEsR0FBRyxPQUFPLENBT3BDO0NBQ0Y7QUFFRDs7Ozs7O0dBTUc7QUFDSCx3QkFBZ0Isb0JBQW9CLENBQ2xDLDJCQUEyQixFQUFFLE1BQU0sRUFDbkMsc0JBQXNCLEVBQUUsc0JBQXNCLEVBQzlDLE1BQU0sQ0FBQyxFQUFFLE1BQU0sdUZBWWhCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEpG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAUhD,qBAAa,aAAa;IAEtB,QAAQ,CAAC,2BAA2B,EAAE,MAAM;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,WAAW;IACvC,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,oBAAoB,EAAE,WAAW;IAJ5C,YACW,2BAA2B,EAAE,MAAM,EACnC,iBAAiB,EAAE,WAAW,EAC9B,eAAe,EAAE,MAAM,EACvB,oBAAoB,EAAE,WAAW,EAI3C;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,aAAa,CAU9D;IAED;;;OAGG;IACH,QAAQ,4BASP;IAED;;;;;OAKG;IACH,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,aAAa,CAQhG;IAED,MAAM,CAAC,MAAM,IAAI,aAAa,CAQ7B;IAED,QAAQ,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,CAG3C;IAED,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAOpC;CACF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,2BAA2B,EAAE,MAAM,EACnC,sBAAsB,EAAE,sBAAsB,EAC9C,MAAM,CAAC,EAAE,MAAM,uFAYhB"}
|
|
@@ -1,7 +1,78 @@
|
|
|
1
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
import { bufferToHex } from '@aztec/foundation/string';
|
|
5
|
+
import { MAX_BLOCK_HASH_STRING_LENGTH, MAX_VERSION_STRING_LENGTH } from '../constants.js';
|
|
6
|
+
/*
|
|
7
|
+
* P2P Status Message
|
|
8
|
+
* It is used to establish Status handshake between to peers
|
|
9
|
+
* By validating Status handshake we ensure peers are on the same Blockchain fork
|
|
10
|
+
* And get peer sync status
|
|
11
|
+
*/ export class StatusMessage {
|
|
12
|
+
compressedComponentsVersion;
|
|
13
|
+
latestBlockNumber;
|
|
14
|
+
latestBlockHash;
|
|
15
|
+
finalizedBlockNumber;
|
|
16
|
+
constructor(compressedComponentsVersion, latestBlockNumber, latestBlockHash, finalizedBlockNumber){
|
|
17
|
+
this.compressedComponentsVersion = compressedComponentsVersion;
|
|
18
|
+
this.latestBlockNumber = latestBlockNumber;
|
|
19
|
+
this.latestBlockHash = latestBlockHash;
|
|
20
|
+
this.finalizedBlockNumber = finalizedBlockNumber;
|
|
21
|
+
//TODO: add finalizedBlockHash
|
|
22
|
+
//readonly finalizedBlockHash: string,
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Deserializes the StatusMessage object from a Buffer.
|
|
26
|
+
* @param buffer - Buffer or BufferReader object to deserialize.
|
|
27
|
+
* @returns An instance of StatusMessage.
|
|
28
|
+
*/ static fromBuffer(buffer) {
|
|
29
|
+
const reader = BufferReader.asReader(buffer);
|
|
30
|
+
return new StatusMessage(reader.readString(MAX_VERSION_STRING_LENGTH), BlockNumber(reader.readNumber()), reader.readString(MAX_BLOCK_HASH_STRING_LENGTH), BlockNumber(reader.readNumber()));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Serializes the StatusMessage object into a Buffer.
|
|
34
|
+
* @returns Buffer representation of the StatusMessage object.
|
|
35
|
+
*/ toBuffer() {
|
|
36
|
+
return serializeToBuffer([
|
|
37
|
+
this.compressedComponentsVersion,
|
|
38
|
+
this.latestBlockNumber,
|
|
39
|
+
this.latestBlockHash,
|
|
40
|
+
this.finalizedBlockNumber
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Builds Status message
|
|
45
|
+
* @param version - Compressed Components Version
|
|
46
|
+
* @param worldStateSyncStatus - Info about the current sync status
|
|
47
|
+
* @returns StatusMessage instance
|
|
48
|
+
*/ static fromWorldStateSyncStatus(version, syncStatus) {
|
|
49
|
+
return new StatusMessage(version, BlockNumber(syncStatus.latestBlockNumber), syncStatus.latestBlockHash, BlockNumber(syncStatus.finalizedBlockNumber));
|
|
50
|
+
}
|
|
51
|
+
static random() {
|
|
52
|
+
return new StatusMessage('1.0.0', BlockNumber(Math.floor(Math.random() * 100)), Buffer32.random().toString(), BlockNumber(Math.floor(Math.random() * 100)));
|
|
53
|
+
}
|
|
54
|
+
validate(peerStatus) {
|
|
55
|
+
// TODO: Validate other fields as well
|
|
56
|
+
return this.compressedComponentsVersion === peerStatus.compressedComponentsVersion;
|
|
57
|
+
}
|
|
58
|
+
equals(other) {
|
|
59
|
+
return this.compressedComponentsVersion === other.compressedComponentsVersion && this.latestBlockNumber === other.latestBlockNumber && this.latestBlockHash === other.latestBlockHash && this.finalizedBlockNumber === other.finalizedBlockNumber;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
1
62
|
/**
|
|
2
|
-
* Handles the status request.
|
|
3
|
-
* @param
|
|
4
|
-
* @
|
|
5
|
-
|
|
6
|
-
|
|
63
|
+
* Handles the status request. By immediately responding with the current node status.
|
|
64
|
+
* @param compressedComponentsVersion - Compressed Components Version
|
|
65
|
+
* @param worldStateSynchronizer - World State Synchronizer to fetch the sync status from.
|
|
66
|
+
* Note the WorldStateSynchronizer must be injected to fetch the fresh sync status, we cannot pass in pre-built StatusMessage.
|
|
67
|
+
* @returns Status message handler
|
|
68
|
+
*/ export function reqRespStatusHandler(compressedComponentsVersion, worldStateSynchronizer, logger) {
|
|
69
|
+
return async (peerId, _msg)=>{
|
|
70
|
+
logger?.trace(`Received status handshake request from ${peerId}`);
|
|
71
|
+
const status = StatusMessage.fromWorldStateSyncStatus(compressedComponentsVersion, (await worldStateSynchronizer.status()).syncSummary);
|
|
72
|
+
const response = status.toBuffer();
|
|
73
|
+
logger?.trace(`Responding status handshake from ${peerId}`, {
|
|
74
|
+
data: bufferToHex(response)
|
|
75
|
+
});
|
|
76
|
+
return response;
|
|
77
|
+
};
|
|
7
78
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TxHash, TxHashArray } from '@aztec/stdlib/tx';
|
|
2
2
|
import type { MemPools } from '../../../mem_pools/interface.js';
|
|
3
3
|
import type { ReqRespSubProtocolHandler } from '../interface.js';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,17 @@ import type { ReqRespSubProtocolHandler } from '../interface.js';
|
|
|
7
7
|
*
|
|
8
8
|
* Handler for tx requests
|
|
9
9
|
* @param mempools - the mempools
|
|
10
|
-
* @returns the
|
|
10
|
+
* @returns the Tx request handler
|
|
11
11
|
*/
|
|
12
|
-
export declare function reqRespTxHandler
|
|
13
|
-
|
|
12
|
+
export declare function reqRespTxHandler(mempools: MemPools): ReqRespSubProtocolHandler;
|
|
13
|
+
/**
|
|
14
|
+
* Helper function to chunk an array of transaction hashes into chunks of a specified size.
|
|
15
|
+
* This is mainly used in ReqResp in order not to request too many transactions at once from the single peer.
|
|
16
|
+
*
|
|
17
|
+
* @param hashes - The array of transaction hashes to chunk.
|
|
18
|
+
* @param chunkSize - The size of each chunk. Default is 8. Reasoning:
|
|
19
|
+
* Per: https://github.com/AztecProtocol/aztec-packages/issues/15149#issuecomment-2999054485
|
|
20
|
+
* we define Q as max number of transactions per batch, the comment explains why we use 8.
|
|
21
|
+
*/
|
|
22
|
+
export declare function chunkTxHashesRequest(hashes: TxHash[], chunkSize?: number): Array<TxHashArray>;
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9zZXJ2aWNlcy9yZXFyZXNwL3Byb3RvY29scy90eC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQVcsTUFBTSxFQUFFLFdBQVcsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBSWhFLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLHlCQUF5QixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFHakU7Ozs7Ozs7R0FPRztBQUNILHdCQUFnQixnQkFBZ0IsQ0FBQyxRQUFRLEVBQUUsUUFBUSxHQUFHLHlCQUF5QixDQXdCOUU7QUFFRDs7Ozs7Ozs7R0FRRztBQUdILHdCQUFnQixvQkFBb0IsQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLEVBQUUsU0FBUyxTQUFJLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUV4RiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/tx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/services/reqresp/protocols/tx.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAGjE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,yBAAyB,CAwB9E;AAED;;;;;;;;GAQG;AAGH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAExF"}
|