@aztec/p2p 0.0.0-test.1 → 0.0.1-commit.5476d83
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 +1 -1
- package/dest/bootstrap/bootstrap.d.ts.map +1 -1
- package/dest/bootstrap/bootstrap.js +22 -9
- package/dest/client/factory.d.ts +14 -4
- package/dest/client/factory.d.ts.map +1 -1
- package/dest/client/factory.js +60 -24
- 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 +157 -0
- package/dest/client/interface.d.ts.map +1 -0
- package/dest/client/interface.js +9 -0
- package/dest/client/p2p_client.d.ts +72 -187
- package/dest/client/p2p_client.d.ts.map +1 -1
- package/dest/client/p2p_client.js +373 -177
- package/dest/config.d.ts +151 -125
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +183 -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 +68 -8
- 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 +214 -63
- package/dest/mem_pools/attestation_pool/index.d.ts +1 -1
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts +21 -6
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.js +126 -25
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts +19 -6
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.js +111 -21
- package/dest/mem_pools/attestation_pool/mocks.d.ts +225 -5
- package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
- package/dest/mem_pools/attestation_pool/mocks.js +9 -15
- package/dest/mem_pools/index.d.ts +1 -1
- package/dest/mem_pools/instrumentation.d.ts +10 -12
- package/dest/mem_pools/instrumentation.d.ts.map +1 -1
- package/dest/mem_pools/instrumentation.js +35 -38
- package/dest/mem_pools/interface.d.ts +1 -1
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts +62 -13
- 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 +469 -97
- package/dest/mem_pools/tx_pool/index.d.ts +1 -1
- package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts +34 -10
- package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/memory_tx_pool.js +133 -36
- package/dest/mem_pools/tx_pool/priority.d.ts +1 -1
- package/dest/mem_pools/tx_pool/priority.js +1 -1
- package/dest/mem_pools/tx_pool/tx_pool.d.ts +65 -9
- 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 +264 -39
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts +4 -2
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts.map +1 -1
- package/dest/msg_validators/attestation_validator/attestation_validator.js +45 -9
- 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 +67 -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/block_proposal_validator/block_proposal_validator.d.ts +6 -2
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.js +73 -12
- package/dest/msg_validators/block_proposal_validator/index.d.ts +1 -1
- package/dest/msg_validators/index.d.ts +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/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 +1 -1
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/block_header_validator.js +4 -4
- package/dest/msg_validators/tx_validator/data_validator.d.ts +1 -1
- package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/data_validator.js +56 -86
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts +1 -3
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/double_spend_validator.js +21 -27
- package/dest/msg_validators/tx_validator/factory.d.ts +15 -0
- package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/factory.js +74 -0
- package/dest/msg_validators/tx_validator/gas_validator.d.ts +11 -0
- package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/gas_validator.js +115 -0
- package/dest/msg_validators/tx_validator/index.d.ts +8 -1
- package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/index.js +7 -0
- package/dest/msg_validators/tx_validator/metadata_validator.d.ts +8 -4
- package/dest/msg_validators/tx_validator/metadata_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/metadata_validator.js +39 -20
- package/dest/msg_validators/tx_validator/phases_validator.d.ts +14 -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/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 +12 -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 +8 -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 +1 -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 +6 -5
- package/dest/services/data_store.d.ts +1 -1
- package/dest/services/data_store.d.ts.map +1 -1
- 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 +63 -36
- package/dest/services/dummy_service.d.ts +50 -11
- package/dest/services/dummy_service.d.ts.map +1 -1
- package/dest/services/dummy_service.js +88 -5
- package/dest/services/encoding.d.ts +26 -7
- package/dest/services/encoding.d.ts.map +1 -1
- package/dest/services/encoding.js +73 -5
- 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 +164 -0
- package/dest/services/libp2p/libp2p_service.d.ts +78 -89
- package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
- package/dest/services/libp2p/libp2p_service.js +698 -246
- 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 +6 -2
- package/dest/services/peer-manager/metrics.d.ts.map +1 -1
- package/dest/services/peer-manager/metrics.js +22 -2
- package/dest/services/peer-manager/peer_manager.d.ts +102 -22
- package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
- package/dest/services/peer-manager/peer_manager.js +549 -72
- 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 +40 -2
- 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 +2 -2
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts.map +1 -1
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.js +10 -6
- package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts +31 -17
- package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts.map +1 -1
- package/dest/services/reqresp/connection-sampler/connection_sampler.js +142 -84
- 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 +73 -24
- package/dest/services/reqresp/interface.d.ts.map +1 -1
- package/dest/services/reqresp/interface.js +45 -26
- package/dest/services/reqresp/metrics.d.ts +1 -1
- package/dest/services/reqresp/metrics.d.ts.map +1 -1
- 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 +28 -5
- package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts +30 -0
- package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts.map +1 -0
- package/dest/services/reqresp/protocols/block_txs/bitvector.js +75 -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 +39 -0
- package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +47 -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 +75 -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 +39 -7
- package/dest/services/reqresp/protocols/status.d.ts.map +1 -1
- package/dest/services/reqresp/protocols/status.js +72 -5
- package/dest/services/reqresp/protocols/tx.d.ts +13 -2
- 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 +24 -66
- package/dest/services/reqresp/reqresp.d.ts.map +1 -1
- package/dest/services/reqresp/reqresp.js +298 -207
- 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 +23 -19
- package/dest/services/service.d.ts.map +1 -1
- package/dest/services/tx_collection/config.d.ts +25 -0
- package/dest/services/tx_collection/config.d.ts.map +1 -0
- package/dest/services/tx_collection/config.js +58 -0
- package/dest/services/tx_collection/fast_tx_collection.d.ts +50 -0
- package/dest/services/tx_collection/fast_tx_collection.d.ts.map +1 -0
- package/dest/services/tx_collection/fast_tx_collection.js +300 -0
- package/dest/services/tx_collection/index.d.ts +3 -0
- package/dest/services/tx_collection/index.d.ts.map +1 -0
- package/dest/services/tx_collection/index.js +2 -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 +34 -0
- package/dest/services/tx_collection/slow_tx_collection.d.ts +52 -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 +109 -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 +49 -0
- package/dest/services/tx_provider.d.ts.map +1 -0
- package/dest/services/tx_provider.js +210 -0
- package/dest/services/tx_provider_instrumentation.d.ts +13 -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 +2 -1
- package/dest/test-helpers/index.d.ts.map +1 -1
- package/dest/test-helpers/index.js +1 -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/testbench/p2p_client_testbench_worker.d.ts +1 -1
- package/dest/testbench/p2p_client_testbench_worker.js +103 -29
- 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 +1 -6
- package/dest/testbench/worker_client_manager.d.ts.map +1 -1
- package/dest/testbench/worker_client_manager.js +11 -19
- 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 +27 -11
- package/src/client/factory.ts +136 -45
- package/src/client/index.ts +1 -0
- package/src/client/interface.ts +198 -0
- package/src/client/p2p_client.ts +469 -330
- package/src/config.ts +305 -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 +75 -7
- package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +264 -65
- package/src/mem_pools/attestation_pool/kv_attestation_pool.ts +173 -34
- package/src/mem_pools/attestation_pool/memory_attestation_pool.ts +156 -30
- package/src/mem_pools/attestation_pool/mocks.ts +11 -10
- package/src/mem_pools/instrumentation.ts +43 -44
- package/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +549 -108
- package/src/mem_pools/tx_pool/memory_tx_pool.ts +153 -44
- package/src/mem_pools/tx_pool/priority.ts +1 -1
- package/src/mem_pools/tx_pool/tx_pool.ts +67 -8
- package/src/mem_pools/tx_pool/tx_pool_test_suite.ts +217 -34
- package/src/msg_validators/attestation_validator/attestation_validator.ts +54 -11
- package/src/msg_validators/attestation_validator/fisherman_attestation_validator.ts +91 -0
- package/src/msg_validators/attestation_validator/index.ts +1 -0
- package/src/msg_validators/block_proposal_validator/block_proposal_validator.ts +82 -14
- package/src/msg_validators/msg_seen_validator/msg_seen_validator.ts +36 -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 +4 -4
- package/src/msg_validators/tx_validator/data_validator.ts +81 -69
- package/src/msg_validators/tx_validator/double_spend_validator.ts +19 -17
- package/src/msg_validators/tx_validator/factory.ts +109 -0
- package/src/msg_validators/tx_validator/gas_validator.ts +134 -0
- package/src/msg_validators/tx_validator/index.ts +7 -0
- package/src/msg_validators/tx_validator/metadata_validator.ts +58 -21
- package/src/msg_validators/tx_validator/phases_validator.ts +116 -0
- package/src/msg_validators/tx_validator/test_utils.ts +43 -0
- package/src/msg_validators/tx_validator/timestamp_validator.ts +46 -0
- package/src/msg_validators/tx_validator/tx_permitted_validator.ts +17 -0
- package/src/msg_validators/tx_validator/tx_proof_validator.ts +6 -5
- package/src/services/discv5/discV5_service.ts +84 -38
- package/src/services/dummy_service.ts +147 -9
- package/src/services/encoding.ts +80 -5
- package/src/services/index.ts +4 -0
- package/src/services/libp2p/instrumentation.ts +167 -0
- package/src/services/libp2p/libp2p_service.ts +866 -294
- package/src/services/peer-manager/interface.ts +29 -0
- package/src/services/peer-manager/metrics.ts +26 -1
- package/src/services/peer-manager/peer_manager.ts +654 -78
- package/src/services/peer-manager/peer_scoring.ts +46 -3
- package/src/services/reqresp/config.ts +26 -9
- package/src/services/reqresp/connection-sampler/batch_connection_sampler.ts +12 -6
- package/src/services/reqresp/connection-sampler/connection_sampler.ts +148 -95
- package/src/services/reqresp/index.ts +2 -0
- package/src/services/reqresp/interface.ts +91 -36
- package/src/services/reqresp/metrics.ts +4 -1
- package/src/services/reqresp/protocols/auth.ts +83 -0
- package/src/services/reqresp/protocols/block.ts +24 -3
- package/src/services/reqresp/protocols/block_txs/bitvector.ts +90 -0
- package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +53 -0
- package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +79 -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 +117 -5
- package/src/services/reqresp/protocols/tx.ts +35 -6
- 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 +387 -256
- package/src/services/reqresp/status.ts +12 -3
- package/src/services/service.ts +45 -21
- package/src/services/tx_collection/config.ts +84 -0
- package/src/services/tx_collection/fast_tx_collection.ts +340 -0
- package/src/services/tx_collection/index.ts +2 -0
- package/src/services/tx_collection/instrumentation.ts +43 -0
- package/src/services/tx_collection/slow_tx_collection.ts +233 -0
- package/src/services/tx_collection/tx_collection.ts +215 -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 +216 -0
- package/src/services/tx_provider_instrumentation.ts +44 -0
- package/src/test-helpers/index.ts +1 -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 +86 -35
- package/src/testbench/p2p_client_testbench_worker.ts +151 -25
- package/src/testbench/parse_log_file.ts +4 -4
- package/src/testbench/testbench.ts +4 -4
- package/src/testbench/worker_client_manager.ts +17 -23
- package/src/types/index.ts +2 -0
- package/src/util.ts +105 -91
- package/src/versioning.ts +11 -4
|
@@ -1,38 +1,89 @@
|
|
|
1
1
|
import { unfreeze } from '@aztec/foundation/types';
|
|
2
2
|
import { GasFees } from '@aztec/stdlib/gas';
|
|
3
3
|
import { mockTx } from '@aztec/stdlib/testing';
|
|
4
|
+
import { BlockHeader, GlobalVariables } from '@aztec/stdlib/tx';
|
|
4
5
|
/**
|
|
5
6
|
* Tests a TxPool implementation.
|
|
6
7
|
* @param getTxPool - Gets a fresh TxPool
|
|
7
8
|
*/ export function describeTxPool(getTxPool) {
|
|
8
9
|
let pool;
|
|
10
|
+
const minedBlockHeader = BlockHeader.empty({
|
|
11
|
+
globalVariables: GlobalVariables.empty({
|
|
12
|
+
blockNumber: 1,
|
|
13
|
+
timestamp: 0n
|
|
14
|
+
})
|
|
15
|
+
});
|
|
9
16
|
beforeEach(()=>{
|
|
10
17
|
pool = getTxPool();
|
|
11
18
|
});
|
|
12
|
-
|
|
19
|
+
afterEach(()=>{
|
|
20
|
+
pool.removeAllListeners('txs-added');
|
|
21
|
+
});
|
|
22
|
+
it('adds txs to the pool as pending', async ()=>{
|
|
13
23
|
const tx1 = await mockTx();
|
|
14
24
|
await pool.addTxs([
|
|
15
25
|
tx1
|
|
16
26
|
]);
|
|
17
|
-
const poolTx = await pool.getTxByHash(
|
|
18
|
-
expect(
|
|
19
|
-
await expect(pool.getTxStatus(
|
|
27
|
+
const poolTx = await pool.getTxByHash(tx1.getTxHash());
|
|
28
|
+
expect(poolTx.getTxHash()).toEqual(tx1.getTxHash());
|
|
29
|
+
await expect(pool.getTxStatus(tx1.getTxHash())).resolves.toEqual('pending');
|
|
20
30
|
await expect(pool.getPendingTxHashes()).resolves.toEqual([
|
|
21
|
-
|
|
31
|
+
tx1.getTxHash()
|
|
22
32
|
]);
|
|
33
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(1);
|
|
23
34
|
});
|
|
24
|
-
it('
|
|
25
|
-
const tx1 = await mockTx();
|
|
35
|
+
it('emits txs-added event with new txs', async ()=>{
|
|
36
|
+
const tx1 = await mockTx(); // existing and pending
|
|
37
|
+
const tx2 = await mockTx(); // mined but not known
|
|
38
|
+
const tx3 = await mockTx(); // brand new
|
|
26
39
|
await pool.addTxs([
|
|
27
40
|
tx1
|
|
28
41
|
]);
|
|
42
|
+
await pool.markAsMined([
|
|
43
|
+
tx2.getTxHash()
|
|
44
|
+
], minedBlockHeader);
|
|
45
|
+
let txsFromEvent = undefined;
|
|
46
|
+
pool.once('txs-added', ({ txs })=>{
|
|
47
|
+
txsFromEvent = txs;
|
|
48
|
+
});
|
|
49
|
+
await pool.addTxs([
|
|
50
|
+
tx1,
|
|
51
|
+
tx2,
|
|
52
|
+
tx3
|
|
53
|
+
]);
|
|
54
|
+
expect(txsFromEvent).toBeDefined();
|
|
55
|
+
expect(txsFromEvent).toHaveLength(2);
|
|
56
|
+
expect(txsFromEvent).toEqual(expect.arrayContaining([
|
|
57
|
+
tx2,
|
|
58
|
+
tx3
|
|
59
|
+
]));
|
|
60
|
+
});
|
|
61
|
+
it('permanently deletes pending txs and soft-deletes mined txs', async ()=>{
|
|
62
|
+
const pendingTx = await mockTx(1);
|
|
63
|
+
const minedTx = await mockTx(2);
|
|
64
|
+
await pool.addTxs([
|
|
65
|
+
pendingTx,
|
|
66
|
+
minedTx
|
|
67
|
+
]);
|
|
68
|
+
await pool.markAsMined([
|
|
69
|
+
minedTx.getTxHash()
|
|
70
|
+
], minedBlockHeader);
|
|
71
|
+
// Delete a pending tx - should be permanently deleted
|
|
72
|
+
await pool.deleteTxs([
|
|
73
|
+
pendingTx.getTxHash()
|
|
74
|
+
]);
|
|
75
|
+
await expect(pool.getTxByHash(pendingTx.getTxHash())).resolves.toBeUndefined();
|
|
76
|
+
await expect(pool.getTxStatus(pendingTx.getTxHash())).resolves.toBeUndefined();
|
|
77
|
+
// Delete a mined tx - should be soft-deleted (still in storage)
|
|
29
78
|
await pool.deleteTxs([
|
|
30
|
-
|
|
79
|
+
minedTx.getTxHash()
|
|
31
80
|
]);
|
|
32
|
-
await expect(pool.getTxByHash(
|
|
33
|
-
await expect(pool.getTxStatus(
|
|
81
|
+
await expect(pool.getTxByHash(minedTx.getTxHash())).resolves.toBeDefined();
|
|
82
|
+
await expect(pool.getTxStatus(minedTx.getTxHash())).resolves.toEqual('deleted');
|
|
83
|
+
await expect(pool.getMinedTxHashes()).resolves.toEqual([]);
|
|
84
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(0);
|
|
34
85
|
});
|
|
35
|
-
it('
|
|
86
|
+
it('marks txs as mined', async ()=>{
|
|
36
87
|
const tx1 = await mockTx(1);
|
|
37
88
|
const tx2 = await mockTx(2);
|
|
38
89
|
await pool.addTxs([
|
|
@@ -40,21 +91,22 @@ import { mockTx } from '@aztec/stdlib/testing';
|
|
|
40
91
|
tx2
|
|
41
92
|
]);
|
|
42
93
|
await pool.markAsMined([
|
|
43
|
-
|
|
44
|
-
],
|
|
45
|
-
await expect(pool.getTxByHash(
|
|
46
|
-
await expect(pool.getTxStatus(
|
|
94
|
+
tx1.getTxHash()
|
|
95
|
+
], minedBlockHeader);
|
|
96
|
+
await expect(pool.getTxByHash(tx1.getTxHash())).resolves.toEqual(tx1);
|
|
97
|
+
await expect(pool.getTxStatus(tx1.getTxHash())).resolves.toEqual('mined');
|
|
47
98
|
await expect(pool.getMinedTxHashes()).resolves.toEqual([
|
|
48
99
|
[
|
|
49
|
-
|
|
100
|
+
tx1.getTxHash(),
|
|
50
101
|
1
|
|
51
102
|
]
|
|
52
103
|
]);
|
|
53
104
|
await expect(pool.getPendingTxHashes()).resolves.toEqual([
|
|
54
|
-
|
|
105
|
+
tx2.getTxHash()
|
|
55
106
|
]);
|
|
107
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(1);
|
|
56
108
|
});
|
|
57
|
-
it('
|
|
109
|
+
it('marks txs as pending after being mined', async ()=>{
|
|
58
110
|
const tx1 = await mockTx(1);
|
|
59
111
|
const tx2 = await mockTx(2);
|
|
60
112
|
await pool.addTxs([
|
|
@@ -62,35 +114,36 @@ import { mockTx } from '@aztec/stdlib/testing';
|
|
|
62
114
|
tx2
|
|
63
115
|
]);
|
|
64
116
|
await pool.markAsMined([
|
|
65
|
-
|
|
66
|
-
],
|
|
117
|
+
tx1.getTxHash()
|
|
118
|
+
], minedBlockHeader);
|
|
67
119
|
await pool.markMinedAsPending([
|
|
68
|
-
|
|
120
|
+
tx1.getTxHash()
|
|
69
121
|
]);
|
|
70
122
|
await expect(pool.getMinedTxHashes()).resolves.toEqual([]);
|
|
71
123
|
const pending = await pool.getPendingTxHashes();
|
|
72
124
|
expect(pending).toHaveLength(2);
|
|
73
125
|
expect(pending).toEqual(expect.arrayContaining([
|
|
74
|
-
|
|
75
|
-
|
|
126
|
+
tx1.getTxHash(),
|
|
127
|
+
tx2.getTxHash()
|
|
76
128
|
]));
|
|
129
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(2);
|
|
77
130
|
});
|
|
78
|
-
it('
|
|
131
|
+
it('only marks txs as pending if they are known', async ()=>{
|
|
79
132
|
const tx1 = await mockTx(1);
|
|
80
133
|
// simulate a situation where not all peers have all the txs
|
|
81
134
|
const tx2 = await mockTx(2);
|
|
82
|
-
const someTxHashThatThisPeerDidNotSee =
|
|
135
|
+
const someTxHashThatThisPeerDidNotSee = tx2.getTxHash();
|
|
83
136
|
await pool.addTxs([
|
|
84
137
|
tx1
|
|
85
138
|
]);
|
|
86
139
|
// this peer knows that tx2 was mined, but it does not have the tx object
|
|
87
140
|
await pool.markAsMined([
|
|
88
|
-
|
|
141
|
+
tx1.getTxHash(),
|
|
89
142
|
someTxHashThatThisPeerDidNotSee
|
|
90
|
-
],
|
|
143
|
+
], minedBlockHeader);
|
|
91
144
|
expect(await pool.getMinedTxHashes()).toEqual(expect.arrayContaining([
|
|
92
145
|
[
|
|
93
|
-
|
|
146
|
+
tx1.getTxHash(),
|
|
94
147
|
1
|
|
95
148
|
],
|
|
96
149
|
[
|
|
@@ -100,15 +153,16 @@ import { mockTx } from '@aztec/stdlib/testing';
|
|
|
100
153
|
]));
|
|
101
154
|
// reorg: both txs should now become available again
|
|
102
155
|
await pool.markMinedAsPending([
|
|
103
|
-
|
|
156
|
+
tx1.getTxHash(),
|
|
104
157
|
someTxHashThatThisPeerDidNotSee
|
|
105
158
|
]);
|
|
106
159
|
await expect(pool.getMinedTxHashes()).resolves.toEqual([]);
|
|
107
160
|
await expect(pool.getPendingTxHashes()).resolves.toEqual([
|
|
108
|
-
|
|
161
|
+
tx1.getTxHash()
|
|
109
162
|
]); // tx2 is not in the pool
|
|
163
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(1);
|
|
110
164
|
});
|
|
111
|
-
it('
|
|
165
|
+
it('returns all transactions in the pool', async ()=>{
|
|
112
166
|
const tx1 = await mockTx(1);
|
|
113
167
|
const tx2 = await mockTx(2);
|
|
114
168
|
const tx3 = await mockTx(3);
|
|
@@ -124,8 +178,9 @@ import { mockTx } from '@aztec/stdlib/testing';
|
|
|
124
178
|
tx2,
|
|
125
179
|
tx3
|
|
126
180
|
]));
|
|
181
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(3);
|
|
127
182
|
});
|
|
128
|
-
it('
|
|
183
|
+
it('returns all txHashes in the pool', async ()=>{
|
|
129
184
|
const tx1 = await mockTx(1);
|
|
130
185
|
const tx2 = await mockTx(2);
|
|
131
186
|
const tx3 = await mockTx(3);
|
|
@@ -135,14 +190,73 @@ import { mockTx } from '@aztec/stdlib/testing';
|
|
|
135
190
|
tx3
|
|
136
191
|
]);
|
|
137
192
|
const poolTxHashes = await pool.getAllTxHashes();
|
|
193
|
+
const expectedHashes = [
|
|
194
|
+
tx1,
|
|
195
|
+
tx2,
|
|
196
|
+
tx3
|
|
197
|
+
].map((tx)=>tx.getTxHash());
|
|
138
198
|
expect(poolTxHashes).toHaveLength(3);
|
|
139
|
-
expect(poolTxHashes).toEqual(expect.arrayContaining(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
199
|
+
expect(poolTxHashes).toEqual(expect.arrayContaining(expectedHashes));
|
|
200
|
+
await expect(pool.getPendingTxCount()).resolves.toEqual(3);
|
|
201
|
+
});
|
|
202
|
+
it('returns txs by their hash', async ()=>{
|
|
203
|
+
const tx1 = await mockTx(1);
|
|
204
|
+
const tx2 = await mockTx(2);
|
|
205
|
+
const tx3 = await mockTx(3);
|
|
206
|
+
await pool.addTxs([
|
|
207
|
+
tx1,
|
|
208
|
+
tx2,
|
|
209
|
+
tx3
|
|
210
|
+
]);
|
|
211
|
+
const requestedTxs = await pool.getTxsByHash([
|
|
212
|
+
tx1.getTxHash(),
|
|
213
|
+
tx3.getTxHash()
|
|
214
|
+
]);
|
|
215
|
+
expect(requestedTxs).toHaveLength(2);
|
|
216
|
+
expect(requestedTxs).toEqual(expect.arrayContaining([
|
|
217
|
+
tx1,
|
|
218
|
+
tx3
|
|
143
219
|
]));
|
|
144
220
|
});
|
|
145
|
-
it('
|
|
221
|
+
it('returns a large number of transactions by their hash', async ()=>{
|
|
222
|
+
const numTxs = 1000;
|
|
223
|
+
const txs = await Promise.all(Array.from({
|
|
224
|
+
length: numTxs
|
|
225
|
+
}, (_, i)=>mockTx(i)));
|
|
226
|
+
const hashes = txs.map((tx)=>tx.getTxHash());
|
|
227
|
+
await pool.addTxs(txs);
|
|
228
|
+
const requestedTxs = await pool.getTxsByHash(hashes);
|
|
229
|
+
expect(requestedTxs).toHaveLength(numTxs);
|
|
230
|
+
expect(requestedTxs).toEqual(expect.arrayContaining(txs));
|
|
231
|
+
});
|
|
232
|
+
it('returns whether or not txs exist', async ()=>{
|
|
233
|
+
const tx1 = await mockTx(1);
|
|
234
|
+
const tx2 = await mockTx(2);
|
|
235
|
+
const tx3 = await mockTx(3);
|
|
236
|
+
await pool.addTxs([
|
|
237
|
+
tx1,
|
|
238
|
+
tx2,
|
|
239
|
+
tx3
|
|
240
|
+
]);
|
|
241
|
+
const tx4 = await mockTx(4);
|
|
242
|
+
const tx5 = await mockTx(5);
|
|
243
|
+
const availability = await pool.hasTxs([
|
|
244
|
+
tx1.getTxHash(),
|
|
245
|
+
tx2.getTxHash(),
|
|
246
|
+
tx3.getTxHash(),
|
|
247
|
+
tx4.getTxHash(),
|
|
248
|
+
tx5.getTxHash()
|
|
249
|
+
]);
|
|
250
|
+
expect(availability).toHaveLength(5);
|
|
251
|
+
expect(availability).toEqual(expect.arrayContaining([
|
|
252
|
+
true,
|
|
253
|
+
true,
|
|
254
|
+
true,
|
|
255
|
+
false,
|
|
256
|
+
false
|
|
257
|
+
]));
|
|
258
|
+
});
|
|
259
|
+
it('returns pending tx hashes sorted by priority', async ()=>{
|
|
146
260
|
const withPriorityFee = (tx, fee)=>{
|
|
147
261
|
unfreeze(tx.data.constants.txContext.gasSettings).maxPriorityFeesPerGas = new GasFees(fee, fee);
|
|
148
262
|
return tx;
|
|
@@ -159,11 +273,122 @@ import { mockTx } from '@aztec/stdlib/testing';
|
|
|
159
273
|
]);
|
|
160
274
|
const poolTxHashes = await pool.getPendingTxHashes();
|
|
161
275
|
expect(poolTxHashes).toHaveLength(4);
|
|
162
|
-
expect(poolTxHashes).toEqual(
|
|
276
|
+
expect(poolTxHashes).toEqual([
|
|
163
277
|
tx4,
|
|
164
278
|
tx1,
|
|
165
279
|
tx3,
|
|
166
280
|
tx2
|
|
167
|
-
].map((tx)=>tx.getTxHash()))
|
|
281
|
+
].map((tx)=>tx.getTxHash()));
|
|
282
|
+
});
|
|
283
|
+
describe('soft-delete', ()=>{
|
|
284
|
+
it('soft-deletes mined txs and keeps them in storage', async ()=>{
|
|
285
|
+
const txs = await Promise.all([
|
|
286
|
+
mockTx(1),
|
|
287
|
+
mockTx(2),
|
|
288
|
+
mockTx(3)
|
|
289
|
+
]);
|
|
290
|
+
await pool.addTxs(txs);
|
|
291
|
+
// Mark first tx as mined
|
|
292
|
+
await pool.markAsMined([
|
|
293
|
+
txs[0].getTxHash()
|
|
294
|
+
], minedBlockHeader);
|
|
295
|
+
// Verify initial state
|
|
296
|
+
await expect(pool.getPendingTxCount()).resolves.toBe(2);
|
|
297
|
+
await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeDefined();
|
|
298
|
+
await expect(pool.getTxByHash(txs[1].getTxHash())).resolves.toBeDefined();
|
|
299
|
+
// Delete mined tx - should be soft-deleted
|
|
300
|
+
await pool.deleteTxs([
|
|
301
|
+
txs[0].getTxHash()
|
|
302
|
+
]);
|
|
303
|
+
// Delete pending tx - should be permanently deleted
|
|
304
|
+
await pool.deleteTxs([
|
|
305
|
+
txs[1].getTxHash()
|
|
306
|
+
]);
|
|
307
|
+
// Verify mined tx still exists in storage but has 'deleted' status
|
|
308
|
+
await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeDefined();
|
|
309
|
+
await expect(pool.getTxStatus(txs[0].getTxHash())).resolves.toEqual('deleted');
|
|
310
|
+
// Verify pending tx is permanently deleted
|
|
311
|
+
await expect(pool.getTxByHash(txs[1].getTxHash())).resolves.toBeUndefined();
|
|
312
|
+
await expect(pool.getTxStatus(txs[1].getTxHash())).resolves.toBeUndefined();
|
|
313
|
+
// Verify remaining pending count
|
|
314
|
+
await expect(pool.getPendingTxCount()).resolves.toBe(1);
|
|
315
|
+
// Verify pending hashes don't include deleted txs
|
|
316
|
+
const pendingHashes = await pool.getPendingTxHashes();
|
|
317
|
+
expect(pendingHashes).toHaveLength(1);
|
|
318
|
+
expect(pendingHashes.map((h)=>h.toString())).toContain(txs[2].getTxHash().toString());
|
|
319
|
+
});
|
|
320
|
+
it('cleans up old deleted mined transactions', async ()=>{
|
|
321
|
+
const txs = await Promise.all([
|
|
322
|
+
mockTx(1),
|
|
323
|
+
mockTx(2),
|
|
324
|
+
mockTx(3)
|
|
325
|
+
]);
|
|
326
|
+
await pool.addTxs(txs);
|
|
327
|
+
// Mark first two as mined in block 1
|
|
328
|
+
await pool.markAsMined([
|
|
329
|
+
txs[0].getTxHash(),
|
|
330
|
+
txs[1].getTxHash()
|
|
331
|
+
], minedBlockHeader);
|
|
332
|
+
// Soft-delete mined transactions
|
|
333
|
+
await pool.deleteTxs([
|
|
334
|
+
txs[0].getTxHash(),
|
|
335
|
+
txs[1].getTxHash()
|
|
336
|
+
]);
|
|
337
|
+
// Clean up deleted mined txs from block 1 and earlier
|
|
338
|
+
const deletedCount = await pool.cleanupDeletedMinedTxs(1);
|
|
339
|
+
// Verify old transactions are permanently deleted
|
|
340
|
+
expect(deletedCount).toBe(2);
|
|
341
|
+
await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeUndefined();
|
|
342
|
+
await expect(pool.getTxByHash(txs[1].getTxHash())).resolves.toBeUndefined();
|
|
343
|
+
await expect(pool.getTxByHash(txs[2].getTxHash())).resolves.toBeDefined();
|
|
344
|
+
});
|
|
345
|
+
it('does not clean up recent deleted mined transactions', async ()=>{
|
|
346
|
+
const txs = await Promise.all([
|
|
347
|
+
mockTx(1),
|
|
348
|
+
mockTx(2)
|
|
349
|
+
]);
|
|
350
|
+
await pool.addTxs(txs);
|
|
351
|
+
// Mark as mined in block 2
|
|
352
|
+
const laterBlockHeader = BlockHeader.empty({
|
|
353
|
+
globalVariables: GlobalVariables.empty({
|
|
354
|
+
blockNumber: 2,
|
|
355
|
+
timestamp: 0n
|
|
356
|
+
})
|
|
357
|
+
});
|
|
358
|
+
await pool.markAsMined([
|
|
359
|
+
txs[0].getTxHash()
|
|
360
|
+
], laterBlockHeader);
|
|
361
|
+
// Soft-delete a mined transaction
|
|
362
|
+
await pool.deleteTxs([
|
|
363
|
+
txs[0].getTxHash()
|
|
364
|
+
]);
|
|
365
|
+
// Try to clean up with block 1 (before the mined block)
|
|
366
|
+
const deletedCount = await pool.cleanupDeletedMinedTxs(1);
|
|
367
|
+
// Verify no transactions were cleaned up
|
|
368
|
+
expect(deletedCount).toBe(0);
|
|
369
|
+
await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeDefined();
|
|
370
|
+
});
|
|
371
|
+
it('restores deleted mined tx when it is mined again', async ()=>{
|
|
372
|
+
const tx = await mockTx(1);
|
|
373
|
+
await pool.addTxs([
|
|
374
|
+
tx
|
|
375
|
+
]);
|
|
376
|
+
// Mark as mined
|
|
377
|
+
await pool.markAsMined([
|
|
378
|
+
tx.getTxHash()
|
|
379
|
+
], minedBlockHeader);
|
|
380
|
+
// Soft-delete it
|
|
381
|
+
await pool.deleteTxs([
|
|
382
|
+
tx.getTxHash()
|
|
383
|
+
]);
|
|
384
|
+
await expect(pool.getTxStatus(tx.getTxHash())).resolves.toEqual('deleted');
|
|
385
|
+
// Mark as mined again (e.g., after a reorg)
|
|
386
|
+
await pool.markAsMined([
|
|
387
|
+
tx.getTxHash()
|
|
388
|
+
], minedBlockHeader);
|
|
389
|
+
// Should be back to mined status
|
|
390
|
+
await expect(pool.getTxStatus(tx.getTxHash())).resolves.toEqual('mined');
|
|
391
|
+
await expect(pool.getTxByHash(tx.getTxHash())).resolves.toBeDefined();
|
|
392
|
+
});
|
|
168
393
|
});
|
|
169
394
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { EpochCacheInterface } from '@aztec/epoch-cache';
|
|
2
|
+
import { type Logger } from '@aztec/foundation/log';
|
|
2
3
|
import { type BlockAttestation, type P2PValidator, PeerErrorSeverity } from '@aztec/stdlib/p2p';
|
|
3
4
|
export declare class AttestationValidator implements P2PValidator<BlockAttestation> {
|
|
4
|
-
|
|
5
|
+
protected epochCache: EpochCacheInterface;
|
|
6
|
+
protected logger: Logger;
|
|
5
7
|
constructor(epochCache: EpochCacheInterface);
|
|
6
8
|
validate(message: BlockAttestation): Promise<PeerErrorSeverity | undefined>;
|
|
7
9
|
}
|
|
8
|
-
//# sourceMappingURL=
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ZXN0YXRpb25fdmFsaWRhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbXNnX3ZhbGlkYXRvcnMvYXR0ZXN0YXRpb25fdmFsaWRhdG9yL2F0dGVzdGF0aW9uX3ZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxtQkFBbUIsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRTlELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUNsRSxPQUFPLEVBQUUsS0FBSyxnQkFBZ0IsRUFBRSxLQUFLLFlBQVksRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRWhHLHFCQUFhLG9CQUFxQixZQUFXLFlBQVksQ0FBQyxnQkFBZ0IsQ0FBQztJQUN6RSxTQUFTLENBQUMsVUFBVSxFQUFFLG1CQUFtQixDQUFDO0lBQzFDLFNBQVMsQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDO0lBRXpCLFlBQVksVUFBVSxFQUFFLG1CQUFtQixFQUcxQztJQUVLLFFBQVEsQ0FBQyxPQUFPLEVBQUUsZ0JBQWdCLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixHQUFHLFNBQVMsQ0FBQyxDQXFEaEY7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attestation_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/attestation_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"attestation_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/attestation_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,qBAAa,oBAAqB,YAAW,YAAY,CAAC,gBAAgB,CAAC;IACzE,SAAS,CAAC,UAAU,EAAE,mBAAmB,CAAC;IAC1C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,YAAY,UAAU,EAAE,mBAAmB,EAG1C;IAEK,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAqDhF;CACF"}
|
|
@@ -1,19 +1,55 @@
|
|
|
1
|
+
import { NoCommitteeError } from '@aztec/ethereum';
|
|
2
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
1
3
|
import { PeerErrorSeverity } from '@aztec/stdlib/p2p';
|
|
2
4
|
export class AttestationValidator {
|
|
3
5
|
epochCache;
|
|
6
|
+
logger;
|
|
4
7
|
constructor(epochCache){
|
|
5
8
|
this.epochCache = epochCache;
|
|
9
|
+
this.logger = createLogger('p2p:attestation-validator');
|
|
6
10
|
}
|
|
7
11
|
async validate(message) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
const slotNumber = message.payload.header.slotNumber;
|
|
13
|
+
try {
|
|
14
|
+
const { currentProposer, nextProposer, currentSlot, nextSlot } = await this.epochCache.getProposerAttesterAddressInCurrentOrNextSlot();
|
|
15
|
+
if (slotNumber !== currentSlot && slotNumber !== nextSlot) {
|
|
16
|
+
this.logger.warn(`Attestation slot ${slotNumber} is not current (${currentSlot}) or next (${nextSlot}) slot`);
|
|
17
|
+
return PeerErrorSeverity.HighToleranceError;
|
|
18
|
+
}
|
|
19
|
+
// Verify the signature is valid
|
|
20
|
+
const attester = message.getSender();
|
|
21
|
+
if (attester === undefined) {
|
|
22
|
+
this.logger.warn(`Invalid signature in attestation for slot ${slotNumber}`);
|
|
23
|
+
return PeerErrorSeverity.LowToleranceError;
|
|
24
|
+
}
|
|
25
|
+
// Verify the attester is in the committee for this slot
|
|
26
|
+
if (!await this.epochCache.isInCommittee(slotNumber, attester)) {
|
|
27
|
+
this.logger.warn(`Attester ${attester.toString()} is not in committee for slot ${slotNumber}`);
|
|
28
|
+
return PeerErrorSeverity.HighToleranceError;
|
|
29
|
+
}
|
|
30
|
+
// Verify the proposer signature matches the expected proposer for this slot
|
|
31
|
+
const proposer = message.getProposer();
|
|
32
|
+
const expectedProposer = slotNumber === currentSlot ? currentProposer : nextProposer;
|
|
33
|
+
if (!expectedProposer) {
|
|
34
|
+
this.logger.warn(`No proposer defined for slot ${slotNumber}`);
|
|
35
|
+
return PeerErrorSeverity.HighToleranceError;
|
|
36
|
+
}
|
|
37
|
+
if (!proposer) {
|
|
38
|
+
this.logger.warn(`Invalid proposer signature in attestation for slot ${slotNumber}`);
|
|
39
|
+
return PeerErrorSeverity.LowToleranceError;
|
|
40
|
+
}
|
|
41
|
+
if (!proposer.equals(expectedProposer)) {
|
|
42
|
+
this.logger.warn(`Proposer signature mismatch in attestation. ` + `Expected ${expectedProposer?.toString() ?? 'none'} but got ${proposer.toString()} for slot ${slotNumber}`);
|
|
43
|
+
return PeerErrorSeverity.HighToleranceError;
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
} catch (e) {
|
|
47
|
+
// People shouldn't be sending us attestations if the committee doesn't exist
|
|
48
|
+
if (e instanceof NoCommitteeError) {
|
|
49
|
+
this.logger.warn(`No committee exists for attestation for slot ${slotNumber}`);
|
|
50
|
+
return PeerErrorSeverity.LowToleranceError;
|
|
51
|
+
}
|
|
52
|
+
throw e;
|
|
12
53
|
}
|
|
13
|
-
const attester = await message.getSender();
|
|
14
|
-
if (!await this.epochCache.isInCommittee(attester)) {
|
|
15
|
-
return PeerErrorSeverity.HighToleranceError;
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
54
|
}
|
|
19
55
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EpochCacheInterface } from '@aztec/epoch-cache';
|
|
2
|
+
import { type BlockAttestation, PeerErrorSeverity } from '@aztec/stdlib/p2p';
|
|
3
|
+
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
4
|
+
import type { AttestationPool } from '../../mem_pools/attestation_pool/attestation_pool.js';
|
|
5
|
+
import { AttestationValidator } from './attestation_validator.js';
|
|
6
|
+
/**
|
|
7
|
+
* FishermanAttestationValidator extends the base AttestationValidator to add
|
|
8
|
+
* additional validation for fisherman nodes: verifying that attestations sign
|
|
9
|
+
* the same payload as the original proposal.
|
|
10
|
+
* Invalid attestations are rejected (not propagated), but peer penalization is
|
|
11
|
+
* handled by LibP2PService based on the fishermanMode config to ensure a better
|
|
12
|
+
* view of the network.
|
|
13
|
+
*/
|
|
14
|
+
export declare class FishermanAttestationValidator extends AttestationValidator {
|
|
15
|
+
private attestationPool;
|
|
16
|
+
private invalidAttestationCounter;
|
|
17
|
+
constructor(epochCache: EpochCacheInterface, attestationPool: AttestationPool, telemetryClient: TelemetryClient);
|
|
18
|
+
validate(message: BlockAttestation): Promise<PeerErrorSeverity | undefined>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlzaGVybWFuX2F0dGVzdGF0aW9uX3ZhbGlkYXRvci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21zZ192YWxpZGF0b3JzL2F0dGVzdGF0aW9uX3ZhbGlkYXRvci9maXNoZXJtYW5fYXR0ZXN0YXRpb25fdmFsaWRhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDOUQsT0FBTyxFQUFFLEtBQUssZ0JBQWdCLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUM3RSxPQUFPLEVBQXVCLEtBQUssZUFBZSxFQUFhLE1BQU0seUJBQXlCLENBQUM7QUFFL0YsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0sc0RBQXNELENBQUM7QUFDNUYsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFbEU7Ozs7Ozs7R0FPRztBQUNILHFCQUFhLDZCQUE4QixTQUFRLG9CQUFvQjtJQUtuRSxPQUFPLENBQUMsZUFBZTtJQUp6QixPQUFPLENBQUMseUJBQXlCLENBQUM7SUFFbEMsWUFDRSxVQUFVLEVBQUUsbUJBQW1CLEVBQ3ZCLGVBQWUsRUFBRSxlQUFlLEVBQ3hDLGVBQWUsRUFBRSxlQUFlLEVBVWpDO0lBRWMsUUFBUSxDQUFDLE9BQU8sRUFBRSxnQkFBZ0IsR0FBRyxPQUFPLENBQUMsaUJBQWlCLEdBQUcsU0FBUyxDQUFDLENBd0R6RjtDQUNGIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fisherman_attestation_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/fisherman_attestation_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAuB,KAAK,eAAe,EAAa,MAAM,yBAAyB,CAAC;AAE/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;;;;;GAOG;AACH,qBAAa,6BAA8B,SAAQ,oBAAoB;IAKnE,OAAO,CAAC,eAAe;IAJzB,OAAO,CAAC,yBAAyB,CAAC;IAElC,YACE,UAAU,EAAE,mBAAmB,EACvB,eAAe,EAAE,eAAe,EACxC,eAAe,EAAE,eAAe,EAUjC;IAEc,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAwDzF;CACF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PeerErrorSeverity } from '@aztec/stdlib/p2p';
|
|
2
|
+
import { Attributes, Metrics, ValueType } from '@aztec/telemetry-client';
|
|
3
|
+
import { AttestationValidator } from './attestation_validator.js';
|
|
4
|
+
/**
|
|
5
|
+
* FishermanAttestationValidator extends the base AttestationValidator to add
|
|
6
|
+
* additional validation for fisherman nodes: verifying that attestations sign
|
|
7
|
+
* the same payload as the original proposal.
|
|
8
|
+
* Invalid attestations are rejected (not propagated), but peer penalization is
|
|
9
|
+
* handled by LibP2PService based on the fishermanMode config to ensure a better
|
|
10
|
+
* view of the network.
|
|
11
|
+
*/ export class FishermanAttestationValidator extends AttestationValidator {
|
|
12
|
+
attestationPool;
|
|
13
|
+
invalidAttestationCounter;
|
|
14
|
+
constructor(epochCache, attestationPool, telemetryClient){
|
|
15
|
+
super(epochCache), this.attestationPool = attestationPool;
|
|
16
|
+
this.logger = this.logger.createChild('[FISHERMAN]');
|
|
17
|
+
const meter = telemetryClient.getMeter('FishermanAttestationValidator');
|
|
18
|
+
this.invalidAttestationCounter = meter.createUpDownCounter(Metrics.VALIDATOR_INVALID_ATTESTATION_RECEIVED_COUNT, {
|
|
19
|
+
description: 'The number of invalid attestations received',
|
|
20
|
+
valueType: ValueType.INT
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async validate(message) {
|
|
24
|
+
// First run the standard validation
|
|
25
|
+
const baseValidationResult = await super.validate(message);
|
|
26
|
+
if (baseValidationResult !== undefined) {
|
|
27
|
+
// Track base validation failures (invalid signature, wrong committee, etc.)
|
|
28
|
+
this.invalidAttestationCounter.add(1, {
|
|
29
|
+
[Attributes.ERROR_TYPE]: 'base_validation_failed'
|
|
30
|
+
});
|
|
31
|
+
return baseValidationResult;
|
|
32
|
+
}
|
|
33
|
+
// fisherman validation: verify attestation payload matches proposal payload
|
|
34
|
+
const slotNumberBigInt = message.payload.header.slotNumber;
|
|
35
|
+
const attester = message.getSender();
|
|
36
|
+
const proposer = message.getProposer();
|
|
37
|
+
if (!attester || !proposer) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const proposalId = message.archive.toString();
|
|
41
|
+
const proposal = await this.attestationPool.getBlockProposal(proposalId);
|
|
42
|
+
if (proposal) {
|
|
43
|
+
// Compare the attestation payload with the proposal payload
|
|
44
|
+
if (!message.payload.equals(proposal.payload)) {
|
|
45
|
+
this.logger.error(`Attestation payload mismatch for slot ${slotNumberBigInt}! ` + `Attester ${attester.toString()} signed different data than the proposal.`, {
|
|
46
|
+
slot: slotNumberBigInt.toString(),
|
|
47
|
+
attester: attester.toString(),
|
|
48
|
+
proposer: proposer.toString(),
|
|
49
|
+
proposalArchive: proposal.archive.toString(),
|
|
50
|
+
attestationArchive: message.archive.toString(),
|
|
51
|
+
proposalHeader: proposal.payload.header.hash().toString(),
|
|
52
|
+
attestationHeader: message.payload.header.hash().toString()
|
|
53
|
+
});
|
|
54
|
+
// Track invalid attestation metric
|
|
55
|
+
this.invalidAttestationCounter.add(1, {
|
|
56
|
+
[Attributes.ERROR_TYPE]: 'payload_mismatch'
|
|
57
|
+
});
|
|
58
|
+
// Return error to reject the message, but LibP2PService won't penalize in fisherman mode
|
|
59
|
+
return PeerErrorSeverity.LowToleranceError;
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
// We might receive attestations before proposals in some cases
|
|
63
|
+
this.logger.debug(`Received attestation for slot ${slotNumberBigInt} but proposal not found yet. ` + `Proposal ID: ${proposalId}`);
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export * from './attestation_validator.js';
|
|
2
|
-
|
|
2
|
+
export * from './fisherman_attestation_validator.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tc2dfdmFsaWRhdG9ycy9hdHRlc3RhdGlvbl92YWxpZGF0b3IvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLHNDQUFzQyxDQUFDIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC"}
|
|
@@ -2,7 +2,11 @@ import type { EpochCacheInterface } from '@aztec/epoch-cache';
|
|
|
2
2
|
import { type BlockProposal, type P2PValidator, PeerErrorSeverity } from '@aztec/stdlib/p2p';
|
|
3
3
|
export declare class BlockProposalValidator implements P2PValidator<BlockProposal> {
|
|
4
4
|
private epochCache;
|
|
5
|
-
|
|
5
|
+
private logger;
|
|
6
|
+
private txsPermitted;
|
|
7
|
+
constructor(epochCache: EpochCacheInterface, opts: {
|
|
8
|
+
txsPermitted: boolean;
|
|
9
|
+
});
|
|
6
10
|
validate(block: BlockProposal): Promise<PeerErrorSeverity | undefined>;
|
|
7
11
|
}
|
|
8
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfcHJvcG9zYWxfdmFsaWRhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbXNnX3ZhbGlkYXRvcnMvYmxvY2tfcHJvcG9zYWxfdmFsaWRhdG9yL2Jsb2NrX3Byb3Bvc2FsX3ZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxtQkFBbUIsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRzlELE9BQU8sRUFBRSxLQUFLLGFBQWEsRUFBRSxLQUFLLFlBQVksRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRTdGLHFCQUFhLHNCQUF1QixZQUFXLFlBQVksQ0FBQyxhQUFhLENBQUM7SUFDeEUsT0FBTyxDQUFDLFVBQVUsQ0FBc0I7SUFDeEMsT0FBTyxDQUFDLE1BQU0sQ0FBUztJQUN2QixPQUFPLENBQUMsWUFBWSxDQUFVO0lBRTlCLFlBQVksVUFBVSxFQUFFLG1CQUFtQixFQUFFLElBQUksRUFBRTtRQUFFLFlBQVksRUFBRSxPQUFPLENBQUE7S0FBRSxFQUkzRTtJQUVLLFFBQVEsQ0FBQyxLQUFLLEVBQUUsYUFBYSxHQUFHLE9BQU8sQ0FBQyxpQkFBaUIsR0FBRyxTQUFTLENBQUMsQ0ErRTNFO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_proposal_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/block_proposal_validator/block_proposal_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"block_proposal_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/block_proposal_validator/block_proposal_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7F,qBAAa,sBAAuB,YAAW,YAAY,CAAC,aAAa,CAAC;IACxE,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,YAAY,CAAU;IAE9B,YAAY,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,EAI3E;IAEK,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CA+E3E;CACF"}
|