@aztec/p2p 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2
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.js +41 -29
- package/dest/client/factory.js +8 -10
- package/dest/client/index.js +0 -1
- package/dest/client/p2p_client.js +513 -507
- package/dest/config.js +44 -39
- package/dest/errors/reqresp.error.js +6 -10
- package/dest/index.js +0 -1
- package/dest/mem_pools/attestation_pool/attestation_pool.js +6 -2
- package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.js +64 -32
- package/dest/mem_pools/attestation_pool/index.js +0 -1
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.js +22 -19
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.js +22 -26
- package/dest/mem_pools/attestation_pool/mocks.js +10 -6
- package/dest/mem_pools/epoch_proof_quote_pool/epoch_proof_quote_pool.js +1 -2
- package/dest/mem_pools/epoch_proof_quote_pool/index.js +0 -1
- package/dest/mem_pools/epoch_proof_quote_pool/memory_epoch_proof_quote_pool.js +5 -4
- package/dest/mem_pools/epoch_proof_quote_pool/test_utils.js +2 -3
- package/dest/mem_pools/index.js +1 -2
- package/dest/mem_pools/instrumentation.js +37 -42
- package/dest/mem_pools/interface.js +3 -2
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.js +127 -134
- package/dest/mem_pools/tx_pool/index.js +0 -1
- package/dest/mem_pools/tx_pool/memory_tx_pool.js +45 -43
- package/dest/mem_pools/tx_pool/priority.js +1 -3
- package/dest/mem_pools/tx_pool/tx_pool.js +3 -2
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.js +107 -37
- package/dest/mocks/index.js +47 -38
- package/dest/msg_validators/attestation_validator/attestation_validator.js +3 -3
- package/dest/msg_validators/attestation_validator/index.js +0 -1
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.js +2 -2
- package/dest/msg_validators/block_proposal_validator/index.js +0 -1
- package/dest/msg_validators/epoch_proof_quote_validator/epoch_proof_quote_validator.js +2 -2
- package/dest/msg_validators/epoch_proof_quote_validator/index.js +0 -1
- package/dest/msg_validators/index.js +0 -1
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.js +9 -11
- package/dest/msg_validators/tx_validator/block_header_validator.js +17 -12
- package/dest/msg_validators/tx_validator/data_validator.js +41 -32
- package/dest/msg_validators/tx_validator/double_spend_validator.js +22 -14
- package/dest/msg_validators/tx_validator/index.js +0 -1
- package/dest/msg_validators/tx_validator/metadata_validator.js +29 -26
- package/dest/msg_validators/tx_validator/tx_proof_validator.js +17 -12
- package/dest/services/data_store.js +57 -57
- package/dest/services/discv5/discV5_service.js +31 -23
- package/dest/services/dummy_service.js +40 -58
- package/dest/services/encoding.js +10 -9
- package/dest/services/index.js +0 -1
- package/dest/services/libp2p/libp2p_service.js +709 -695
- package/dest/services/peer-manager/metrics.js +14 -7
- package/dest/services/peer-manager/peer_manager.js +340 -342
- package/dest/services/peer-manager/peer_scoring.js +20 -18
- package/dest/services/reqresp/config.js +4 -5
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.js +35 -28
- package/dest/services/reqresp/connection-sampler/connection_sampler.js +60 -59
- package/dest/services/reqresp/index.js +1 -3
- package/dest/services/reqresp/interface.js +25 -30
- package/dest/services/reqresp/metrics.js +23 -10
- package/dest/services/reqresp/protocols/block.js +1 -2
- package/dest/services/reqresp/protocols/goodbye.js +35 -40
- package/dest/services/reqresp/protocols/index.js +1 -3
- package/dest/services/reqresp/protocols/ping.js +1 -3
- package/dest/services/reqresp/protocols/status.js +1 -3
- package/dest/services/reqresp/protocols/tx.js +5 -8
- package/dest/services/reqresp/rate-limiter/index.js +0 -1
- package/dest/services/reqresp/rate-limiter/rate_limiter.js +42 -36
- package/dest/services/reqresp/rate-limiter/rate_limits.js +16 -17
- package/dest/services/reqresp/reqresp.js +461 -395
- package/dest/services/reqresp/status.js +51 -0
- package/dest/services/service.js +3 -4
- package/dest/services/types.js +16 -23
- package/dest/util.js +23 -34
- package/package.json +8 -8
- package/src/client/p2p_client.ts +159 -125
- package/src/mem_pools/index.ts +3 -3
- package/src/mem_pools/instrumentation.ts +3 -2
- package/src/services/reqresp/interface.ts +11 -0
- package/src/services/reqresp/rate-limiter/rate_limiter.ts +3 -1
- package/src/services/reqresp/rate-limiter/rate_limits.ts +2 -2
- package/src/services/reqresp/reqresp.ts +111 -24
- package/src/services/reqresp/status.ts +59 -0
- package/dest/bootstrap/bootstrap.d.ts +0 -38
- package/dest/bootstrap/bootstrap.d.ts.map +0 -1
- package/dest/client/factory.d.ts +0 -19
- package/dest/client/factory.d.ts.map +0 -1
- package/dest/client/index.d.ts +0 -3
- package/dest/client/index.d.ts.map +0 -1
- package/dest/client/p2p_client.d.ts +0 -321
- package/dest/client/p2p_client.d.ts.map +0 -1
- package/dest/config.d.ts +0 -171
- package/dest/config.d.ts.map +0 -1
- package/dest/errors/reqresp.error.d.ts +0 -28
- package/dest/errors/reqresp.error.d.ts.map +0 -1
- package/dest/index.d.ts +0 -9
- package/dest/index.d.ts.map +0 -1
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +0 -57
- package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +0 -1
- package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts +0 -3
- package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts.map +0 -1
- package/dest/mem_pools/attestation_pool/index.d.ts +0 -3
- package/dest/mem_pools/attestation_pool/index.d.ts.map +0 -1
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts +0 -22
- package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts.map +0 -1
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts +0 -17
- package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts.map +0 -1
- package/dest/mem_pools/attestation_pool/mocks.d.ts +0 -18
- package/dest/mem_pools/attestation_pool/mocks.d.ts.map +0 -1
- package/dest/mem_pools/epoch_proof_quote_pool/epoch_proof_quote_pool.d.ts +0 -7
- package/dest/mem_pools/epoch_proof_quote_pool/epoch_proof_quote_pool.d.ts.map +0 -1
- package/dest/mem_pools/epoch_proof_quote_pool/index.d.ts +0 -4
- package/dest/mem_pools/epoch_proof_quote_pool/index.d.ts.map +0 -1
- package/dest/mem_pools/epoch_proof_quote_pool/memory_epoch_proof_quote_pool.d.ts +0 -12
- package/dest/mem_pools/epoch_proof_quote_pool/memory_epoch_proof_quote_pool.d.ts.map +0 -1
- package/dest/mem_pools/epoch_proof_quote_pool/test_utils.d.ts +0 -8
- package/dest/mem_pools/epoch_proof_quote_pool/test_utils.d.ts.map +0 -1
- package/dest/mem_pools/index.d.ts +0 -5
- package/dest/mem_pools/index.d.ts.map +0 -1
- package/dest/mem_pools/instrumentation.d.ts +0 -31
- package/dest/mem_pools/instrumentation.d.ts.map +0 -1
- package/dest/mem_pools/interface.d.ts +0 -13
- package/dest/mem_pools/interface.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts +0 -66
- package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/index.d.ts +0 -4
- package/dest/mem_pools/tx_pool/index.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts +0 -56
- package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/priority.d.ts +0 -8
- package/dest/mem_pools/tx_pool/priority.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/tx_pool.d.ts +0 -66
- package/dest/mem_pools/tx_pool/tx_pool.d.ts.map +0 -1
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts +0 -7
- package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts.map +0 -1
- package/dest/mocks/index.d.ts +0 -54
- package/dest/mocks/index.d.ts.map +0 -1
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts +0 -8
- package/dest/msg_validators/attestation_validator/attestation_validator.d.ts.map +0 -1
- package/dest/msg_validators/attestation_validator/index.d.ts +0 -2
- package/dest/msg_validators/attestation_validator/index.d.ts.map +0 -1
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.d.ts +0 -8
- package/dest/msg_validators/block_proposal_validator/block_proposal_validator.d.ts.map +0 -1
- package/dest/msg_validators/block_proposal_validator/index.d.ts +0 -2
- package/dest/msg_validators/block_proposal_validator/index.d.ts.map +0 -1
- package/dest/msg_validators/epoch_proof_quote_validator/epoch_proof_quote_validator.d.ts +0 -8
- package/dest/msg_validators/epoch_proof_quote_validator/epoch_proof_quote_validator.d.ts.map +0 -1
- package/dest/msg_validators/epoch_proof_quote_validator/index.d.ts +0 -2
- package/dest/msg_validators/epoch_proof_quote_validator/index.d.ts.map +0 -1
- package/dest/msg_validators/index.d.ts +0 -4
- package/dest/msg_validators/index.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts +0 -7
- package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts +0 -11
- package/dest/msg_validators/tx_validator/block_header_validator.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/data_validator.d.ts +0 -6
- package/dest/msg_validators/tx_validator/data_validator.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts +0 -12
- package/dest/msg_validators/tx_validator/double_spend_validator.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/index.d.ts +0 -7
- package/dest/msg_validators/tx_validator/index.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/metadata_validator.d.ts +0 -10
- package/dest/msg_validators/tx_validator/metadata_validator.d.ts.map +0 -1
- package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts +0 -8
- package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts.map +0 -1
- package/dest/services/data_store.d.ts +0 -27
- package/dest/services/data_store.d.ts.map +0 -1
- package/dest/services/discv5/discV5_service.d.ts +0 -36
- package/dest/services/discv5/discV5_service.d.ts.map +0 -1
- package/dest/services/dummy_service.d.ts +0 -82
- package/dest/services/dummy_service.d.ts.map +0 -1
- package/dest/services/encoding.d.ts +0 -31
- package/dest/services/encoding.d.ts.map +0 -1
- package/dest/services/index.d.ts +0 -3
- package/dest/services/index.d.ts.map +0 -1
- package/dest/services/libp2p/libp2p_service.d.ts +0 -225
- package/dest/services/libp2p/libp2p_service.d.ts.map +0 -1
- package/dest/services/peer-manager/metrics.d.ts +0 -12
- package/dest/services/peer-manager/metrics.d.ts.map +0 -1
- package/dest/services/peer-manager/peer_manager.d.ts +0 -76
- package/dest/services/peer-manager/peer_manager.d.ts.map +0 -1
- package/dest/services/peer-manager/peer_scoring.d.ts +0 -28
- package/dest/services/peer-manager/peer_scoring.d.ts.map +0 -1
- package/dest/services/reqresp/config.d.ts +0 -16
- package/dest/services/reqresp/config.d.ts.map +0 -1
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts +0 -45
- package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts.map +0 -1
- package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts +0 -61
- package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts.map +0 -1
- package/dest/services/reqresp/index.d.ts +0 -6
- package/dest/services/reqresp/index.d.ts.map +0 -1
- package/dest/services/reqresp/interface.d.ts +0 -107
- package/dest/services/reqresp/interface.d.ts.map +0 -1
- package/dest/services/reqresp/metrics.d.ts +0 -15
- package/dest/services/reqresp/metrics.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/block.d.ts +0 -4
- package/dest/services/reqresp/protocols/block.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/goodbye.d.ts +0 -51
- package/dest/services/reqresp/protocols/goodbye.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/index.d.ts +0 -9
- package/dest/services/reqresp/protocols/index.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/ping.d.ts +0 -9
- package/dest/services/reqresp/protocols/ping.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/status.d.ts +0 -9
- package/dest/services/reqresp/protocols/status.d.ts.map +0 -1
- package/dest/services/reqresp/protocols/tx.d.ts +0 -13
- package/dest/services/reqresp/protocols/tx.d.ts.map +0 -1
- package/dest/services/reqresp/rate-limiter/index.d.ts +0 -2
- package/dest/services/reqresp/rate-limiter/index.d.ts.map +0 -1
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts +0 -102
- package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts.map +0 -1
- package/dest/services/reqresp/rate-limiter/rate_limits.d.ts +0 -3
- package/dest/services/reqresp/rate-limiter/rate_limits.d.ts.map +0 -1
- package/dest/services/reqresp/reqresp.d.ts +0 -161
- package/dest/services/reqresp/reqresp.d.ts.map +0 -1
- package/dest/services/service.d.ts +0 -85
- package/dest/services/service.d.ts.map +0 -1
- package/dest/services/types.d.ts +0 -38
- package/dest/services/types.d.ts.map +0 -1
- package/dest/util.d.ts +0 -53
- package/dest/util.d.ts.map +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type BlockAttestation } from '@aztec/circuit-types';
|
|
2
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
3
|
-
import { type AttestationPool } from './attestation_pool.js';
|
|
4
|
-
export declare class InMemoryAttestationPool implements AttestationPool {
|
|
5
|
-
#private;
|
|
6
|
-
private log;
|
|
7
|
-
private metrics;
|
|
8
|
-
private attestations;
|
|
9
|
-
constructor(telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
|
|
10
|
-
getAttestationsForSlot(slot: bigint, proposalId: string): Promise<BlockAttestation[]>;
|
|
11
|
-
addAttestations(attestations: BlockAttestation[]): Promise<void>;
|
|
12
|
-
deleteAttestationsOlderThan(oldestSlot: bigint): Promise<void>;
|
|
13
|
-
deleteAttestationsForSlot(slot: bigint): Promise<void>;
|
|
14
|
-
deleteAttestationsForSlotAndProposal(slot: bigint, proposalId: string): Promise<void>;
|
|
15
|
-
deleteAttestations(attestations: BlockAttestation[]): Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=memory_attestation_pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory_attestation_pool.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/attestation_pool/memory_attestation_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAGnF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,qBAAa,uBAAwB,YAAW,eAAe;;IAKE,OAAO,CAAC,GAAG;IAJ1E,OAAO,CAAC,OAAO,CAAwC;IAEvD,OAAO,CAAC,YAAY,CAAgG;gBAExG,SAAS,GAAE,eAAsC,EAAU,GAAG,yCAAuC;IAK1G,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAW/E,eAAe,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAgChE,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBpE,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWtD,oCAAoC,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe/E,kBAAkB,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBjF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BlockAttestation, TxHash } from '@aztec/circuit-types';
|
|
2
|
-
import { type Secp256k1Signer } from '@aztec/foundation/crypto';
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
import { type LocalAccount } from 'viem/accounts';
|
|
5
|
-
/** Generate Account
|
|
6
|
-
*
|
|
7
|
-
* Create a random signer
|
|
8
|
-
* @returns A random viem signer
|
|
9
|
-
*/
|
|
10
|
-
export declare const generateAccount: () => LocalAccount;
|
|
11
|
-
/** Mock Attestation
|
|
12
|
-
*
|
|
13
|
-
* @param signer A viem signer to create a signature
|
|
14
|
-
* @param slot The slot number the attestation is for
|
|
15
|
-
* @returns A Block Attestation
|
|
16
|
-
*/
|
|
17
|
-
export declare const mockAttestation: (signer: Secp256k1Signer, slot?: number, archive?: Fr, txs?: TxHash[]) => Promise<BlockAttestation>;
|
|
18
|
-
//# sourceMappingURL=mocks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/attestation_pool/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAGhB,MAAM,EAEP,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,KAAK,YAAY,EAA2C,MAAM,eAAe,CAAC;AAE3F;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAO,YAGlC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,WAClB,eAAe,SACjB,MAAM,YACH,EAAE,QACN,MAAM,EAAE,KACZ,QAAQ,gBAAgB,CAS1B,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type EpochProofQuote } from '@aztec/circuit-types';
|
|
2
|
-
export interface EpochProofQuotePool {
|
|
3
|
-
addQuote(quote: EpochProofQuote): void;
|
|
4
|
-
getQuotes(epoch: bigint): EpochProofQuote[];
|
|
5
|
-
deleteQuotesToEpoch(epoch: bigint): void;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=epoch_proof_quote_pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"epoch_proof_quote_pool.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/epoch_proof_quote_pool/epoch_proof_quote_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,CAAC;IAC5C,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/epoch_proof_quote_pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type EpochProofQuote } from '@aztec/circuit-types';
|
|
2
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
3
|
-
import { type EpochProofQuotePool } from './epoch_proof_quote_pool.js';
|
|
4
|
-
export declare class MemoryEpochProofQuotePool implements EpochProofQuotePool {
|
|
5
|
-
private quotes;
|
|
6
|
-
private metrics;
|
|
7
|
-
constructor(telemetry?: TelemetryClient);
|
|
8
|
-
addQuote(quote: EpochProofQuote): void;
|
|
9
|
-
getQuotes(epoch: bigint): EpochProofQuote[];
|
|
10
|
-
deleteQuotesToEpoch(epoch: bigint): void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=memory_epoch_proof_quote_pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory_epoch_proof_quote_pool.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/epoch_proof_quote_pool/memory_epoch_proof_quote_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAGnF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,qBAAa,yBAA0B,YAAW,mBAAmB;IACnE,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,OAAO,CAAuC;gBAE1C,SAAS,GAAE,eAAsC;IAK7D,QAAQ,CAAC,KAAK,EAAE,eAAe;IAS/B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE;IAG3C,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAazC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { EpochProofQuote, EpochProofQuotePayload } from '@aztec/circuit-types';
|
|
2
|
-
import { Secp256k1Signer } from '@aztec/foundation/crypto';
|
|
3
|
-
export declare function makeRandomEpochProofQuotePayload(): EpochProofQuotePayload;
|
|
4
|
-
export declare function makeRandomEpochProofQuote(payload?: EpochProofQuotePayload): {
|
|
5
|
-
quote: EpochProofQuote;
|
|
6
|
-
signer: Secp256k1Signer;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=test_utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test_utils.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/epoch_proof_quote_pool/test_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAE,eAAe,EAA2B,MAAM,0BAA0B,CAAC;AAEpF,wBAAgB,gCAAgC,IAAI,sBAAsB,CAQzE;AAED,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG;IAC3E,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;CACzB,CAOA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { TxPool } from './tx_pool/tx_pool.js';
|
|
2
|
-
export { AttestationPool } from './attestation_pool/attestation_pool.js';
|
|
3
|
-
export { EpochProofQuotePool } from './epoch_proof_quote_pool/epoch_proof_quote_pool.js';
|
|
4
|
-
export { type MemPools } from './interface.js';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mem_pools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type Gossipable } from '@aztec/circuit-types';
|
|
2
|
-
import { type LmdbStatsCallback, type TelemetryClient } from '@aztec/telemetry-client';
|
|
3
|
-
export declare enum PoolName {
|
|
4
|
-
TX_POOL = "TxPool",
|
|
5
|
-
ATTESTATION_POOL = "AttestationPool",
|
|
6
|
-
EPOCH_PROOF_QUOTE_POOL = "EpochProofQuotePool"
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Instrumentation class for the Pools (TxPool, AttestationPool, etc).
|
|
10
|
-
*/
|
|
11
|
-
export declare class PoolInstrumentation<PoolObject extends Gossipable> {
|
|
12
|
-
/** The number of txs in the mempool */
|
|
13
|
-
private objectsInMempool;
|
|
14
|
-
/** Tracks tx size */
|
|
15
|
-
private objectSize;
|
|
16
|
-
private dbMetrics;
|
|
17
|
-
private defaultAttributes;
|
|
18
|
-
constructor(telemetry: TelemetryClient, name: PoolName, dbStats?: LmdbStatsCallback);
|
|
19
|
-
recordSize(poolObject: PoolObject): void;
|
|
20
|
-
/**
|
|
21
|
-
* Updates the metrics with the new objects.
|
|
22
|
-
* @param txs - The objects to record
|
|
23
|
-
*/
|
|
24
|
-
recordAddedObjects(count?: number, status?: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Updates the metrics by removing objects from the mempool.
|
|
27
|
-
* @param count - The number of objects to remove from the mempool
|
|
28
|
-
*/
|
|
29
|
-
recordRemovedObjects(count?: number, status?: string): void;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../src/mem_pools/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAIL,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAC;AAEjC,oBAAY,QAAQ;IAClB,OAAO,WAAW;IAClB,gBAAgB,oBAAoB;IACpC,sBAAsB,wBAAwB;CAC/C;AAiCD;;GAEG;AACH,qBAAa,mBAAmB,CAAC,UAAU,SAAS,UAAU;IAC5D,uCAAuC;IACvC,OAAO,CAAC,gBAAgB,CAAgB;IACxC,qBAAqB;IACrB,OAAO,CAAC,UAAU,CAAY;IAE9B,OAAO,CAAC,SAAS,CAAc;IAE/B,OAAO,CAAC,iBAAiB,CAAC;gBAEd,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAwB5E,UAAU,CAAC,UAAU,EAAE,UAAU;IAIxC;;;OAGG;IACI,kBAAkB,CAAC,KAAK,SAAI,EAAE,MAAM,CAAC,EAAE,MAAM;IAiBpD;;;OAGG;IACI,oBAAoB,CAAC,KAAK,SAAI,EAAE,MAAM,CAAC,EAAE,MAAM;CAgBvD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type P2PClientType } from '@aztec/circuit-types';
|
|
2
|
-
import { type AttestationPool } from './attestation_pool/attestation_pool.js';
|
|
3
|
-
import { type EpochProofQuotePool } from './epoch_proof_quote_pool/epoch_proof_quote_pool.js';
|
|
4
|
-
import { type TxPool } from './tx_pool/tx_pool.js';
|
|
5
|
-
/**
|
|
6
|
-
* A interface the combines all mempools
|
|
7
|
-
*/
|
|
8
|
-
export type MemPools<T extends P2PClientType = P2PClientType.Full> = {
|
|
9
|
-
txPool: TxPool;
|
|
10
|
-
attestationPool?: T extends P2PClientType.Full ? AttestationPool : undefined;
|
|
11
|
-
epochProofQuotePool: EpochProofQuotePool;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/mem_pools/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,CAAC,IAAI,IAAI;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,CAAC,SAAS,aAAa,CAAC,IAAI,GAAG,eAAe,GAAG,SAAS,CAAC;IAC7E,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Tx, TxHash } from '@aztec/circuit-types';
|
|
2
|
-
import { type Logger } from '@aztec/foundation/log';
|
|
3
|
-
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
4
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
5
|
-
import { type TxPool } from './tx_pool.js';
|
|
6
|
-
/**
|
|
7
|
-
* KV implementation of the Transaction Pool.
|
|
8
|
-
*/
|
|
9
|
-
export declare class AztecKVTxPool implements TxPool {
|
|
10
|
-
#private;
|
|
11
|
-
/**
|
|
12
|
-
* Class constructor for KV TxPool. Initiates our transaction pool as an AztecMap.
|
|
13
|
-
* @param store - A KV store for live txs in the pool.
|
|
14
|
-
* @param archive - A KV store for archived txs.
|
|
15
|
-
* @param telemetry - A telemetry client.
|
|
16
|
-
* @param archivedTxLimit - The number of txs to archive.
|
|
17
|
-
* @param log - A logger.
|
|
18
|
-
*/
|
|
19
|
-
constructor(store: AztecAsyncKVStore, archive: AztecAsyncKVStore, telemetry?: TelemetryClient, archivedTxLimit?: number, log?: Logger);
|
|
20
|
-
markAsMined(txHashes: TxHash[], blockNumber: number): Promise<void>;
|
|
21
|
-
markMinedAsPending(txHashes: TxHash[]): Promise<void>;
|
|
22
|
-
getPendingTxHashes(): Promise<TxHash[]>;
|
|
23
|
-
getMinedTxHashes(): Promise<[TxHash, number][]>;
|
|
24
|
-
getTxStatus(txHash: TxHash): Promise<'pending' | 'mined' | undefined>;
|
|
25
|
-
/**
|
|
26
|
-
* Checks if a transaction exists in the pool and returns it.
|
|
27
|
-
* @param txHash - The generated tx hash.
|
|
28
|
-
* @returns The transaction, if found, 'undefined' otherwise.
|
|
29
|
-
*/
|
|
30
|
-
getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
31
|
-
/**
|
|
32
|
-
* Checks if an archived tx exists and returns it.
|
|
33
|
-
* @param txHash - The tx hash.
|
|
34
|
-
* @returns The transaction metadata, if found, 'undefined' otherwise.
|
|
35
|
-
*/
|
|
36
|
-
getArchivedTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
37
|
-
/**
|
|
38
|
-
* Adds a list of transactions to the pool. Duplicates are ignored.
|
|
39
|
-
* @param txs - An array of txs to be added to the pool.
|
|
40
|
-
* @returns Empty promise.
|
|
41
|
-
*/
|
|
42
|
-
addTxs(txs: Tx[]): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Deletes transactions from the pool. Tx hashes that are not present are ignored.
|
|
45
|
-
* @param txHashes - An array of tx hashes to be removed from the tx pool.
|
|
46
|
-
* @returns Empty promise.
|
|
47
|
-
*/
|
|
48
|
-
deleteTxs(txHashes: TxHash[]): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Gets all the transactions stored in the pool.
|
|
51
|
-
* @returns Array of tx objects in the order they were added to the pool.
|
|
52
|
-
*/
|
|
53
|
-
getAllTxs(): Promise<Tx[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Gets the hashes of all transactions currently in the tx pool.
|
|
56
|
-
* @returns An array of transaction hashes found in the tx pool.
|
|
57
|
-
*/
|
|
58
|
-
getAllTxHashes(): Promise<TxHash[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Archives a list of txs for future reference. The number of archived txs is limited by the specified archivedTxLimit.
|
|
61
|
-
* @param txs - The list of transactions to archive.
|
|
62
|
-
* @returns Empty promise.
|
|
63
|
-
*/
|
|
64
|
-
private archiveTxs;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=aztec_kv_tx_pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aztec_kv_tx_pool.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/tx_pool/aztec_kv_tx_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAIlD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAqC,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;GAEG;AACH,qBAAa,aAAc,YAAW,MAAM;;IA4B1C;;;;;;;OAOG;gBAED,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,iBAAiB,EAC1B,SAAS,GAAE,eAAsC,EACjD,eAAe,GAAE,MAAU,EAC3B,GAAG,SAA8B;IAgB5B,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBnE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB/C,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKvC,gBAAgB,IAAI,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAK/C,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAalF;;;;OAIG;IACU,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAUjE;;;;OAIG;IACU,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAUzE;;;;OAIG;IACU,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B7C;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAqCnD;;;OAGG;IACU,SAAS,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;IASvC;;;OAGG;IACU,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKhD;;;;OAIG;YACW,UAAU;CAiCzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/tx_pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Tx, TxHash } from '@aztec/circuit-types';
|
|
2
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
3
|
-
import { type TxPool } from './tx_pool.js';
|
|
4
|
-
/**
|
|
5
|
-
* In-memory implementation of the Transaction Pool.
|
|
6
|
-
*/
|
|
7
|
-
export declare class InMemoryTxPool implements TxPool {
|
|
8
|
-
private log;
|
|
9
|
-
/**
|
|
10
|
-
* Our tx pool, stored as a Map in-memory, with K: tx hash and V: the transaction.
|
|
11
|
-
*/
|
|
12
|
-
private txs;
|
|
13
|
-
private minedTxs;
|
|
14
|
-
private pendingTxs;
|
|
15
|
-
private metrics;
|
|
16
|
-
/**
|
|
17
|
-
* Class constructor for in-memory TxPool. Initiates our transaction pool as a JS Map.
|
|
18
|
-
* @param log - A logger.
|
|
19
|
-
*/
|
|
20
|
-
constructor(telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
|
|
21
|
-
markAsMined(txHashes: TxHash[], blockNumber: number): Promise<void>;
|
|
22
|
-
markMinedAsPending(txHashes: TxHash[]): Promise<void>;
|
|
23
|
-
getPendingTxHashes(): Promise<TxHash[]>;
|
|
24
|
-
getMinedTxHashes(): Promise<[TxHash, number][]>;
|
|
25
|
-
getTxStatus(txHash: TxHash): Promise<'pending' | 'mined' | undefined>;
|
|
26
|
-
/**
|
|
27
|
-
* Checks if a transaction exists in the pool and returns it.
|
|
28
|
-
* @param txHash - The generated tx hash.
|
|
29
|
-
* @returns The transaction, if found, 'undefined' otherwise.
|
|
30
|
-
*/
|
|
31
|
-
getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
32
|
-
getArchivedTxByHash(): Promise<Tx | undefined>;
|
|
33
|
-
/**
|
|
34
|
-
* Adds a list of transactions to the pool. Duplicates are ignored.
|
|
35
|
-
* @param txs - An array of txs to be added to the pool.
|
|
36
|
-
* @returns Empty promise.
|
|
37
|
-
*/
|
|
38
|
-
addTxs(txs: Tx[]): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Deletes transactions from the pool. Tx hashes that are not present are ignored.
|
|
41
|
-
* @param txHashes - An array of tx hashes to be removed from the tx pool.
|
|
42
|
-
* @returns The number of transactions that was deleted from the pool.
|
|
43
|
-
*/
|
|
44
|
-
deleteTxs(txHashes: TxHash[]): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Gets all the transactions stored in the pool.
|
|
47
|
-
* @returns Array of tx objects in the order they were added to the pool.
|
|
48
|
-
*/
|
|
49
|
-
getAllTxs(): Promise<Tx[]>;
|
|
50
|
-
/**
|
|
51
|
-
* Gets the hashes of all transactions currently in the tx pool.
|
|
52
|
-
* @returns An array of transaction hashes found in the tx pool.
|
|
53
|
-
*/
|
|
54
|
-
getAllTxHashes(): Promise<TxHash[]>;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=memory_tx_pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory_tx_pool.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/tx_pool/memory_tx_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;GAEG;AACH,qBAAa,cAAe,YAAW,MAAM;IAcoB,OAAO,CAAC,GAAG;IAb1E;;OAEG;IACH,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,UAAU,CAAc;IAEhC,OAAO,CAAC,OAAO,CAA0B;IAEzC;;;OAGG;gBACS,SAAS,GAAE,eAAsC,EAAU,GAAG,yCAA8B;IAOjG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWnE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B/C,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ7C,gBAAgB,IAAI,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAM/C,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAW5E;;;;OAIG;IACI,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAKpD,mBAAmB,IAAI,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAIrD;;;;OAIG;IACU,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB7C;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBnD;;;OAGG;IACI,SAAS,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;IAIjC;;;OAGG;IACI,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAG3C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Tx } from '@aztec/circuit-types';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a string representing the priority of a tx.
|
|
4
|
-
* Txs with a higher priority value are returned first when retrieving pending tx hashes.
|
|
5
|
-
* We currently use the sum of the priority fees for the tx for this value, represented as hex.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getPendingTxPriority(tx: Tx): string;
|
|
8
|
-
//# sourceMappingURL=priority.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"priority.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/tx_pool/priority.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAG/C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,CAInD"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { type Tx, type TxHash } from '@aztec/circuit-types';
|
|
2
|
-
/**
|
|
3
|
-
* Interface of a transaction pool. The pool includes tx requests and is kept up-to-date by a P2P client.
|
|
4
|
-
*/
|
|
5
|
-
export interface TxPool {
|
|
6
|
-
/**
|
|
7
|
-
* Adds a list of transactions to the pool. Duplicates are ignored.
|
|
8
|
-
* @param txs - An array of txs to be added to the pool.
|
|
9
|
-
*/
|
|
10
|
-
addTxs(txs: Tx[]): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Checks if a transaction exists in the pool and returns it.
|
|
13
|
-
* @param txHash - The hash of the transaction, used as an ID.
|
|
14
|
-
* @returns The transaction, if found, 'undefined' otherwise.
|
|
15
|
-
*/
|
|
16
|
-
getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
17
|
-
/**
|
|
18
|
-
* Checks if an archived transaction exists in the pool and returns it.
|
|
19
|
-
* @param txHash - The hash of the transaction, used as an ID.
|
|
20
|
-
* @returns The transaction, if found, 'undefined' otherwise.
|
|
21
|
-
*/
|
|
22
|
-
getArchivedTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
23
|
-
/**
|
|
24
|
-
* Marks the set of txs as mined, as opposed to pending.
|
|
25
|
-
* @param txHashes - Hashes of the txs to flag as mined.
|
|
26
|
-
*/
|
|
27
|
-
markAsMined(txHashes: TxHash[], blockNumber: number): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Moves mined txs back to the pending set in the case of a reorg.
|
|
30
|
-
* Note: txs not known by this peer will be ignored.
|
|
31
|
-
* @param txHashes - Hashes of the txs to flag as pending.
|
|
32
|
-
*/
|
|
33
|
-
markMinedAsPending(txHashes: TxHash[]): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Deletes transactions from the pool. Tx hashes that are not present are ignored.
|
|
36
|
-
* @param txHashes - An array of tx hashes to be removed from the tx pool.
|
|
37
|
-
*/
|
|
38
|
-
deleteTxs(txHashes: TxHash[]): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Gets all transactions currently in the tx pool.
|
|
41
|
-
* @returns An array of transaction objects found in the tx pool.
|
|
42
|
-
*/
|
|
43
|
-
getAllTxs(): Promise<Tx[]>;
|
|
44
|
-
/**
|
|
45
|
-
* Gets the hashes of all transactions currently in the tx pool.
|
|
46
|
-
* @returns An array of transaction hashes found in the tx pool.
|
|
47
|
-
*/
|
|
48
|
-
getAllTxHashes(): Promise<TxHash[]>;
|
|
49
|
-
/**
|
|
50
|
-
* Gets the hashes of pending transactions currently in the tx pool sorted by priority (see getPendingTxPriority).
|
|
51
|
-
* @returns An array of pending transaction hashes found in the tx pool.
|
|
52
|
-
*/
|
|
53
|
-
getPendingTxHashes(): Promise<TxHash[]>;
|
|
54
|
-
/**
|
|
55
|
-
* Gets the hashes of mined transactions currently in the tx pool.
|
|
56
|
-
* @returns An array of mined transaction hashes found in the tx pool.
|
|
57
|
-
*/
|
|
58
|
-
getMinedTxHashes(): Promise<[tx: TxHash, blockNumber: number][]>;
|
|
59
|
-
/**
|
|
60
|
-
* Returns whether the given tx hash is flagged as pending or mined.
|
|
61
|
-
* @param txHash - Hash of the tx to query.
|
|
62
|
-
* @returns Pending or mined depending on its status, or undefined if not found.
|
|
63
|
-
*/
|
|
64
|
-
getTxStatus(txHash: TxHash): Promise<'pending' | 'mined' | undefined>;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=tx_pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tx_pool.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/tx_pool/tx_pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAErD;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAE7D;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpE;;;;OAIG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAE3B;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEpC;;;OAGG;IACH,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAExC;;;OAGG;IACH,gBAAgB,IAAI,OAAO,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAEjE;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CACvE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tx_pool_test_suite.d.ts","sourceRoot":"","sources":["../../../src/mem_pools/tx_pool/tx_pool_test_suite.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,MAAM,QAsHrD"}
|
package/dest/mocks/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type ClientProtocolCircuitVerifier, type L2BlockSource, type P2PClientType, type Tx, type WorldStateSynchronizer } from '@aztec/circuit-types';
|
|
2
|
-
import { type EpochCache } from '@aztec/epoch-cache';
|
|
3
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
4
|
-
import { type PeerId } from '@libp2p/interface';
|
|
5
|
-
import { type Libp2p } from 'libp2p';
|
|
6
|
-
import { BootstrapNode } from '../bootstrap/bootstrap.js';
|
|
7
|
-
import { type BootnodeConfig } from '../config.js';
|
|
8
|
-
import { type MemPools } from '../mem_pools/interface.js';
|
|
9
|
-
import { LibP2PService } from '../services/libp2p/libp2p_service.js';
|
|
10
|
-
import { type PeerScoring } from '../services/peer-manager/peer_scoring.js';
|
|
11
|
-
import { type ReqRespSubProtocolHandlers, type ReqRespSubProtocolValidators } from '../services/reqresp/interface.js';
|
|
12
|
-
import { ReqResp } from '../services/reqresp/reqresp.js';
|
|
13
|
-
/**
|
|
14
|
-
* Creates a libp2p node, pre configured.
|
|
15
|
-
* @param boostrapAddrs - an optional list of bootstrap addresses
|
|
16
|
-
* @returns Lip2p node
|
|
17
|
-
*/
|
|
18
|
-
export declare function createLibp2pNode(boostrapAddrs?: string[], peerId?: PeerId, port?: number, enableGossipSub?: boolean, start?: boolean): Promise<Libp2p>;
|
|
19
|
-
/**
|
|
20
|
-
* Test Libp2p service
|
|
21
|
-
* P2P functionality is operational, however everything else is default
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
export declare function createTestLibP2PService<T extends P2PClientType>(clientType: T, boostrapAddrs: string[] | undefined, l2BlockSource: L2BlockSource, worldStateSynchronizer: WorldStateSynchronizer, epochCache: EpochCache, mempools: MemPools<T>, telemetry: TelemetryClient, port?: number, peerId?: PeerId): Promise<LibP2PService<T>>;
|
|
26
|
-
/**
|
|
27
|
-
* A p2p / req resp node pairing the req node will always contain the p2p node.
|
|
28
|
-
* they are provided as a pair to allow access the p2p node directly
|
|
29
|
-
*/
|
|
30
|
-
export type ReqRespNode = {
|
|
31
|
-
p2p: Libp2p;
|
|
32
|
-
req: ReqResp;
|
|
33
|
-
};
|
|
34
|
-
export declare const MOCK_SUB_PROTOCOL_HANDLERS: ReqRespSubProtocolHandlers;
|
|
35
|
-
export declare const MOCK_SUB_PROTOCOL_VALIDATORS: ReqRespSubProtocolValidators;
|
|
36
|
-
/**
|
|
37
|
-
* @param numberOfNodes - the number of nodes to create
|
|
38
|
-
* @returns An array of the created nodes
|
|
39
|
-
*/
|
|
40
|
-
export declare const createNodes: (peerScoring: PeerScoring, numberOfNodes: number) => Promise<ReqRespNode[]>;
|
|
41
|
-
export declare const startNodes: (nodes: ReqRespNode[], subProtocolHandlers?: ReqRespSubProtocolHandlers, subProtocolValidators?: ReqRespSubProtocolValidators) => Promise<void>;
|
|
42
|
-
export declare const stopNodes: (nodes: ReqRespNode[]) => Promise<void>;
|
|
43
|
-
export declare const createReqResp: (peerScoring: PeerScoring) => Promise<ReqRespNode>;
|
|
44
|
-
export declare const connectToPeers: (nodes: ReqRespNode[]) => Promise<void>;
|
|
45
|
-
export declare class AlwaysTrueCircuitVerifier implements ClientProtocolCircuitVerifier {
|
|
46
|
-
verifyProof(_tx: Tx): Promise<boolean>;
|
|
47
|
-
}
|
|
48
|
-
export declare class AlwaysFalseCircuitVerifier implements ClientProtocolCircuitVerifier {
|
|
49
|
-
verifyProof(_tx: Tx): Promise<boolean>;
|
|
50
|
-
}
|
|
51
|
-
export declare function createBootstrapNodeConfig(privateKey: string, port: number): BootnodeConfig;
|
|
52
|
-
export declare function createBootstrapNodeFromPrivateKey(privateKey: string, port: number, telemetry?: TelemetryClient): Promise<BootstrapNode>;
|
|
53
|
-
export declare function createBootstrapNode(port: number, telemetry?: TelemetryClient): Promise<BootstrapNode>;
|
|
54
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,EAAE,EACP,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAOnF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAE,KAAK,MAAM,EAAoC,MAAM,QAAQ,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EAElC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAGzD;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,aAAa,GAAE,MAAM,EAAO,EAC5B,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,eAAe,GAAE,OAAe,EAChC,KAAK,GAAE,OAAc,GACpB,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,aAAa,EACnE,UAAU,EAAE,CAAC,EACb,aAAa,sBAAe,EAC5B,aAAa,EAAE,aAAa,EAC5B,sBAAsB,EAAE,sBAAsB,EAC9C,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,SAAS,EAAE,eAAe,EAC1B,IAAI,GAAE,MAAU,EAChB,MAAM,CAAC,EAAE,MAAM,6BAiChB;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAGF,eAAO,MAAM,0BAA0B,EAAE,0BAMxC,CAAC;AAIF,eAAO,MAAM,4BAA4B,EAAE,4BAM1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,gBAAiB,WAAW,iBAAiB,MAAM,KAAG,QAAQ,WAAW,EAAE,CAElG,CAAC;AAEF,eAAO,MAAM,UAAU,UACd,WAAW,EAAE,0HAOrB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAiB,WAAW,EAAE,KAAG,QAAQ,IAAI,CAGlE,CAAC;AAGF,eAAO,MAAM,aAAa,gBAAuB,WAAW,KAAG,QAAQ,WAAW,CAWjF,CAAC;AAGF,eAAO,MAAM,cAAc,UAAiB,WAAW,EAAE,KAAG,QAAQ,IAAI,CAUvE,CAAC;AAGF,qBAAa,yBAA0B,YAAW,6BAA6B;IAC7E,WAAW,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAGvC;AACD,qBAAa,0BAA2B,YAAW,6BAA6B;IAC9E,WAAW,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAGvC;AAGD,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAU1F;AAED,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,eAAsC,GAChD,OAAO,CAAC,aAAa,CAAC,CAGxB;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,eAAsC,GAChD,OAAO,CAAC,aAAa,CAAC,CAKxB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockAttestation, type P2PValidator, PeerErrorSeverity } from '@aztec/circuit-types';
|
|
2
|
-
import { type EpochCache } from '@aztec/epoch-cache';
|
|
3
|
-
export declare class AttestationValidator implements P2PValidator<BlockAttestation> {
|
|
4
|
-
private epochCache;
|
|
5
|
-
constructor(epochCache: EpochCache);
|
|
6
|
-
validate(message: BlockAttestation): Promise<PeerErrorSeverity | undefined>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=attestation_validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attestation_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/attestation_validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,oBAAqB,YAAW,YAAY,CAAC,gBAAgB,CAAC;IACzE,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAI5B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;CAelF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/attestation_validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BlockProposal, type P2PValidator, PeerErrorSeverity } from '@aztec/circuit-types';
|
|
2
|
-
import { type EpochCache } from '@aztec/epoch-cache';
|
|
3
|
-
export declare class BlockProposalValidator implements P2PValidator<BlockProposal> {
|
|
4
|
-
private epochCache;
|
|
5
|
-
constructor(epochCache: EpochCache);
|
|
6
|
-
validate(block: BlockProposal): Promise<PeerErrorSeverity | undefined>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=block_proposal_validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,sBAAuB,YAAW,YAAY,CAAC,aAAa,CAAC;IACxE,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAI5B,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;CAkB7E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/block_proposal_validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type EpochProofQuote, type P2PValidator, PeerErrorSeverity } from '@aztec/circuit-types';
|
|
2
|
-
import { type EpochCache } from '@aztec/epoch-cache';
|
|
3
|
-
export declare class EpochProofQuoteValidator implements P2PValidator<EpochProofQuote> {
|
|
4
|
-
private epochCache;
|
|
5
|
-
constructor(epochCache: EpochCache);
|
|
6
|
-
validate(message: EpochProofQuote): Promise<PeerErrorSeverity | undefined>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=epoch_proof_quote_validator.d.ts.map
|
package/dest/msg_validators/epoch_proof_quote_validator/epoch_proof_quote_validator.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"epoch_proof_quote_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/epoch_proof_quote_validator/epoch_proof_quote_validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,wBAAyB,YAAW,YAAY,CAAC,eAAe,CAAC;IAC5E,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;CAW3E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/epoch_proof_quote_validator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/msg_validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ProcessedTx, type Tx, type TxValidationResult, type TxValidator } from '@aztec/circuit-types';
|
|
2
|
-
export declare class AggregateTxValidator<T extends Tx | ProcessedTx> implements TxValidator<T> {
|
|
3
|
-
#private;
|
|
4
|
-
constructor(...validators: TxValidator<T>[]);
|
|
5
|
-
validateTx(tx: T): Promise<TxValidationResult>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=aggregate_tx_validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate_tx_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/tx_validator/aggregate_tx_validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE5G,qBAAa,oBAAoB,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,CAAE,YAAW,WAAW,CAAC,CAAC,CAAC;;gBAEzE,GAAG,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE;IAQrC,UAAU,CAAC,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAmBrD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type AnyTx, type TxValidationResult, type TxValidator } from '@aztec/circuit-types';
|
|
2
|
-
import { type Fr } from '@aztec/circuits.js';
|
|
3
|
-
export interface ArchiveSource {
|
|
4
|
-
getArchiveIndices: (archives: Fr[]) => Promise<(bigint | undefined)[]>;
|
|
5
|
-
}
|
|
6
|
-
export declare class BlockHeaderTxValidator<T extends AnyTx> implements TxValidator<T> {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(archiveSource: ArchiveSource);
|
|
9
|
-
validateTx(tx: T): Promise<TxValidationResult>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=block_header_validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block_header_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/tx_validator/block_header_validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAM,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAG7C,MAAM,WAAW,aAAa;IAC5B,iBAAiB,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,OAAO,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;CACxE;AAED,qBAAa,sBAAsB,CAAC,CAAC,SAAS,KAAK,CAAE,YAAW,WAAW,CAAC,CAAC,CAAC;;gBAIhE,aAAa,EAAE,aAAa;IAIlC,UAAU,CAAC,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAQrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/tx_validator/data_validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGrF,qBAAa,eAAgB,YAAW,WAAW,CAAC,EAAE,CAAC;;IAGrD,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA8ChD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { type AnyTx, type TxValidationResult, type TxValidator } from '@aztec/circuit-types';
|
|
4
|
-
export interface NullifierSource {
|
|
5
|
-
nullifiersExist: (nullifiers: Buffer[]) => Promise<boolean[]>;
|
|
6
|
-
}
|
|
7
|
-
export declare class DoubleSpendTxValidator<T extends AnyTx> implements TxValidator<T> {
|
|
8
|
-
#private;
|
|
9
|
-
constructor(nullifierSource: NullifierSource);
|
|
10
|
-
validateTx(tx: T): Promise<TxValidationResult>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=double_spend_validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"double_spend_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/tx_validator/double_spend_validator.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,KAAK,EAAM,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGjG,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC/D;AAED,qBAAa,sBAAsB,CAAC,CAAC,SAAS,KAAK,CAAE,YAAW,WAAW,CAAC,CAAC,CAAC;;gBAIhE,eAAe,EAAE,eAAe;IAItC,UAAU,CAAC,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAiBrD"}
|