@aztec/p2p 0.0.1-commit.ff7989d6c → 0.0.1-commit.fff30aa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -3
- package/dest/client/factory.d.ts +4 -5
- package/dest/client/factory.d.ts.map +1 -1
- package/dest/client/factory.js +29 -28
- package/dest/client/interface.d.ts +6 -13
- package/dest/client/interface.d.ts.map +1 -1
- package/dest/client/p2p_client.d.ts +5 -13
- package/dest/client/p2p_client.d.ts.map +1 -1
- package/dest/client/p2p_client.js +19 -88
- package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.js +1 -2
- package/dest/config.d.ts +32 -11
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +85 -31
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts +1 -1
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.js +2 -1
- package/dest/mem_pools/tx_pool/priority.d.ts +2 -2
- package/dest/mem_pools/tx_pool/priority.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool/priority.js +4 -4
- 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 +3 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.d.ts +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.js +3 -2
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.d.ts +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.js +2 -0
- package/dest/mem_pools/tx_pool_v2/eviction/interfaces.d.ts +7 -1
- package/dest/mem_pools/tx_pool_v2/eviction/interfaces.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.js +2 -2
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.d.ts +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.js +8 -6
- package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.d.ts +2 -2
- package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.js +2 -2
- package/dest/mem_pools/tx_pool_v2/index.d.ts +2 -2
- package/dest/mem_pools/tx_pool_v2/index.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/index.js +1 -1
- package/dest/mem_pools/tx_pool_v2/interfaces.d.ts +9 -7
- package/dest/mem_pools/tx_pool_v2/interfaces.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/interfaces.js +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts +46 -8
- package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_metadata.js +81 -17
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_indices.js +9 -10
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts +5 -3
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2.js +3 -0
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts +2 -2
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts.map +1 -1
- package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.js +50 -40
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts +6 -4
- package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/block_proposal_validator.js +10 -2
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts +6 -4
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.js +16 -2
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts +13 -8
- package/dest/msg_validators/proposal_validator/proposal_validator.d.ts.map +1 -1
- package/dest/msg_validators/proposal_validator/proposal_validator.js +48 -36
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts +2 -2
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.js +3 -3
- package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts +2 -1
- package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/allowed_public_setup.js +24 -20
- package/dest/msg_validators/tx_validator/allowed_setup_helpers.d.ts +17 -0
- package/dest/msg_validators/tx_validator/allowed_setup_helpers.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/allowed_setup_helpers.js +24 -0
- package/dest/msg_validators/tx_validator/contract_instance_validator.d.ts +9 -0
- package/dest/msg_validators/tx_validator/contract_instance_validator.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/contract_instance_validator.js +48 -0
- package/dest/msg_validators/tx_validator/data_validator.d.ts +1 -1
- package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/data_validator.js +35 -2
- package/dest/msg_validators/tx_validator/factory.d.ts +133 -6
- package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/factory.js +247 -60
- package/dest/msg_validators/tx_validator/fee_payer_balance.d.ts +1 -1
- package/dest/msg_validators/tx_validator/fee_payer_balance.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/fee_payer_balance.js +6 -2
- package/dest/msg_validators/tx_validator/gas_validator.d.ts +67 -3
- package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/gas_validator.js +104 -37
- package/dest/msg_validators/tx_validator/index.d.ts +3 -1
- package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/index.js +2 -0
- package/dest/msg_validators/tx_validator/nullifier_cache.d.ts +14 -0
- package/dest/msg_validators/tx_validator/nullifier_cache.d.ts.map +1 -0
- package/dest/msg_validators/tx_validator/nullifier_cache.js +24 -0
- package/dest/msg_validators/tx_validator/phases_validator.d.ts +22 -2
- package/dest/msg_validators/tx_validator/phases_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/phases_validator.js +72 -24
- package/dest/services/dummy_service.d.ts +2 -3
- package/dest/services/dummy_service.d.ts.map +1 -1
- package/dest/services/dummy_service.js +1 -4
- package/dest/services/encoding.d.ts +6 -2
- package/dest/services/encoding.d.ts.map +1 -1
- package/dest/services/encoding.js +14 -8
- package/dest/services/libp2p/libp2p_service.d.ts +15 -13
- package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
- package/dest/services/libp2p/libp2p_service.js +92 -92
- package/dest/services/reqresp/batch-tx-requester/tx_validator.js +2 -2
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts +5 -4
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts.map +1 -1
- package/dest/services/reqresp/rate-limiter/rate_limiter.js +10 -8
- package/dest/services/reqresp/reqresp.d.ts +1 -1
- package/dest/services/reqresp/reqresp.d.ts.map +1 -1
- package/dest/services/reqresp/reqresp.js +17 -9
- package/dest/services/service.d.ts +2 -2
- package/dest/services/service.d.ts.map +1 -1
- package/dest/services/tx_collection/file_store_tx_source.d.ts +5 -4
- package/dest/services/tx_collection/file_store_tx_source.d.ts.map +1 -1
- package/dest/services/tx_collection/file_store_tx_source.js +39 -29
- package/dest/services/tx_collection/tx_source.d.ts +6 -5
- package/dest/services/tx_collection/tx_source.d.ts.map +1 -1
- package/dest/services/tx_collection/tx_source.js +9 -7
- package/dest/services/tx_provider.d.ts +3 -3
- package/dest/services/tx_provider.d.ts.map +1 -1
- package/dest/services/tx_provider.js +4 -4
- package/dest/test-helpers/make-test-p2p-clients.d.ts +5 -6
- package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
- package/dest/test-helpers/make-test-p2p-clients.js +1 -2
- package/dest/test-helpers/mock-pubsub.d.ts +2 -3
- package/dest/test-helpers/mock-pubsub.d.ts.map +1 -1
- package/dest/test-helpers/mock-pubsub.js +2 -2
- package/dest/test-helpers/reqresp-nodes.d.ts +2 -3
- package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
- package/dest/test-helpers/reqresp-nodes.js +2 -2
- package/dest/test-helpers/testbench-utils.d.ts +2 -2
- package/dest/test-helpers/testbench-utils.d.ts.map +1 -1
- package/dest/test-helpers/testbench-utils.js +2 -1
- package/dest/testbench/p2p_client_testbench_worker.js +7 -6
- package/dest/testbench/worker_client_manager.d.ts +3 -1
- package/dest/testbench/worker_client_manager.d.ts.map +1 -1
- package/dest/testbench/worker_client_manager.js +4 -1
- package/package.json +14 -14
- package/src/client/factory.ts +49 -46
- package/src/client/interface.ts +5 -19
- package/src/client/p2p_client.ts +20 -118
- package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +1 -2
- package/src/config.ts +124 -34
- package/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts +2 -1
- package/src/mem_pools/tx_pool/priority.ts +4 -4
- package/src/mem_pools/tx_pool/tx_pool_test_suite.ts +3 -1
- package/src/mem_pools/tx_pool_v2/README.md +9 -1
- package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.ts +3 -2
- package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.ts +3 -0
- package/src/mem_pools/tx_pool_v2/eviction/interfaces.ts +11 -1
- package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.ts +2 -2
- package/src/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.ts +15 -6
- package/src/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.ts +2 -1
- package/src/mem_pools/tx_pool_v2/index.ts +1 -1
- package/src/mem_pools/tx_pool_v2/interfaces.ts +9 -7
- package/src/mem_pools/tx_pool_v2/tx_metadata.ts +113 -18
- package/src/mem_pools/tx_pool_v2/tx_pool_indices.ts +11 -11
- package/src/mem_pools/tx_pool_v2/tx_pool_v2.ts +14 -2
- package/src/mem_pools/tx_pool_v2/tx_pool_v2_impl.ts +57 -39
- package/src/msg_validators/attestation_validator/README.md +49 -0
- package/src/msg_validators/proposal_validator/README.md +123 -0
- package/src/msg_validators/proposal_validator/block_proposal_validator.ts +14 -4
- package/src/msg_validators/proposal_validator/checkpoint_proposal_validator.ts +20 -7
- package/src/msg_validators/proposal_validator/proposal_validator.ts +63 -40
- package/src/msg_validators/tx_validator/README.md +119 -0
- package/src/msg_validators/tx_validator/aggregate_tx_validator.ts +3 -3
- package/src/msg_validators/tx_validator/allowed_public_setup.ts +22 -27
- package/src/msg_validators/tx_validator/allowed_setup_helpers.ts +31 -0
- package/src/msg_validators/tx_validator/contract_instance_validator.ts +56 -0
- package/src/msg_validators/tx_validator/data_validator.ts +42 -1
- package/src/msg_validators/tx_validator/factory.ts +394 -78
- package/src/msg_validators/tx_validator/fee_payer_balance.ts +6 -2
- package/src/msg_validators/tx_validator/gas_validator.ts +123 -27
- package/src/msg_validators/tx_validator/index.ts +2 -0
- package/src/msg_validators/tx_validator/nullifier_cache.ts +30 -0
- package/src/msg_validators/tx_validator/phases_validator.ts +82 -27
- package/src/services/dummy_service.ts +1 -5
- package/src/services/encoding.ts +14 -7
- package/src/services/libp2p/libp2p_service.ts +106 -101
- package/src/services/reqresp/README.md +229 -0
- package/src/services/reqresp/batch-tx-requester/tx_validator.ts +2 -2
- package/src/services/reqresp/rate-limiter/rate_limiter.ts +13 -9
- package/src/services/reqresp/reqresp.ts +19 -11
- package/src/services/service.ts +1 -1
- package/src/services/tx_collection/file_store_tx_source.ts +43 -31
- package/src/services/tx_collection/tx_source.ts +8 -7
- package/src/services/tx_provider.ts +2 -2
- package/src/test-helpers/make-test-p2p-clients.ts +0 -2
- package/src/test-helpers/mock-pubsub.ts +3 -6
- package/src/test-helpers/reqresp-nodes.ts +2 -5
- package/src/test-helpers/testbench-utils.ts +2 -1
- package/src/testbench/p2p_client_testbench_worker.ts +3 -6
- package/src/testbench/worker_client_manager.ts +11 -4
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts +0 -23
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts.map +0 -1
- package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.js +0 -212
- package/src/msg_validators/proposal_validator/proposal_validator_test_suite.ts +0 -230
|
@@ -97,9 +97,10 @@ export function prettyPrintRateLimitStatus(status: RateLimitStatus) {
|
|
|
97
97
|
* 2. Individual rate limits for each peer.
|
|
98
98
|
*
|
|
99
99
|
* How it works:
|
|
100
|
-
* - When a request comes in, it first checks against the
|
|
101
|
-
* - If the
|
|
102
|
-
* - The request is only allowed if both the
|
|
100
|
+
* - When a request comes in, it first checks against the peer's individual rate limit.
|
|
101
|
+
* - If the peer limit allows, it then checks against the global rate limit.
|
|
102
|
+
* - The request is only allowed if both the peer-specific and global limits allow it.
|
|
103
|
+
* - Checking peer limit first ensures a rate-limited peer cannot exhaust the global quota.
|
|
103
104
|
* - It automatically creates and manages rate limiters for new peers as they make requests.
|
|
104
105
|
* - It periodically cleans up rate limiters for inactive peers to conserve memory.
|
|
105
106
|
*
|
|
@@ -119,10 +120,6 @@ export class SubProtocolRateLimiter {
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
allow(peerId: PeerId): RateLimitStatus {
|
|
122
|
-
if (!this.globalLimiter.allow()) {
|
|
123
|
-
return RateLimitStatus.DeniedGlobal;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
123
|
const peerIdStr = peerId.toString();
|
|
127
124
|
let peerLimiter: PeerRateLimiter | undefined = this.peerLimiters.get(peerIdStr);
|
|
128
125
|
if (!peerLimiter) {
|
|
@@ -135,10 +132,17 @@ export class SubProtocolRateLimiter {
|
|
|
135
132
|
} else {
|
|
136
133
|
peerLimiter.lastAccess = Date.now();
|
|
137
134
|
}
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
|
|
136
|
+
// Check peer limit first: a rate-limited peer must not consume global quota,
|
|
137
|
+
// otherwise one spamming peer can starve all others by exhausting the global bucket.
|
|
138
|
+
if (!peerLimiter.limiter.allow()) {
|
|
140
139
|
return RateLimitStatus.DeniedPeer;
|
|
141
140
|
}
|
|
141
|
+
|
|
142
|
+
if (!this.globalLimiter.allow()) {
|
|
143
|
+
return RateLimitStatus.DeniedGlobal;
|
|
144
|
+
}
|
|
145
|
+
|
|
142
146
|
return RateLimitStatus.Allowed;
|
|
143
147
|
}
|
|
144
148
|
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
IndividualReqRespTimeoutError,
|
|
17
17
|
InvalidResponseError,
|
|
18
18
|
} from '../../errors/reqresp.error.js';
|
|
19
|
-
import { SnappyTransform } from '../encoding.js';
|
|
19
|
+
import { OversizedSnappyResponseError, SnappyTransform } from '../encoding.js';
|
|
20
20
|
import type { PeerScoring } from '../peer-manager/peer_scoring.js';
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_INDIVIDUAL_REQUEST_TIMEOUT_MS,
|
|
@@ -462,7 +462,7 @@ export class ReqResp implements ReqRespInterface {
|
|
|
462
462
|
);
|
|
463
463
|
return resp;
|
|
464
464
|
} catch (e: any) {
|
|
465
|
-
this.logger.
|
|
465
|
+
this.logger.debug(`SUBPROTOCOL: ${subProtocol}\n`, e);
|
|
466
466
|
// On error we immediately abort the stream, this is preferred way,
|
|
467
467
|
// because it signals to the sender that error happened, whereas
|
|
468
468
|
// closing the stream only closes our side and is much slower
|
|
@@ -553,16 +553,10 @@ export class ReqResp implements ReqRespInterface {
|
|
|
553
553
|
data: message,
|
|
554
554
|
};
|
|
555
555
|
} catch (e: any) {
|
|
556
|
+
// All errors (invalid status bytes, oversized snappy responses, corrupt data, etc.)
|
|
557
|
+
// are re-thrown so the caller can penalize the peer via handleResponseError.
|
|
556
558
|
this.logger.debug(`Reading message failed: ${e.message}`);
|
|
557
|
-
|
|
558
|
-
let status = ReqRespStatus.UNKNOWN;
|
|
559
|
-
if (e instanceof ReqRespStatusError) {
|
|
560
|
-
status = e.status;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
return {
|
|
564
|
-
status,
|
|
565
|
-
};
|
|
559
|
+
throw e;
|
|
566
560
|
}
|
|
567
561
|
}
|
|
568
562
|
|
|
@@ -778,6 +772,20 @@ export class ReqResp implements ReqRespInterface {
|
|
|
778
772
|
return undefined;
|
|
779
773
|
}
|
|
780
774
|
|
|
775
|
+
// Invalid status byte: the peer sent a status byte that doesn't match any known status code.
|
|
776
|
+
// This is a protocol violation, penalize harshly.
|
|
777
|
+
if (e instanceof ReqRespStatusError) {
|
|
778
|
+
this.logger.warn(`Invalid status byte from peer ${peerId.toString()} in ${subProtocol}: ${e.message}`, logTags);
|
|
779
|
+
return PeerErrorSeverity.LowToleranceError;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// Oversized snappy response: the peer is sending data that exceeds the allowed size.
|
|
783
|
+
// This is a protocol violation that wastes bandwidth, so penalize harshly.
|
|
784
|
+
if (e instanceof OversizedSnappyResponseError) {
|
|
785
|
+
this.logger.warn(`Oversized response from peer ${peerId.toString()} in ${subProtocol}: ${e.message}`, logTags);
|
|
786
|
+
return PeerErrorSeverity.LowToleranceError;
|
|
787
|
+
}
|
|
788
|
+
|
|
781
789
|
return this.categorizeConnectionErrors(e, peerId, subProtocol);
|
|
782
790
|
}
|
|
783
791
|
|
package/src/services/service.ts
CHANGED
|
@@ -139,7 +139,7 @@ export interface P2PService {
|
|
|
139
139
|
/** Returns the number of peers in the GossipSub mesh for a given topic type. */
|
|
140
140
|
getGossipMeshPeerCount(topicType: TopicType): number;
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
validateTxsReceivedInBlockProposal(txs: Tx[]): Promise<void>;
|
|
143
143
|
|
|
144
144
|
addReqRespSubProtocol(
|
|
145
145
|
subProtocol: ReqRespSubProtocol,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { partitionAsync } from '@aztec/foundation/collection';
|
|
1
2
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
2
3
|
import { Timer } from '@aztec/foundation/timer';
|
|
3
4
|
import { type ReadOnlyFileStore, createReadOnlyFileStore } from '@aztec/stdlib/file-store';
|
|
4
|
-
import { Tx, type TxHash } from '@aztec/stdlib/tx';
|
|
5
|
+
import { Tx, type TxHash, type TxValidator } from '@aztec/stdlib/tx';
|
|
5
6
|
import {
|
|
6
7
|
type Histogram,
|
|
7
8
|
Metrics,
|
|
@@ -23,6 +24,7 @@ export class FileStoreTxSource implements TxSource {
|
|
|
23
24
|
private readonly fileStore: ReadOnlyFileStore,
|
|
24
25
|
private readonly baseUrl: string,
|
|
25
26
|
private readonly basePath: string,
|
|
27
|
+
private readonly txValidator: TxValidator,
|
|
26
28
|
private readonly log: Logger,
|
|
27
29
|
telemetry: TelemetryClient,
|
|
28
30
|
) {
|
|
@@ -44,6 +46,7 @@ export class FileStoreTxSource implements TxSource {
|
|
|
44
46
|
public static async create(
|
|
45
47
|
url: string,
|
|
46
48
|
basePath: string,
|
|
49
|
+
txValidator: TxValidator,
|
|
47
50
|
log: Logger = createLogger('p2p:file_store_tx_source'),
|
|
48
51
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
49
52
|
): Promise<FileStoreTxSource | undefined> {
|
|
@@ -53,7 +56,7 @@ export class FileStoreTxSource implements TxSource {
|
|
|
53
56
|
log.warn(`Failed to create file store for URL: ${url}`);
|
|
54
57
|
return undefined;
|
|
55
58
|
}
|
|
56
|
-
return new FileStoreTxSource(fileStore, url, basePath, log, telemetry);
|
|
59
|
+
return new FileStoreTxSource(fileStore, url, basePath, txValidator, log, telemetry);
|
|
57
60
|
} catch (err) {
|
|
58
61
|
log.warn(`Error creating file store for URL: ${url}`, { error: err });
|
|
59
62
|
return undefined;
|
|
@@ -65,35 +68,41 @@ export class FileStoreTxSource implements TxSource {
|
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
public async getTxsByHash(txHashes: TxHash[]): Promise<TxSourceCollectionResult> {
|
|
68
|
-
const
|
|
71
|
+
const results = await Promise.all(
|
|
72
|
+
txHashes.map(async txHash => {
|
|
73
|
+
const path = `${this.basePath}/txs/${txHash.toString()}.bin`;
|
|
74
|
+
const timer = new Timer();
|
|
75
|
+
try {
|
|
76
|
+
const buffer = await this.fileStore.read(path);
|
|
77
|
+
const tx = Tx.fromBuffer(buffer);
|
|
78
|
+
return { tx, downloadDuration: timer.ms(), downloadSize: buffer.length };
|
|
79
|
+
} catch {
|
|
80
|
+
this.downloadsFailed.add(1);
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
const txs = results.filter(tx => tx !== undefined);
|
|
87
|
+
const [validTxs, invalidTxs] = await partitionAsync(
|
|
88
|
+
txs,
|
|
89
|
+
async ({ tx, downloadDuration, downloadSize }): Promise<boolean> => {
|
|
90
|
+
const valid = await this.txValidator.validateTx(tx);
|
|
91
|
+
if (valid.result === 'valid') {
|
|
92
|
+
this.downloadsSuccess.add(1);
|
|
93
|
+
this.downloadDuration.record(Math.ceil(downloadDuration));
|
|
94
|
+
this.downloadSize.record(downloadSize);
|
|
95
|
+
return true;
|
|
96
|
+
} else {
|
|
97
|
+
this.downloadsFailed.add(1);
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
);
|
|
102
|
+
|
|
69
103
|
return {
|
|
70
|
-
validTxs: (
|
|
71
|
-
|
|
72
|
-
txHashes.map(async txHash => {
|
|
73
|
-
const path = `${this.basePath}/txs/${txHash.toString()}.bin`;
|
|
74
|
-
const timer = new Timer();
|
|
75
|
-
try {
|
|
76
|
-
const buffer = await this.fileStore.read(path);
|
|
77
|
-
const tx = Tx.fromBuffer(buffer);
|
|
78
|
-
if ((await tx.validateTxHash()) && txHash.equals(tx.txHash)) {
|
|
79
|
-
this.downloadsSuccess.add(1);
|
|
80
|
-
this.downloadDuration.record(Math.ceil(timer.ms()));
|
|
81
|
-
this.downloadSize.record(buffer.length);
|
|
82
|
-
return tx;
|
|
83
|
-
} else {
|
|
84
|
-
invalidTxHashes.push(tx.txHash.toString());
|
|
85
|
-
this.downloadsFailed.add(1);
|
|
86
|
-
return undefined;
|
|
87
|
-
}
|
|
88
|
-
} catch {
|
|
89
|
-
// Tx not found or error reading - return undefined
|
|
90
|
-
this.downloadsFailed.add(1);
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
}),
|
|
94
|
-
)
|
|
95
|
-
).filter(tx => tx !== undefined),
|
|
96
|
-
invalidTxHashes: invalidTxHashes,
|
|
104
|
+
validTxs: validTxs.map(({ tx }) => tx),
|
|
105
|
+
invalidTxHashes: invalidTxs.map(({ tx }) => tx.getTxHash().toString()),
|
|
97
106
|
};
|
|
98
107
|
}
|
|
99
108
|
}
|
|
@@ -109,9 +118,12 @@ export class FileStoreTxSource implements TxSource {
|
|
|
109
118
|
export async function createFileStoreTxSources(
|
|
110
119
|
urls: string[],
|
|
111
120
|
basePath: string,
|
|
121
|
+
txValidator: TxValidator,
|
|
112
122
|
log: Logger = createLogger('p2p:file_store_tx_source'),
|
|
113
123
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
114
124
|
): Promise<FileStoreTxSource[]> {
|
|
115
|
-
const sources = await Promise.all(
|
|
125
|
+
const sources = await Promise.all(
|
|
126
|
+
urls.map(url => FileStoreTxSource.create(url, basePath, txValidator, log, telemetry)),
|
|
127
|
+
);
|
|
116
128
|
return sources.filter((s): s is FileStoreTxSource => s !== undefined);
|
|
117
129
|
}
|
|
@@ -2,7 +2,7 @@ import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
|
2
2
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
3
3
|
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
4
4
|
import { type AztecNode, createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
|
|
5
|
-
import type { Tx, TxHash } from '@aztec/stdlib/tx';
|
|
5
|
+
import type { Tx, TxHash, TxValidator } from '@aztec/stdlib/tx';
|
|
6
6
|
import { type ComponentsVersions, getComponentsVersionsFromConfig } from '@aztec/stdlib/versioning';
|
|
7
7
|
import { makeTracedFetch } from '@aztec/telemetry-client';
|
|
8
8
|
|
|
@@ -16,12 +16,13 @@ export interface TxSource {
|
|
|
16
16
|
export class NodeRpcTxSource implements TxSource {
|
|
17
17
|
constructor(
|
|
18
18
|
private readonly client: Pick<AztecNode, 'getTxsByHash'>,
|
|
19
|
+
private readonly txValidator: TxValidator,
|
|
19
20
|
private readonly info: string,
|
|
20
21
|
) {}
|
|
21
22
|
|
|
22
|
-
public static fromUrl(nodeUrl: string, versions: ComponentsVersions): NodeRpcTxSource {
|
|
23
|
+
public static fromUrl(nodeUrl: string, txValidator: TxValidator, versions: ComponentsVersions): NodeRpcTxSource {
|
|
23
24
|
const client = createAztecNodeClient(nodeUrl, versions, makeTracedFetch([1, 2, 3], false));
|
|
24
|
-
return new NodeRpcTxSource(client, nodeUrl);
|
|
25
|
+
return new NodeRpcTxSource(client, txValidator, nodeUrl);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
public getInfo() {
|
|
@@ -38,8 +39,8 @@ export class NodeRpcTxSource implements TxSource {
|
|
|
38
39
|
const invalidTxHashes: string[] = [];
|
|
39
40
|
await Promise.all(
|
|
40
41
|
txs.map(async tx => {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
42
|
+
const validation = await this.txValidator.validateTx(tx);
|
|
43
|
+
if (validation.result === 'valid') {
|
|
43
44
|
validTxs.push(tx);
|
|
44
45
|
} else {
|
|
45
46
|
invalidTxHashes.push(tx.getTxHash().toString());
|
|
@@ -50,7 +51,7 @@ export class NodeRpcTxSource implements TxSource {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
export function createNodeRpcTxSources(urls: string[], chainConfig: ChainConfig) {
|
|
54
|
+
export function createNodeRpcTxSources(urls: string[], txValidator: TxValidator, chainConfig: ChainConfig) {
|
|
54
55
|
const versions = getComponentsVersionsFromConfig(chainConfig, protocolContractsHash, getVKTreeRoot());
|
|
55
|
-
return urls.map(url => NodeRpcTxSource.fromUrl(url, versions));
|
|
56
|
+
return urls.map(url => NodeRpcTxSource.fromUrl(url, txValidator, versions));
|
|
56
57
|
}
|
|
@@ -25,7 +25,7 @@ export class TxProvider implements ITxProvider {
|
|
|
25
25
|
constructor(
|
|
26
26
|
private txCollection: TxCollection,
|
|
27
27
|
private txPool: TxPoolV2,
|
|
28
|
-
private
|
|
28
|
+
private blockProposalTransactionValidator: Pick<P2PClient, 'validateTxsReceivedInBlockProposal'>,
|
|
29
29
|
private log: Logger = createLogger('p2p:tx-collector'),
|
|
30
30
|
client: TelemetryClient = getTelemetryClient(),
|
|
31
31
|
) {
|
|
@@ -227,7 +227,7 @@ export class TxProvider implements ITxProvider {
|
|
|
227
227
|
if (txs.length === 0) {
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
|
-
await this.
|
|
230
|
+
await this.blockProposalTransactionValidator.validateTxsReceivedInBlockProposal(txs);
|
|
231
231
|
await this.txPool.addProtectedTxs(txs, blockHeader);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
@@ -7,7 +7,6 @@ import { sleep } from '@aztec/foundation/sleep';
|
|
|
7
7
|
import type { DataStoreConfig } from '@aztec/kv-store/config';
|
|
8
8
|
import { openTmpStore } from '@aztec/kv-store/lmdb-v2';
|
|
9
9
|
import type { WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
10
|
-
import { P2PClientType } from '@aztec/stdlib/p2p';
|
|
11
10
|
|
|
12
11
|
import { createP2PClient } from '../client/index.js';
|
|
13
12
|
import type { P2PClient } from '../client/p2p_client.js';
|
|
@@ -98,7 +97,6 @@ export async function makeTestP2PClient(
|
|
|
98
97
|
const kvStore = await openTmpStore('test');
|
|
99
98
|
|
|
100
99
|
const client = await createP2PClient(
|
|
101
|
-
P2PClientType.Full,
|
|
102
100
|
config,
|
|
103
101
|
l2BlockSource,
|
|
104
102
|
proofVerifier,
|
|
@@ -4,7 +4,6 @@ import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
|
4
4
|
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
5
5
|
import type { ContractDataSource } from '@aztec/stdlib/contract';
|
|
6
6
|
import type { ClientProtocolCircuitVerifier, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
7
|
-
import { P2PClientType } from '@aztec/stdlib/p2p';
|
|
8
7
|
import type { TelemetryClient } from '@aztec/telemetry-client';
|
|
9
8
|
|
|
10
9
|
import type { GossipsubEvents, GossipsubMessage } from '@chainsafe/libp2p-gossipsub';
|
|
@@ -42,11 +41,10 @@ type GossipSubService = PubSubLibp2p['services']['pubsub'];
|
|
|
42
41
|
* Given a mock gossip sub network, returns a factory function that creates an instance LibP2PService connected to it.
|
|
43
42
|
* Designed to be used in tests in P2PClientDeps.p2pServiceFactory.
|
|
44
43
|
*/
|
|
45
|
-
export function getMockPubSubP2PServiceFactory
|
|
44
|
+
export function getMockPubSubP2PServiceFactory(
|
|
46
45
|
network: MockGossipSubNetwork,
|
|
47
|
-
): (...args: Parameters<(typeof LibP2PService
|
|
46
|
+
): (...args: Parameters<(typeof LibP2PService)['new']>) => Promise<LibP2PService> {
|
|
48
47
|
return (
|
|
49
|
-
clientType: P2PClientType,
|
|
50
48
|
config: P2PConfig,
|
|
51
49
|
peerId: PeerId,
|
|
52
50
|
deps: {
|
|
@@ -66,8 +64,7 @@ export function getMockPubSubP2PServiceFactory<T extends P2PClientType>(
|
|
|
66
64
|
const peerManager = new DummyPeerManager(peerId, network);
|
|
67
65
|
const reqresp: ReqRespInterface = new MockReqResp(peerId, network);
|
|
68
66
|
const peerDiscoveryService = new DummyPeerDiscoveryService();
|
|
69
|
-
const service = new LibP2PService
|
|
70
|
-
clientType as T,
|
|
67
|
+
const service = new LibP2PService(
|
|
71
68
|
config,
|
|
72
69
|
libp2p,
|
|
73
70
|
peerDiscoveryService,
|
|
@@ -12,7 +12,6 @@ import type {
|
|
|
12
12
|
IVCProofVerificationResult,
|
|
13
13
|
WorldStateSynchronizer,
|
|
14
14
|
} from '@aztec/stdlib/interfaces/server';
|
|
15
|
-
import type { P2PClientType } from '@aztec/stdlib/p2p';
|
|
16
15
|
import type { Tx } from '@aztec/stdlib/tx';
|
|
17
16
|
import { compressComponentVersions } from '@aztec/stdlib/versioning';
|
|
18
17
|
import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client';
|
|
@@ -107,8 +106,7 @@ export async function createLibp2pNode(
|
|
|
107
106
|
*
|
|
108
107
|
*
|
|
109
108
|
*/
|
|
110
|
-
export async function createTestLibP2PService
|
|
111
|
-
clientType: T,
|
|
109
|
+
export async function createTestLibP2PService(
|
|
112
110
|
boostrapAddrs: string[] = [],
|
|
113
111
|
archiver: L2BlockSource & ContractDataSource,
|
|
114
112
|
worldStateSynchronizer: WorldStateSynchronizer,
|
|
@@ -159,8 +157,7 @@ export async function createTestLibP2PService<T extends P2PClientType>(
|
|
|
159
157
|
p2pNode.services.pubsub.score.params.appSpecificScore = (peerId: string) =>
|
|
160
158
|
peerManager.shouldDisableP2PGossip(peerId) ? -Infinity : peerManager.getPeerScore(peerId);
|
|
161
159
|
|
|
162
|
-
return new LibP2PService
|
|
163
|
-
clientType,
|
|
160
|
+
return new LibP2PService(
|
|
164
161
|
config,
|
|
165
162
|
p2pNode as PubSubLibp2p,
|
|
166
163
|
discoveryService,
|
|
@@ -76,7 +76,7 @@ export class InMemoryTxPool extends EventEmitter implements TxPoolV2 {
|
|
|
76
76
|
return Promise.resolve({ accepted, ignored: [], rejected: [] });
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
canAddPendingTx(tx: Tx): Promise<'accepted' | 'ignored'
|
|
79
|
+
canAddPendingTx(tx: Tx): Promise<'accepted' | 'ignored'> {
|
|
80
80
|
const key = tx.getTxHash().toString();
|
|
81
81
|
if (this.txsByHash.has(key)) {
|
|
82
82
|
return Promise.resolve('ignored');
|
|
@@ -292,6 +292,7 @@ export function createMockEpochCache(): EpochCacheInterface {
|
|
|
292
292
|
ethereumSlotDuration: 1,
|
|
293
293
|
proofSubmissionEpochs: 1,
|
|
294
294
|
targetCommitteeSize: 48,
|
|
295
|
+
rollupManaLimit: Number.MAX_SAFE_INTEGER,
|
|
295
296
|
}),
|
|
296
297
|
};
|
|
297
298
|
}
|
|
@@ -19,7 +19,7 @@ import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
|
19
19
|
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
20
20
|
import type { ContractDataSource } from '@aztec/stdlib/contract';
|
|
21
21
|
import type { ClientProtocolCircuitVerifier, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
22
|
-
import { type BlockProposal,
|
|
22
|
+
import { type BlockProposal, P2PMessage } from '@aztec/stdlib/p2p';
|
|
23
23
|
import { ChonkProof } from '@aztec/stdlib/proofs';
|
|
24
24
|
import { makeAztecAddress, makeBlockHeader, makeBlockProposal, mockTx } from '@aztec/stdlib/testing';
|
|
25
25
|
import { Tx, TxHash, type TxValidationResult } from '@aztec/stdlib/tx';
|
|
@@ -86,12 +86,11 @@ export interface BenchReadyMessage {
|
|
|
86
86
|
}
|
|
87
87
|
const txCache = new Map<number, Tx[]>();
|
|
88
88
|
|
|
89
|
-
class TestLibP2PService
|
|
89
|
+
class TestLibP2PService extends LibP2PService {
|
|
90
90
|
private disableTxValidation: boolean;
|
|
91
91
|
private gossipMessageCount = 0;
|
|
92
92
|
|
|
93
93
|
constructor(
|
|
94
|
-
clientType: T,
|
|
95
94
|
config: P2PConfig,
|
|
96
95
|
node: PubSubLibp2p,
|
|
97
96
|
peerDiscoveryService: PeerDiscoveryService,
|
|
@@ -107,7 +106,6 @@ class TestLibP2PService<T extends P2PClientType = P2PClientType.Full> extends Li
|
|
|
107
106
|
disableTxValidation = true,
|
|
108
107
|
) {
|
|
109
108
|
super(
|
|
110
|
-
clientType,
|
|
111
109
|
config,
|
|
112
110
|
node,
|
|
113
111
|
peerDiscoveryService,
|
|
@@ -342,6 +340,7 @@ process.on('message', async msg => {
|
|
|
342
340
|
const config: P2PConfig = {
|
|
343
341
|
...rawConfig,
|
|
344
342
|
peerIdPrivateKey: rawConfig.peerIdPrivateKey ? new SecretValue(rawConfig.peerIdPrivateKey) : undefined,
|
|
343
|
+
priceBumpPercentage: 10n,
|
|
345
344
|
} as P2PConfig;
|
|
346
345
|
|
|
347
346
|
workerConfig = config;
|
|
@@ -365,7 +364,6 @@ process.on('message', async msg => {
|
|
|
365
364
|
};
|
|
366
365
|
|
|
367
366
|
const client = await createP2PClient(
|
|
368
|
-
P2PClientType.Full,
|
|
369
367
|
config as P2PConfig & DataStoreConfig,
|
|
370
368
|
l2BlockSource,
|
|
371
369
|
proofVerifier as ClientProtocolCircuitVerifier,
|
|
@@ -378,7 +376,6 @@ process.on('message', async msg => {
|
|
|
378
376
|
);
|
|
379
377
|
|
|
380
378
|
const testService = new TestLibP2PService(
|
|
381
|
-
P2PClientType.Full,
|
|
382
379
|
config,
|
|
383
380
|
(client as any).p2pService.node,
|
|
384
381
|
(client as any).p2pService.peerDiscoveryService,
|
|
@@ -81,13 +81,15 @@ class WorkerClientManager {
|
|
|
81
81
|
* Note: We send the raw peerIdPrivateKey string instead of SecretValue
|
|
82
82
|
* because SecretValue.toJSON() returns '[Redacted]', losing the value.
|
|
83
83
|
* The worker must re-wrap it in SecretValue.
|
|
84
|
+
* We also omit priceBumpPercentage since it's a bigint and can't be
|
|
85
|
+
* serialized over IPC (which uses JSON under the hood).
|
|
84
86
|
*/
|
|
85
87
|
private createClientConfig(
|
|
86
88
|
clientIndex: number,
|
|
87
89
|
port: number,
|
|
88
90
|
otherNodes: string[],
|
|
89
|
-
): Omit<P2PConfig, 'peerIdPrivateKey'> & { peerIdPrivateKey: string } & Partial<ChainConfig> {
|
|
90
|
-
|
|
91
|
+
): Omit<P2PConfig, 'peerIdPrivateKey' | 'priceBumpPercentage'> & { peerIdPrivateKey: string } & Partial<ChainConfig> {
|
|
92
|
+
const { priceBumpPercentage: _, ...config } = {
|
|
91
93
|
...getP2PDefaultConfig(),
|
|
92
94
|
p2pEnabled: true,
|
|
93
95
|
peerIdPrivateKey: this.peerIdPrivateKeys[clientIndex],
|
|
@@ -96,7 +98,10 @@ class WorkerClientManager {
|
|
|
96
98
|
p2pPort: port,
|
|
97
99
|
bootstrapNodes: [...otherNodes],
|
|
98
100
|
...this.p2pConfig,
|
|
99
|
-
}
|
|
101
|
+
};
|
|
102
|
+
return config as Omit<P2PConfig, 'peerIdPrivateKey' | 'priceBumpPercentage'> & {
|
|
103
|
+
peerIdPrivateKey: string;
|
|
104
|
+
} & Partial<ChainConfig>;
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
/**
|
|
@@ -104,7 +109,9 @@ class WorkerClientManager {
|
|
|
104
109
|
* Config uses raw string for peerIdPrivateKey (not SecretValue) for IPC serialization.
|
|
105
110
|
*/
|
|
106
111
|
private spawnWorkerProcess(
|
|
107
|
-
config: Omit<P2PConfig, 'peerIdPrivateKey'> & {
|
|
112
|
+
config: Omit<P2PConfig, 'peerIdPrivateKey' | 'priceBumpPercentage'> & {
|
|
113
|
+
peerIdPrivateKey: string;
|
|
114
|
+
} & Partial<ChainConfig>,
|
|
108
115
|
clientIndex: number,
|
|
109
116
|
): [ChildProcess, Promise<void>] {
|
|
110
117
|
const useCompiled = existsSync(workerJsPath);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { EpochCacheInterface } from '@aztec/epoch-cache';
|
|
2
|
-
import type { Secp256k1Signer } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
3
|
-
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
-
import { type BlockProposal, type CheckpointProposal, type ValidationResult } from '@aztec/stdlib/p2p';
|
|
5
|
-
import type { TxHash } from '@aztec/stdlib/tx';
|
|
6
|
-
import type { MockProxy } from 'jest-mock-extended';
|
|
7
|
-
export interface ProposalValidatorTestParams<TProposal extends BlockProposal | CheckpointProposal> {
|
|
8
|
-
validatorFactory: (epochCache: EpochCacheInterface, opts: {
|
|
9
|
-
txsPermitted: boolean;
|
|
10
|
-
}) => {
|
|
11
|
-
validate: (proposal: TProposal) => Promise<ValidationResult>;
|
|
12
|
-
};
|
|
13
|
-
makeProposal: (options?: any) => Promise<TProposal>;
|
|
14
|
-
makeHeader: (epochNumber: number | bigint, slotNumber: number | bigint, blockNumber: number | bigint) => any;
|
|
15
|
-
getSigner: () => Secp256k1Signer;
|
|
16
|
-
getAddress: (signer?: Secp256k1Signer) => EthAddress;
|
|
17
|
-
getSlot: (slot: number | bigint) => any;
|
|
18
|
-
getTxHashes: (n: number) => TxHash[];
|
|
19
|
-
getTxs: () => any[];
|
|
20
|
-
epochCacheMock: () => MockProxy<EpochCacheInterface>;
|
|
21
|
-
}
|
|
22
|
-
export declare function sharedProposalValidatorTests<TProposal extends BlockProposal | CheckpointProposal>(params: ProposalValidatorTestParams<TProposal>): void;
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcG9zYWxfdmFsaWRhdG9yX3Rlc3Rfc3VpdGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tc2dfdmFsaWRhdG9ycy9wcm9wb3NhbF92YWxpZGF0b3IvcHJvcG9zYWxfdmFsaWRhdG9yX3Rlc3Rfc3VpdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSwyQ0FBMkMsQ0FBQztBQUNqRixPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNoRSxPQUFPLEVBQ0wsS0FBSyxhQUFhLEVBQ2xCLEtBQUssa0JBQWtCLEVBRXZCLEtBQUssZ0JBQWdCLEVBQ3RCLE1BQU0sbUJBQW1CLENBQUM7QUFDM0IsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFL0MsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFcEQsTUFBTSxXQUFXLDJCQUEyQixDQUFDLFNBQVMsU0FBUyxhQUFhLEdBQUcsa0JBQWtCO0lBQy9GLGdCQUFnQixFQUFFLENBQ2hCLFVBQVUsRUFBRSxtQkFBbUIsRUFDL0IsSUFBSSxFQUFFO1FBQUUsWUFBWSxFQUFFLE9BQU8sQ0FBQTtLQUFFLEtBQzVCO1FBQUUsUUFBUSxFQUFFLENBQUMsUUFBUSxFQUFFLFNBQVMsS0FBSyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FBQTtLQUFFLENBQUM7SUFDdEUsWUFBWSxFQUFFLENBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRyxLQUFLLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUNwRCxVQUFVLEVBQUUsQ0FBQyxXQUFXLEVBQUUsTUFBTSxHQUFHLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxHQUFHLE1BQU0sRUFBRSxXQUFXLEVBQUUsTUFBTSxHQUFHLE1BQU0sS0FBSyxHQUFHLENBQUM7SUFDN0csU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0lBQ2pDLFVBQVUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxFQUFFLGVBQWUsS0FBSyxVQUFVLENBQUM7SUFDckQsT0FBTyxFQUFFLENBQUMsSUFBSSxFQUFFLE1BQU0sR0FBRyxNQUFNLEtBQUssR0FBRyxDQUFDO0lBQ3hDLFdBQVcsRUFBRSxDQUFDLENBQUMsRUFBRSxNQUFNLEtBQUssTUFBTSxFQUFFLENBQUM7SUFDckMsTUFBTSxFQUFFLE1BQU0sR0FBRyxFQUFFLENBQUM7SUFDcEIsY0FBYyxFQUFFLE1BQU0sU0FBUyxDQUFDLG1CQUFtQixDQUFDLENBQUM7Q0FDdEQ7QUFFRCx3QkFBZ0IsNEJBQTRCLENBQUMsU0FBUyxTQUFTLGFBQWEsR0FBRyxrQkFBa0IsRUFDL0YsTUFBTSxFQUFFLDJCQUEyQixDQUFDLFNBQVMsQ0FBQyxRQXdNL0MifQ==
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proposal_validator_test_suite.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/proposal_validator/proposal_validator_test_suite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,2BAA2B,CAAC,SAAS,SAAS,aAAa,GAAG,kBAAkB;IAC/F,gBAAgB,EAAE,CAChB,UAAU,EAAE,mBAAmB,EAC/B,IAAI,EAAE;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,KAC5B;QAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;KAAE,CAAC;IACtE,YAAY,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACpD,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,KAAK,GAAG,CAAC;IAC7G,SAAS,EAAE,MAAM,eAAe,CAAC;IACjC,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,eAAe,KAAK,UAAU,CAAC;IACrD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,GAAG,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IACrC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,SAAS,CAAC,mBAAmB,CAAC,CAAC;CACtD;AAED,wBAAgB,4BAA4B,CAAC,SAAS,SAAS,aAAa,GAAG,kBAAkB,EAC/F,MAAM,EAAE,2BAA2B,CAAC,SAAS,CAAC,QAwM/C"}
|