@aztec/sequencer-client 0.85.0-alpha-testnet.3 → 0.85.0-alpha-testnet.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx_validator_factory.d.ts","sourceRoot":"","sources":["../../src/tx_validator/tx_validator_factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tx_validator_factory.d.ts","sourceRoot":"","sources":["../../src/tx_validator/tx_validator_factory.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,wBAAgB,8BAA8B,CAC5C,EAAE,EAAE,wBAAwB,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,6BAA6B,GAAG,SAAS,EACnD,EACE,WAAW,EACX,SAAS,EACT,aAAa,EACb,cAAc,EACd,OAAO,EACP,kBAAkB,GACnB,EAAE;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GACA,WAAW,CAAC,EAAE,CAAC,CAwBjB;AAED,wBAAgB,+BAA+B,CAC7C,EAAE,EAAE,wBAAwB,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAAE,GAC/B;IACD,mBAAmB,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;IACrC,cAAc,EAAE,cAAc,CAAC;CAChC,CAgBA"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
2
3
|
import { AggregateTxValidator, ArchiveCache, BlockHeaderTxValidator, DataTxValidator, DoubleSpendTxValidator, GasTxValidator, MetadataTxValidator, PhasesTxValidator, TxProofValidator } from '@aztec/p2p';
|
|
3
|
-
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
4
|
+
import { ProtocolContractAddress, protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
4
5
|
import { DatabasePublicStateSource } from '@aztec/stdlib/trees';
|
|
5
6
|
import { NullifierCache } from './nullifier_cache.js';
|
|
6
7
|
export function createValidatorForAcceptingTxs(db, contractDataSource, verifier, { blockNumber, l1ChainId, rollupVersion, setupAllowList, gasFees, skipFeeEnforcement }) {
|
|
7
8
|
const validators = [
|
|
8
9
|
new DataTxValidator(),
|
|
9
|
-
new MetadataTxValidator(
|
|
10
|
+
new MetadataTxValidator({
|
|
11
|
+
l1ChainId: new Fr(l1ChainId),
|
|
12
|
+
rollupVersion: new Fr(rollupVersion),
|
|
13
|
+
blockNumber: new Fr(blockNumber),
|
|
14
|
+
protocolContractTreeRoot,
|
|
15
|
+
vkTreeRoot: getVKTreeRoot()
|
|
16
|
+
}),
|
|
10
17
|
new DoubleSpendTxValidator(new NullifierCache(db)),
|
|
11
18
|
new PhasesTxValidator(contractDataSource, setupAllowList, blockNumber),
|
|
12
19
|
new BlockHeaderTxValidator(new ArchiveCache(db))
|
|
@@ -30,5 +37,11 @@ export function createValidatorForBlockBuilding(db, contractDataSource, globalVa
|
|
|
30
37
|
}
|
|
31
38
|
function preprocessValidator(nullifierCache, archiveCache, publicStateSource, contractDataSource, globalVariables, setupAllowList) {
|
|
32
39
|
// We don't include the TxProofValidator nor the DataTxValidator here because they are already checked by the time we get to block building.
|
|
33
|
-
return new AggregateTxValidator(new MetadataTxValidator(
|
|
40
|
+
return new AggregateTxValidator(new MetadataTxValidator({
|
|
41
|
+
l1ChainId: globalVariables.chainId,
|
|
42
|
+
rollupVersion: globalVariables.version,
|
|
43
|
+
blockNumber: globalVariables.blockNumber,
|
|
44
|
+
protocolContractTreeRoot,
|
|
45
|
+
vkTreeRoot: getVKTreeRoot()
|
|
46
|
+
}), new DoubleSpendTxValidator(nullifierCache), new PhasesTxValidator(contractDataSource, setupAllowList, globalVariables.blockNumber.toNumber()), new GasTxValidator(publicStateSource, ProtocolContractAddress.FeeJuice, globalVariables.gasFees), new BlockHeaderTxValidator(archiveCache));
|
|
34
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/sequencer-client",
|
|
3
|
-
"version": "0.85.0-alpha-testnet.
|
|
3
|
+
"version": "0.85.0-alpha-testnet.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -28,36 +28,36 @@
|
|
|
28
28
|
"test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aztec/aztec.js": "0.85.0-alpha-testnet.
|
|
32
|
-
"@aztec/bb-prover": "0.85.0-alpha-testnet.
|
|
33
|
-
"@aztec/blob-lib": "0.85.0-alpha-testnet.
|
|
34
|
-
"@aztec/blob-sink": "0.85.0-alpha-testnet.
|
|
35
|
-
"@aztec/constants": "0.85.0-alpha-testnet.
|
|
36
|
-
"@aztec/epoch-cache": "0.85.0-alpha-testnet.
|
|
37
|
-
"@aztec/ethereum": "0.85.0-alpha-testnet.
|
|
38
|
-
"@aztec/foundation": "0.85.0-alpha-testnet.
|
|
39
|
-
"@aztec/l1-artifacts": "0.85.0-alpha-testnet.
|
|
40
|
-
"@aztec/merkle-tree": "0.85.0-alpha-testnet.
|
|
41
|
-
"@aztec/noir-acvm_js": "0.85.0-alpha-testnet.
|
|
42
|
-
"@aztec/noir-contracts.js": "0.85.0-alpha-testnet.
|
|
43
|
-
"@aztec/noir-protocol-circuits-types": "0.85.0-alpha-testnet.
|
|
44
|
-
"@aztec/noir-types": "0.85.0-alpha-testnet.
|
|
45
|
-
"@aztec/p2p": "0.85.0-alpha-testnet.
|
|
46
|
-
"@aztec/protocol-contracts": "0.85.0-alpha-testnet.
|
|
47
|
-
"@aztec/prover-client": "0.85.0-alpha-testnet.
|
|
48
|
-
"@aztec/simulator": "0.85.0-alpha-testnet.
|
|
49
|
-
"@aztec/stdlib": "0.85.0-alpha-testnet.
|
|
50
|
-
"@aztec/telemetry-client": "0.85.0-alpha-testnet.
|
|
51
|
-
"@aztec/validator-client": "0.85.0-alpha-testnet.
|
|
52
|
-
"@aztec/world-state": "0.85.0-alpha-testnet.
|
|
31
|
+
"@aztec/aztec.js": "0.85.0-alpha-testnet.4",
|
|
32
|
+
"@aztec/bb-prover": "0.85.0-alpha-testnet.4",
|
|
33
|
+
"@aztec/blob-lib": "0.85.0-alpha-testnet.4",
|
|
34
|
+
"@aztec/blob-sink": "0.85.0-alpha-testnet.4",
|
|
35
|
+
"@aztec/constants": "0.85.0-alpha-testnet.4",
|
|
36
|
+
"@aztec/epoch-cache": "0.85.0-alpha-testnet.4",
|
|
37
|
+
"@aztec/ethereum": "0.85.0-alpha-testnet.4",
|
|
38
|
+
"@aztec/foundation": "0.85.0-alpha-testnet.4",
|
|
39
|
+
"@aztec/l1-artifacts": "0.85.0-alpha-testnet.4",
|
|
40
|
+
"@aztec/merkle-tree": "0.85.0-alpha-testnet.4",
|
|
41
|
+
"@aztec/noir-acvm_js": "0.85.0-alpha-testnet.4",
|
|
42
|
+
"@aztec/noir-contracts.js": "0.85.0-alpha-testnet.4",
|
|
43
|
+
"@aztec/noir-protocol-circuits-types": "0.85.0-alpha-testnet.4",
|
|
44
|
+
"@aztec/noir-types": "0.85.0-alpha-testnet.4",
|
|
45
|
+
"@aztec/p2p": "0.85.0-alpha-testnet.4",
|
|
46
|
+
"@aztec/protocol-contracts": "0.85.0-alpha-testnet.4",
|
|
47
|
+
"@aztec/prover-client": "0.85.0-alpha-testnet.4",
|
|
48
|
+
"@aztec/simulator": "0.85.0-alpha-testnet.4",
|
|
49
|
+
"@aztec/stdlib": "0.85.0-alpha-testnet.4",
|
|
50
|
+
"@aztec/telemetry-client": "0.85.0-alpha-testnet.4",
|
|
51
|
+
"@aztec/validator-client": "0.85.0-alpha-testnet.4",
|
|
52
|
+
"@aztec/world-state": "0.85.0-alpha-testnet.4",
|
|
53
53
|
"lodash.chunk": "^4.2.0",
|
|
54
54
|
"lodash.pick": "^4.4.0",
|
|
55
55
|
"tslib": "^2.4.0",
|
|
56
56
|
"viem": "2.23.7"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@aztec/archiver": "0.85.0-alpha-testnet.
|
|
60
|
-
"@aztec/kv-store": "0.85.0-alpha-testnet.
|
|
59
|
+
"@aztec/archiver": "0.85.0-alpha-testnet.4",
|
|
60
|
+
"@aztec/kv-store": "0.85.0-alpha-testnet.4",
|
|
61
61
|
"@jest/globals": "^29.5.0",
|
|
62
62
|
"@types/jest": "^29.5.0",
|
|
63
63
|
"@types/lodash.chunk": "^4.2.7",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
2
3
|
import {
|
|
3
4
|
AggregateTxValidator,
|
|
4
5
|
ArchiveCache,
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
PhasesTxValidator,
|
|
11
12
|
TxProofValidator,
|
|
12
13
|
} from '@aztec/p2p';
|
|
13
|
-
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
14
|
+
import { ProtocolContractAddress, protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
14
15
|
import type { ContractDataSource } from '@aztec/stdlib/contract';
|
|
15
16
|
import type { GasFees } from '@aztec/stdlib/gas';
|
|
16
17
|
import type {
|
|
@@ -45,7 +46,13 @@ export function createValidatorForAcceptingTxs(
|
|
|
45
46
|
): TxValidator<Tx> {
|
|
46
47
|
const validators: TxValidator<Tx>[] = [
|
|
47
48
|
new DataTxValidator(),
|
|
48
|
-
new MetadataTxValidator(
|
|
49
|
+
new MetadataTxValidator({
|
|
50
|
+
l1ChainId: new Fr(l1ChainId),
|
|
51
|
+
rollupVersion: new Fr(rollupVersion),
|
|
52
|
+
blockNumber: new Fr(blockNumber),
|
|
53
|
+
protocolContractTreeRoot,
|
|
54
|
+
vkTreeRoot: getVKTreeRoot(),
|
|
55
|
+
}),
|
|
49
56
|
new DoubleSpendTxValidator(new NullifierCache(db)),
|
|
50
57
|
new PhasesTxValidator(contractDataSource, setupAllowList, blockNumber),
|
|
51
58
|
new BlockHeaderTxValidator(new ArchiveCache(db)),
|
|
@@ -98,7 +105,13 @@ function preprocessValidator(
|
|
|
98
105
|
): TxValidator<Tx> {
|
|
99
106
|
// We don't include the TxProofValidator nor the DataTxValidator here because they are already checked by the time we get to block building.
|
|
100
107
|
return new AggregateTxValidator(
|
|
101
|
-
new MetadataTxValidator(
|
|
108
|
+
new MetadataTxValidator({
|
|
109
|
+
l1ChainId: globalVariables.chainId,
|
|
110
|
+
rollupVersion: globalVariables.version,
|
|
111
|
+
blockNumber: globalVariables.blockNumber,
|
|
112
|
+
protocolContractTreeRoot,
|
|
113
|
+
vkTreeRoot: getVKTreeRoot(),
|
|
114
|
+
}),
|
|
102
115
|
new DoubleSpendTxValidator(nullifierCache),
|
|
103
116
|
new PhasesTxValidator(contractDataSource, setupAllowList, globalVariables.blockNumber.toNumber()),
|
|
104
117
|
new GasTxValidator(publicStateSource, ProtocolContractAddress.FeeJuice, globalVariables.gasFees),
|