@aztec/p2p 3.0.0-nightly.20251104 → 3.0.0-nightly.20251105
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/msg_validators/tx_validator/phases_validator.d.ts.map +1 -1
- package/dest/msg_validators/tx_validator/phases_validator.js +3 -1
- package/dest/services/libp2p/libp2p_service.js +1 -1
- package/package.json +14 -14
- package/src/msg_validators/tx_validator/phases_validator.ts +3 -1
- package/src/services/libp2p/libp2p_service.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phases_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/tx_validator/phases_validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAIL,EAAE,EAEF,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,qBAAa,iBAAkB,YAAW,WAAW,CAAC,EAAE,CAAC;;IAMrD,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,SAAS;IALnB,OAAO,CAAC,WAAW,CAAoB;gBAGrC,SAAS,EAAE,kBAAkB,EACrB,cAAc,EAAE,cAAc,EAAE,EAChC,SAAS,EAAE,MAAM;IAKrB,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"phases_validator.d.ts","sourceRoot":"","sources":["../../../src/msg_validators/tx_validator/phases_validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAIL,EAAE,EAEF,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,qBAAa,iBAAkB,YAAW,WAAW,CAAC,EAAE,CAAC;;IAMrD,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,SAAS;IALnB,OAAO,CAAC,WAAW,CAAoB;gBAGrC,SAAS,EAAE,kBAAkB,EACrB,cAAc,EAAE,cAAc,EAAE,EAChC,SAAS,EAAE,MAAM;IAKrB,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAuCvC,aAAa;CAiD5B"}
|
|
@@ -13,10 +13,12 @@ export class PhasesTxValidator {
|
|
|
13
13
|
this.contractsDB = new PublicContractsDB(contracts);
|
|
14
14
|
}
|
|
15
15
|
async validateTx(tx) {
|
|
16
|
+
this.contractsDB.createCheckpoint();
|
|
16
17
|
try {
|
|
17
18
|
// TODO(@spalladino): We add this just to handle public authwit-check calls during setup
|
|
18
19
|
// which are needed for public FPC flows, but fail if the account contract hasnt been deployed yet,
|
|
19
20
|
// which is what we're trying to do as part of the current txs.
|
|
21
|
+
// We only need to create/revert checkpoint here because of this addNewContracts call.
|
|
20
22
|
await this.contractsDB.addNewContracts(tx);
|
|
21
23
|
if (!tx.data.forPublic) {
|
|
22
24
|
this.#log.debug(`Tx ${tx.getTxHash().toString()} does not contain enqueued public functions. Skipping phases validation.`);
|
|
@@ -50,7 +52,7 @@ export class PhasesTxValidator {
|
|
|
50
52
|
]
|
|
51
53
|
};
|
|
52
54
|
} finally{
|
|
53
|
-
this.contractsDB.
|
|
55
|
+
this.contractsDB.revertCheckpoint();
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
async isOnAllowList(publicCall, allowList) {
|
|
@@ -323,7 +323,7 @@ import { P2PInstrumentation } from './instrumentation.js';
|
|
|
323
323
|
[ReqRespSubProtocol.BLOCK]: blockHandler.bind(this)
|
|
324
324
|
};
|
|
325
325
|
// Only handle block transactions request if attestation pool is available to the client
|
|
326
|
-
if (this.mempools.attestationPool) {
|
|
326
|
+
if (this.mempools.attestationPool && !this.config.disableTransactions) {
|
|
327
327
|
const blockTxsHandler = reqRespBlockTxsHandler(this.mempools.attestationPool, this.mempools.txPool);
|
|
328
328
|
requestResponseHandlers[ReqRespSubProtocol.BLOCK_TXS] = blockTxsHandler.bind(this);
|
|
329
329
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/p2p",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251105",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -67,17 +67,17 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
71
|
-
"@aztec/epoch-cache": "3.0.0-nightly.
|
|
72
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
73
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
74
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
75
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
76
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
77
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
78
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
79
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
80
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
70
|
+
"@aztec/constants": "3.0.0-nightly.20251105",
|
|
71
|
+
"@aztec/epoch-cache": "3.0.0-nightly.20251105",
|
|
72
|
+
"@aztec/ethereum": "3.0.0-nightly.20251105",
|
|
73
|
+
"@aztec/foundation": "3.0.0-nightly.20251105",
|
|
74
|
+
"@aztec/kv-store": "3.0.0-nightly.20251105",
|
|
75
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20251105",
|
|
76
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251105",
|
|
77
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251105",
|
|
78
|
+
"@aztec/simulator": "3.0.0-nightly.20251105",
|
|
79
|
+
"@aztec/stdlib": "3.0.0-nightly.20251105",
|
|
80
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251105",
|
|
81
81
|
"@chainsafe/libp2p-gossipsub": "13.0.0",
|
|
82
82
|
"@chainsafe/libp2p-noise": "^15.0.0",
|
|
83
83
|
"@chainsafe/libp2p-yamux": "^6.0.2",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"xxhash-wasm": "^1.1.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
108
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
107
|
+
"@aztec/archiver": "3.0.0-nightly.20251105",
|
|
108
|
+
"@aztec/world-state": "3.0.0-nightly.20251105",
|
|
109
109
|
"@jest/globals": "^30.0.0",
|
|
110
110
|
"@types/jest": "^30.0.0",
|
|
111
111
|
"@types/node": "^22.15.17",
|
|
@@ -26,10 +26,12 @@ export class PhasesTxValidator implements TxValidator<Tx> {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
async validateTx(tx: Tx): Promise<TxValidationResult> {
|
|
29
|
+
this.contractsDB.createCheckpoint();
|
|
29
30
|
try {
|
|
30
31
|
// TODO(@spalladino): We add this just to handle public authwit-check calls during setup
|
|
31
32
|
// which are needed for public FPC flows, but fail if the account contract hasnt been deployed yet,
|
|
32
33
|
// which is what we're trying to do as part of the current txs.
|
|
34
|
+
// We only need to create/revert checkpoint here because of this addNewContracts call.
|
|
33
35
|
await this.contractsDB.addNewContracts(tx);
|
|
34
36
|
|
|
35
37
|
if (!tx.data.forPublic) {
|
|
@@ -58,7 +60,7 @@ export class PhasesTxValidator implements TxValidator<Tx> {
|
|
|
58
60
|
this.#log.error(`Error validating phases for tx`, err);
|
|
59
61
|
return { result: 'invalid', reason: [TX_ERROR_DURING_VALIDATION] };
|
|
60
62
|
} finally {
|
|
61
|
-
this.contractsDB.
|
|
63
|
+
this.contractsDB.revertCheckpoint();
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -478,7 +478,7 @@ export class LibP2PService<T extends P2PClientType = P2PClientType.Full> extends
|
|
|
478
478
|
};
|
|
479
479
|
|
|
480
480
|
// Only handle block transactions request if attestation pool is available to the client
|
|
481
|
-
if (this.mempools.attestationPool) {
|
|
481
|
+
if (this.mempools.attestationPool && !this.config.disableTransactions) {
|
|
482
482
|
const blockTxsHandler = reqRespBlockTxsHandler(this.mempools.attestationPool, this.mempools.txPool);
|
|
483
483
|
requestResponseHandlers[ReqRespSubProtocol.BLOCK_TXS] = blockTxsHandler.bind(this);
|
|
484
484
|
}
|