@aztec/stdlib 0.0.1-commit.8c0b8ff → 0.0.1-commit.8cb2d04d8
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/abi/abi.d.ts +191 -26
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +4 -45
- package/dest/abi/authorization_selector.d.ts +3 -6
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +32 -6
- package/dest/abi/event_selector.d.ts +3 -6
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.d.ts +3 -6
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.js +1 -3
- package/dest/abi/note_selector.d.ts +3 -6
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/note_selector.js +1 -3
- package/dest/avm/avm_accumulated_data.js +2 -2
- package/dest/avm/avm_circuit_public_inputs.js +2 -2
- package/dest/aztec-address/index.d.ts +3 -6
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +2 -4
- package/dest/block/block_data.d.ts +8 -8
- package/dest/block/block_data.d.ts.map +1 -1
- package/dest/block/block_data.js +2 -2
- package/dest/block/block_hash.d.ts +11 -10
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +10 -9
- package/dest/block/l2_block_info.d.ts +6 -5
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_info.js +6 -5
- package/dest/block/l2_block_source.d.ts +80 -3
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +1 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +1 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.js +18 -5
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +4 -3
- package/dest/checkpoint/checkpoint.d.ts +7 -1
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +9 -1
- package/dest/checkpoint/checkpoint_data.d.ts +71 -5
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_data.js +10 -0
- package/dest/config/chain-config.d.ts +1 -1
- package/dest/config/chain-config.d.ts.map +1 -1
- package/dest/config/chain-config.js +7 -1
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/pipelining-config.d.ts +19 -0
- package/dest/config/pipelining-config.d.ts.map +1 -0
- package/dest/config/pipelining-config.js +18 -0
- package/dest/config/sequencer-config.d.ts +4 -2
- package/dest/config/sequencer-config.d.ts.map +1 -1
- package/dest/config/sequencer-config.js +11 -3
- package/dest/contract/contract_address.d.ts +3 -3
- package/dest/contract/contract_address.js +3 -3
- package/dest/contract/contract_class_id.d.ts +2 -2
- package/dest/contract/contract_class_id.js +2 -2
- package/dest/contract/index.d.ts +1 -3
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +0 -2
- package/dest/contract/interfaces/contract_class.d.ts +3 -156
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.js +1 -28
- package/dest/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/contract/private_function.js +2 -4
- package/dest/epoch-helpers/index.d.ts +3 -1
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +3 -0
- package/dest/file-store/factory.d.ts +4 -3
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +2 -2
- package/dest/file-store/http.d.ts +9 -2
- package/dest/file-store/http.d.ts.map +1 -1
- package/dest/file-store/http.js +20 -9
- package/dest/file-store/index.d.ts +2 -1
- package/dest/file-store/index.d.ts.map +1 -1
- package/dest/gas/fee_math.d.ts +49 -0
- package/dest/gas/fee_math.d.ts.map +1 -0
- package/dest/gas/fee_math.js +80 -0
- package/dest/gas/gas_fees.d.ts +1 -1
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +10 -1
- package/dest/gas/index.d.ts +2 -1
- package/dest/gas/index.d.ts.map +1 -1
- package/dest/gas/index.js +1 -0
- package/dest/ha-signing/config.d.ts +136 -0
- package/dest/ha-signing/config.d.ts.map +1 -0
- package/dest/ha-signing/config.js +97 -0
- package/dest/ha-signing/index.d.ts +4 -0
- package/dest/ha-signing/index.d.ts.map +1 -0
- package/dest/ha-signing/index.js +3 -0
- package/dest/ha-signing/local_config.d.ts +63 -0
- package/dest/ha-signing/local_config.d.ts.map +1 -0
- package/dest/ha-signing/local_config.js +24 -0
- package/dest/ha-signing/types.d.ts +90 -0
- package/dest/ha-signing/types.d.ts.map +1 -0
- package/dest/ha-signing/types.js +39 -0
- package/dest/hash/hash.d.ts +16 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +32 -0
- package/dest/interfaces/archiver.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +3 -1
- package/dest/interfaces/aztec-node-admin.d.ts +16 -17
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +3 -3
- package/dest/interfaces/aztec-node.d.ts +10 -1
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +2 -0
- package/dest/interfaces/l2_logs_source.d.ts +5 -3
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +4 -3
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/prover-client.d.ts +1 -1
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +0 -3
- package/dest/interfaces/proving-job.d.ts +200 -200
- package/dest/interfaces/slasher.d.ts +1 -10
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +0 -2
- package/dest/interfaces/validator.d.ts +45 -36
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -3
- package/dest/kernel/claimed_length_array.js +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.js +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +2 -2
- package/dest/kernel/private_to_public_accumulated_data.js +2 -2
- package/dest/kernel/private_to_rollup_accumulated_data.js +1 -1
- package/dest/kv-store/config.d.ts +17 -0
- package/dest/kv-store/config.d.ts.map +1 -0
- package/dest/kv-store/config.js +26 -0
- package/dest/kv-store/index.d.ts +2 -0
- package/dest/kv-store/index.d.ts.map +1 -0
- package/dest/kv-store/index.js +1 -0
- package/dest/l1-contracts/index.d.ts +2 -2
- package/dest/l1-contracts/index.d.ts.map +1 -1
- package/dest/l1-contracts/index.js +1 -1
- package/dest/logs/log_id.d.ts +1 -1
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +1 -2
- package/dest/logs/private_log.js +1 -1
- package/dest/logs/public_log.d.ts +1 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +1 -7
- package/dest/logs/siloed_tag.d.ts +5 -7
- package/dest/logs/siloed_tag.d.ts.map +1 -1
- package/dest/logs/siloed_tag.js +4 -0
- package/dest/logs/tag.d.ts +5 -6
- package/dest/logs/tag.d.ts.map +1 -1
- package/dest/logs/tag.js +4 -0
- package/dest/messaging/l1_to_l2_message_source.d.ts +4 -2
- package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +7 -9
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +5 -10
- package/dest/p2p/checkpoint_attestation.d.ts +4 -6
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +2 -7
- package/dest/p2p/checkpoint_proposal.d.ts +9 -11
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +6 -25
- package/dest/p2p/gossipable.d.ts +4 -4
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +1 -1
- package/dest/proofs/chonk_proof.d.ts +46 -2
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +84 -15
- package/dest/rollup/base_rollup_hints.js +2 -2
- package/dest/rollup/block_headers_hash.d.ts +1 -1
- package/dest/rollup/block_headers_hash.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +8 -2
- package/dest/rollup/block_root_rollup_private_inputs.js +5 -5
- package/dest/rollup/checkpoint_rollup_public_inputs.js +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +3 -3
- package/dest/rollup/root_rollup_public_inputs.js +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.js +2 -2
- package/dest/slashing/index.d.ts +2 -3
- package/dest/slashing/index.d.ts.map +1 -1
- package/dest/slashing/index.js +1 -2
- package/dest/slashing/serialization.d.ts +2 -6
- package/dest/slashing/serialization.d.ts.map +1 -1
- package/dest/slashing/serialization.js +0 -60
- package/dest/slashing/types.d.ts +4 -90
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +0 -14
- package/dest/slashing/{tally.d.ts → votes.d.ts} +1 -1
- package/dest/slashing/{tally.d.ts.map → votes.d.ts.map} +1 -1
- package/dest/slashing/{tally.js → votes.js} +1 -1
- package/dest/tests/factories.d.ts +3 -10
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +11 -34
- package/dest/tests/mocks.d.ts +1 -1
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +12 -17
- package/dest/timetable/index.d.ts +51 -1
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +204 -14
- package/dest/trees/nullifier_leaf.d.ts +2 -1
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +3 -0
- package/dest/tx/block_header.d.ts +2 -2
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +1 -1
- package/dest/tx/fee_provider.d.ts +10 -0
- package/dest/tx/fee_provider.d.ts.map +1 -0
- package/dest/tx/fee_provider.js +1 -0
- package/dest/tx/global_variable_builder.d.ts +3 -4
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/index.d.ts +2 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- package/dest/tx/indexed_tx_effect.d.ts +1 -1
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +1 -2
- package/dest/tx/protocol_contracts.js +2 -2
- package/dest/tx/simulated_tx.d.ts +151 -26
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/tx.d.ts +3 -3
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/types/shared.d.ts +1 -10
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/types/shared.js +0 -9
- package/dest/vks/verification_key.d.ts +2 -137
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +5 -126
- package/dest/vks/vk_data.js +1 -1
- package/dest/world-state/genesis_data.d.ts +11 -0
- package/dest/world-state/genesis_data.d.ts.map +1 -0
- package/dest/world-state/genesis_data.js +4 -0
- package/dest/world-state/index.d.ts +2 -1
- package/dest/world-state/index.d.ts.map +1 -1
- package/dest/world-state/index.js +1 -0
- package/package.json +11 -10
- package/src/abi/abi.ts +14 -67
- package/src/abi/authorization_selector.ts +2 -8
- package/src/abi/encoder.ts +42 -6
- package/src/abi/event_selector.ts +2 -8
- package/src/abi/function_selector.ts +3 -12
- package/src/abi/note_selector.ts +3 -12
- package/src/avm/avm_accumulated_data.ts +6 -6
- package/src/avm/avm_circuit_public_inputs.ts +4 -4
- package/src/aztec-address/index.ts +4 -10
- package/src/block/block_data.ts +3 -4
- package/src/block/block_hash.ts +21 -14
- package/src/block/l2_block_info.ts +8 -6
- package/src/block/l2_block_source.ts +10 -2
- package/src/block/l2_block_stream/l2_tips_store_base.ts +25 -13
- package/src/block/test/l2_tips_store_test_suite.ts +9 -2
- package/src/checkpoint/checkpoint.ts +11 -1
- package/src/checkpoint/checkpoint_data.ts +40 -4
- package/src/config/chain-config.ts +7 -1
- package/src/config/index.ts +1 -0
- package/src/config/pipelining-config.ts +31 -0
- package/src/config/sequencer-config.ts +17 -4
- package/src/contract/contract_address.ts +3 -3
- package/src/contract/contract_class_id.ts +2 -2
- package/src/contract/index.ts +0 -2
- package/src/contract/interfaces/contract_class.ts +2 -82
- package/src/contract/private_function.ts +3 -1
- package/src/epoch-helpers/index.ts +5 -0
- package/src/file-store/factory.ts +13 -4
- package/src/file-store/http.ts +29 -10
- package/src/file-store/index.ts +1 -0
- package/src/gas/README.md +31 -0
- package/src/gas/fee_math.ts +120 -0
- package/src/gas/gas_fees.ts +12 -4
- package/src/gas/index.ts +1 -0
- package/src/ha-signing/config.ts +156 -0
- package/src/ha-signing/index.ts +29 -0
- package/src/ha-signing/local_config.ts +46 -0
- package/src/ha-signing/types.ts +126 -0
- package/src/hash/hash.ts +27 -0
- package/src/interfaces/archiver.ts +3 -1
- package/src/interfaces/aztec-node-admin.ts +5 -7
- package/src/interfaces/aztec-node.ts +15 -0
- package/src/interfaces/l2_logs_source.ts +4 -1
- package/src/interfaces/merkle_tree_operations.ts +3 -2
- package/src/interfaces/prover-client.ts +2 -5
- package/src/interfaces/slasher.ts +0 -6
- package/src/interfaces/validator.ts +53 -44
- package/src/kernel/claimed_length_array.ts +2 -2
- package/src/kernel/hints/private_kernel_reset_hints.ts +2 -5
- package/src/kernel/hints/read_request_hints.ts +3 -3
- package/src/kernel/padded_side_effects.ts +3 -3
- package/src/kernel/private_to_avm_accumulated_data.ts +4 -4
- package/src/kernel/private_to_public_accumulated_data.ts +10 -10
- package/src/kernel/private_to_rollup_accumulated_data.ts +5 -5
- package/src/kv-store/config.ts +36 -0
- package/src/kv-store/index.ts +1 -0
- package/src/l1-contracts/index.ts +1 -1
- package/src/logs/log_id.ts +1 -2
- package/src/logs/private_log.ts +1 -1
- package/src/logs/public_log.ts +1 -11
- package/src/logs/siloed_tag.ts +8 -9
- package/src/logs/tag.ts +8 -8
- package/src/messaging/l1_to_l2_message_source.ts +3 -1
- package/src/p2p/block_proposal.ts +14 -10
- package/src/p2p/checkpoint_attestation.ts +5 -9
- package/src/p2p/checkpoint_proposal.ts +22 -37
- package/src/p2p/gossipable.ts +4 -4
- package/src/parity/parity_base_private_inputs.ts +1 -1
- package/src/proofs/chonk_proof.ts +90 -12
- package/src/rollup/base_rollup_hints.ts +2 -2
- package/src/rollup/block_headers_hash.ts +11 -2
- package/src/rollup/block_root_rollup_private_inputs.ts +8 -8
- package/src/rollup/checkpoint_rollup_public_inputs.ts +2 -2
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +4 -4
- package/src/rollup/root_rollup_public_inputs.ts +2 -2
- package/src/rollup/tree_snapshot_diff_hints.ts +5 -5
- package/src/slashing/index.ts +1 -2
- package/src/slashing/serialization.ts +1 -81
- package/src/slashing/types.ts +3 -35
- package/src/slashing/{tally.ts → votes.ts} +1 -1
- package/src/tests/factories.ts +5 -42
- package/src/tests/mocks.ts +14 -10
- package/src/timetable/index.ts +293 -13
- package/src/trees/nullifier_leaf.ts +4 -0
- package/src/tx/block_header.ts +2 -2
- package/src/tx/fee_provider.ts +10 -0
- package/src/tx/global_variable_builder.ts +2 -3
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +1 -2
- package/src/tx/protocol_contracts.ts +2 -2
- package/src/tx/tx.ts +2 -2
- package/src/types/shared.ts +0 -10
- package/src/vks/verification_key.ts +5 -184
- package/src/vks/vk_data.ts +1 -1
- package/src/world-state/genesis_data.ts +15 -0
- package/src/world-state/index.ts +1 -0
- package/dest/abi/mocked_keys.d.ts +0 -2
- package/dest/abi/mocked_keys.d.ts.map +0 -1
- package/dest/abi/mocked_keys.js +0 -1
- package/dest/contract/private_function_membership_proof.d.ts +0 -32
- package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
- package/dest/contract/private_function_membership_proof.js +0 -124
- package/dest/contract/utility_function_membership_proof.d.ts +0 -27
- package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
- package/dest/contract/utility_function_membership_proof.js +0 -87
- package/dest/l1-contracts/slash_factory.d.ts +0 -45
- package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
- package/dest/l1-contracts/slash_factory.js +0 -158
- package/dest/slashing/empire.d.ts +0 -31
- package/dest/slashing/empire.d.ts.map +0 -1
- package/dest/slashing/empire.js +0 -87
- package/src/abi/mocked_keys.ts +0 -2
- package/src/contract/private_function_membership_proof.ts +0 -167
- package/src/contract/utility_function_membership_proof.ts +0 -118
- package/src/l1-contracts/slash_factory.ts +0 -180
- package/src/slashing/empire.ts +0 -104
|
@@ -1,66 +1,10 @@
|
|
|
1
1
|
import { ULTRA_VK_LENGTH_IN_FIELDS } from '@aztec/constants';
|
|
2
2
|
import { makeTuple } from '@aztec/foundation/array';
|
|
3
|
-
import {
|
|
4
|
-
import { Fq, Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
4
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
6
5
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
7
6
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
8
7
|
import { hashVK } from '../hash/index.js';
|
|
9
|
-
import { CircuitType } from '../types/shared.js';
|
|
10
|
-
/**
|
|
11
|
-
* Curve data.
|
|
12
|
-
*/ export class G1AffineElement {
|
|
13
|
-
/**
|
|
14
|
-
* Element's x coordinate.
|
|
15
|
-
*/ x;
|
|
16
|
-
/**
|
|
17
|
-
* Element's y coordinate.
|
|
18
|
-
*/ y;
|
|
19
|
-
constructor(x, y){
|
|
20
|
-
this.x = typeof x === 'bigint' ? new Fq(x) : x;
|
|
21
|
-
this.y = typeof y === 'bigint' ? new Fq(y) : y;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Serialize as a buffer.
|
|
25
|
-
* @returns The buffer.
|
|
26
|
-
*/ toBuffer() {
|
|
27
|
-
return serializeToBuffer(this.x, this.y);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
31
|
-
* @param buffer - Buffer or BufferReader to read from.
|
|
32
|
-
* @returns The G1AffineElement.
|
|
33
|
-
*/ static fromBuffer(buffer) {
|
|
34
|
-
const reader = BufferReader.asReader(buffer);
|
|
35
|
-
return new G1AffineElement(Fq.fromBuffer(reader), Fq.fromBuffer(reader));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Used store and serialize a key-value map of commitments where key is the name of the commitment and value is
|
|
40
|
-
* the commitment itself. The name can be e.g. Q_1, Q_2, SIGMA_1 etc.
|
|
41
|
-
*/ export class CommitmentMap {
|
|
42
|
-
record;
|
|
43
|
-
constructor(/**
|
|
44
|
-
* An object used to store the commitments.
|
|
45
|
-
*/ record){
|
|
46
|
-
this.record = record;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Serialize as a buffer.
|
|
50
|
-
* @returns The buffer.
|
|
51
|
-
*/ toBuffer() {
|
|
52
|
-
const values = Object.entries(this.record);
|
|
53
|
-
return serializeToBuffer(values.length, ...values.flat());
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
57
|
-
* @param buffer - Buffer or BufferReader to read from.
|
|
58
|
-
* @returns The CommitmentMap.
|
|
59
|
-
*/ static fromBuffer(buffer) {
|
|
60
|
-
const reader = BufferReader.asReader(buffer);
|
|
61
|
-
return new CommitmentMap(reader.readMap(G1AffineElement));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
8
|
// TODO: find better home for these constants
|
|
65
9
|
export const CIRCUIT_SIZE_INDEX = 0;
|
|
66
10
|
export const CIRCUIT_PUBLIC_INPUTS_INDEX = 1;
|
|
@@ -136,70 +80,6 @@ export const CIRCUIT_PUBLIC_INPUTS_INDEX = 1;
|
|
|
136
80
|
return new VerificationKeyAsFields(makeTuple(size, Fr.zero), Fr.zero());
|
|
137
81
|
}
|
|
138
82
|
}
|
|
139
|
-
export class VerificationKey {
|
|
140
|
-
circuitType;
|
|
141
|
-
circuitSize;
|
|
142
|
-
numPublicInputs;
|
|
143
|
-
commitments;
|
|
144
|
-
containsRecursiveProof;
|
|
145
|
-
recursiveProofPublicInputIndices;
|
|
146
|
-
constructor(/**
|
|
147
|
-
* For Plonk, this is equivalent to the proving system used to prove and verify.
|
|
148
|
-
*/ circuitType, /**
|
|
149
|
-
* The number of gates in this circuit.
|
|
150
|
-
*/ circuitSize, /**
|
|
151
|
-
* The number of public inputs in this circuit.
|
|
152
|
-
*/ numPublicInputs, /**
|
|
153
|
-
* The commitments for this circuit.
|
|
154
|
-
*/ commitments, /**
|
|
155
|
-
* Contains a recursive proof?
|
|
156
|
-
*/ containsRecursiveProof, /**
|
|
157
|
-
* Recursion stack.
|
|
158
|
-
*/ recursiveProofPublicInputIndices){
|
|
159
|
-
this.circuitType = circuitType;
|
|
160
|
-
this.circuitSize = circuitSize;
|
|
161
|
-
this.numPublicInputs = numPublicInputs;
|
|
162
|
-
this.commitments = commitments;
|
|
163
|
-
this.containsRecursiveProof = containsRecursiveProof;
|
|
164
|
-
this.recursiveProofPublicInputIndices = recursiveProofPublicInputIndices;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Serialize as a buffer.
|
|
168
|
-
* @returns The buffer.
|
|
169
|
-
*/ toBuffer() {
|
|
170
|
-
return serializeToBuffer(this.circuitType, this.circuitSize, this.numPublicInputs, new CommitmentMap(this.commitments), this.containsRecursiveProof, serializeToBuffer(this.recursiveProofPublicInputIndices.length, this.recursiveProofPublicInputIndices));
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Deserializes class from a buffer.
|
|
174
|
-
* @returns A VerificationKey instance.
|
|
175
|
-
*/ static fromBuffer(buffer) {
|
|
176
|
-
const reader = BufferReader.asReader(buffer);
|
|
177
|
-
return new VerificationKey(reader.readNumber(), reader.readNumber(), reader.readNumber(), reader.readObject(CommitmentMap).record, reader.readBoolean(), reader.readNumberVector());
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Builds a fake Rollup Honk verification key that should be accepted by circuits.
|
|
181
|
-
* @returns A fake verification key.
|
|
182
|
-
*/ static makeRollupFake() {
|
|
183
|
-
return new VerificationKey(CircuitType.ULTRA, 2048, 116, {}, false, times(16, (i)=>i));
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Builds a fake verification key that should be accepted by circuits.
|
|
187
|
-
* @returns A fake verification key.
|
|
188
|
-
*/ static makeFake() {
|
|
189
|
-
return new VerificationKey(CircuitType.ULTRA, 2048, 116, {}, false, times(16, (i)=>i));
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Builds a fake MegaHonk verification key buffer for testing.
|
|
193
|
-
* Uses a real VK from a compiled contract to ensure proper format.
|
|
194
|
-
*
|
|
195
|
-
* @returns A valid MegaHonk VK buffer (4064 bytes)
|
|
196
|
-
*/ static makeFakeMegaHonk() {
|
|
197
|
-
// This is a real MegaFlavor VK from token_contract, base64-encoded
|
|
198
|
-
// Size: 4064 bytes (127 fields × 32 bytes)
|
|
199
|
-
const vk = 'AAAAA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ABRWfiw+hPwePmnYH2zlgAAAAAAAAAAAAAAAAAAAANYJxZ/uz4mfK5Wv9Rm78/s8AAAAAAAAAAAAAAAAAAAAAAADeJJvFQwwx2CWXfRprm4=';
|
|
200
|
-
return Buffer.from(vk, 'base64');
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
83
|
export class VerificationKeyData {
|
|
204
84
|
keyAsFields;
|
|
205
85
|
keyAsBytes;
|
|
@@ -217,13 +97,12 @@ export class VerificationKeyData {
|
|
|
217
97
|
return new VerificationKeyData(VerificationKeyAsFields.makeEmpty(0), Buffer.alloc(0));
|
|
218
98
|
}
|
|
219
99
|
static makeFakeHonk() {
|
|
220
|
-
|
|
100
|
+
const keyAsFields = VerificationKeyAsFields.makeFakeHonk();
|
|
101
|
+
return new VerificationKeyData(keyAsFields, keyAsFields.toBuffer());
|
|
221
102
|
}
|
|
222
103
|
static makeFakeRollupHonk() {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
static makeFake(len = ULTRA_VK_LENGTH_IN_FIELDS) {
|
|
226
|
-
return new VerificationKeyData(VerificationKeyAsFields.makeFake(len), VerificationKey.makeFake().toBuffer());
|
|
104
|
+
const keyAsFields = VerificationKeyAsFields.makeFakeRollupHonk();
|
|
105
|
+
return new VerificationKeyData(keyAsFields, keyAsFields.toBuffer());
|
|
227
106
|
}
|
|
228
107
|
/**
|
|
229
108
|
* Serialize as a buffer.
|
package/dest/vks/vk_data.js
CHANGED
|
@@ -22,7 +22,7 @@ export class VkData {
|
|
|
22
22
|
}
|
|
23
23
|
static fromBuffer(buffer) {
|
|
24
24
|
const reader = BufferReader.asReader(buffer);
|
|
25
|
-
return new VkData(reader.readObject(VerificationKeyData), reader.readNumber(), reader.
|
|
25
|
+
return new VkData(reader.readObject(VerificationKeyData), reader.readNumber(), reader.readArray(VK_TREE_HEIGHT, Fr));
|
|
26
26
|
}
|
|
27
27
|
toBuffer() {
|
|
28
28
|
return serializeToBuffer(this.vk, this.leafIndex, this.siblingPath);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PublicDataTreeLeaf } from '../trees/index.js';
|
|
2
|
+
/** Data used to initialize the genesis block, including prefilled public state and an optional timestamp. */
|
|
3
|
+
export type GenesisData = {
|
|
4
|
+
/** Public data tree leaves to pre-populate in the genesis state (e.g. fee juice balances). */
|
|
5
|
+
prefilledPublicData: PublicDataTreeLeaf[];
|
|
6
|
+
/** Timestamp for the genesis block header. Defaults to 0 (canonical empty genesis) in production. */
|
|
7
|
+
genesisTimestamp: bigint;
|
|
8
|
+
};
|
|
9
|
+
/** An empty genesis data with no prefilled state and a zero timestamp. */
|
|
10
|
+
export declare const EMPTY_GENESIS_DATA: GenesisData;
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXNpc19kYXRhLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd29ybGQtc3RhdGUvZ2VuZXNpc19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFNUQsNkdBQTZHO0FBQzdHLE1BQU0sTUFBTSxXQUFXLEdBQUc7SUFDeEIsOEZBQThGO0lBQzlGLG1CQUFtQixFQUFFLGtCQUFrQixFQUFFLENBQUM7SUFDMUMscUdBQXFHO0lBQ3JHLGdCQUFnQixFQUFFLE1BQU0sQ0FBQztDQUMxQixDQUFDO0FBRUYsMEVBQTBFO0FBQzFFLGVBQU8sTUFBTSxrQkFBa0IsRUFBRSxXQUdoQyxDQUFDIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genesis_data.d.ts","sourceRoot":"","sources":["../../src/world-state/genesis_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,6GAA6G;AAC7G,MAAM,MAAM,WAAW,GAAG;IACxB,8FAA8F;IAC9F,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAC1C,qGAAqG;IACrG,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,EAAE,WAGhC,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export * from './genesis_data.js';
|
|
1
2
|
export * from './world_state_revision.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy93b3JsZC1zdGF0ZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsMkJBQTJCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/world-state/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/world-state/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.8cb2d04d8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"./database-version/version": "./dest/database-version/database_version.js",
|
|
56
56
|
"./database-version/manager": "./dest/database-version/version_manager.js",
|
|
57
57
|
"./validators": "./dest/validators/index.js",
|
|
58
|
+
"./ha-signing": "./dest/ha-signing/index.js",
|
|
58
59
|
"./file-store": "./dest/file-store/index.js",
|
|
59
60
|
"./snapshots": "./dest/snapshots/index.js",
|
|
60
61
|
"./update-checker": "./dest/update-checker/index.js",
|
|
@@ -62,7 +63,8 @@
|
|
|
62
63
|
"./slashing": "./dest/slashing/index.js",
|
|
63
64
|
"./l1-contracts": "./dest/l1-contracts/index.js",
|
|
64
65
|
"./world-state": "./dest/world-state/index.js",
|
|
65
|
-
"./timetable": "./dest/timetable/index.js"
|
|
66
|
+
"./timetable": "./dest/timetable/index.js",
|
|
67
|
+
"./kv-store": "./dest/kv-store/index.js"
|
|
66
68
|
},
|
|
67
69
|
"typedocOptions": {
|
|
68
70
|
"entryPoints": [
|
|
@@ -90,14 +92,13 @@
|
|
|
90
92
|
},
|
|
91
93
|
"dependencies": {
|
|
92
94
|
"@aws-sdk/client-s3": "^3.892.0",
|
|
93
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
94
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
95
|
-
"@aztec/constants": "0.0.1-commit.
|
|
96
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
97
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
98
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
99
|
-
"@aztec/noir-noirc_abi": "0.0.1-commit.
|
|
100
|
-
"@aztec/validator-ha-signer": "0.0.1-commit.8c0b8ff",
|
|
95
|
+
"@aztec/bb.js": "0.0.1-commit.8cb2d04d8",
|
|
96
|
+
"@aztec/blob-lib": "0.0.1-commit.8cb2d04d8",
|
|
97
|
+
"@aztec/constants": "0.0.1-commit.8cb2d04d8",
|
|
98
|
+
"@aztec/ethereum": "0.0.1-commit.8cb2d04d8",
|
|
99
|
+
"@aztec/foundation": "0.0.1-commit.8cb2d04d8",
|
|
100
|
+
"@aztec/l1-artifacts": "0.0.1-commit.8cb2d04d8",
|
|
101
|
+
"@aztec/noir-noirc_abi": "0.0.1-commit.8cb2d04d8",
|
|
101
102
|
"@google-cloud/storage": "^7.15.0",
|
|
102
103
|
"axios": "^1.13.5",
|
|
103
104
|
"json-stringify-deterministic": "1.0.12",
|
package/src/abi/abi.ts
CHANGED
|
@@ -224,20 +224,13 @@ export const FunctionDebugMetadataSchema = z.object({
|
|
|
224
224
|
acir_locations: z.record(z.number()),
|
|
225
225
|
brillig_locations: z.record(z.record(z.number())),
|
|
226
226
|
}),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
z.object({
|
|
235
|
-
source: z.string(),
|
|
236
|
-
path: z.string(),
|
|
237
|
-
function_locations: z.array(z.object({ start: z.number(), name: z.string() })),
|
|
238
|
-
}),
|
|
239
|
-
),
|
|
240
|
-
) as z.ZodType<DebugFileMap>,
|
|
227
|
+
files: z.record(
|
|
228
|
+
z.object({
|
|
229
|
+
source: z.string(),
|
|
230
|
+
path: z.string(),
|
|
231
|
+
function_locations: z.array(z.object({ start: z.number(), name: z.string() })),
|
|
232
|
+
}),
|
|
233
|
+
),
|
|
241
234
|
}) satisfies z.ZodType<FunctionDebugMetadata>;
|
|
242
235
|
|
|
243
236
|
/** The artifact entry of a function. */
|
|
@@ -339,45 +332,6 @@ export type DebugFileMap = Record<
|
|
|
339
332
|
}
|
|
340
333
|
>;
|
|
341
334
|
|
|
342
|
-
/**
|
|
343
|
-
* Preprocessor for {@link FunctionDebugMetadataSchema} / {@link ContractArtifactSchema} that injects an empty
|
|
344
|
-
* `function_locations` array on any file map entry missing it. Invoked via `z.preprocess(...)` before the strict
|
|
345
|
-
* object schema runs, so legacy inputs do not fail validation.
|
|
346
|
-
*
|
|
347
|
-
* Why this exists on v4-next (and not on `next` / v5):
|
|
348
|
-
*
|
|
349
|
-
* - The Noir submodule on `next` was bumped past nightly-2026-03-19, which added `function_locations` to the
|
|
350
|
-
* debug file map in the Noir `@aztec/noir-types` package and to every freshly-compiled artifact's `file_map`
|
|
351
|
-
* entries. The matching stdlib change (making `DebugFileMap.function_locations` required) was done in one
|
|
352
|
-
* go on `next`, so there `function_locations` is always present both at compile time and at runtime.
|
|
353
|
-
*
|
|
354
|
-
* - On v4-next we had to cherry-pick the Noir bump (chore: Update Noir to nightly-2026-04-10 (#22393)) without
|
|
355
|
-
* re-running the full noir-projects compilation pipeline, so the on-disk contract and protocol-circuit
|
|
356
|
-
* artifacts (e.g. `yarn-project/protocol-contracts/artifacts/AuthRegistry.json`) still carry the pre-update
|
|
357
|
-
* `file_map` shape with only `source` + `path`. Separately, `ivc-integration` compares our `DebugFileMap`
|
|
358
|
-
* against the Noir-types `DebugFileMap`, which *does* require `function_locations`, so we cannot simply make
|
|
359
|
-
* our own field optional — that would break the structural compatibility check.
|
|
360
|
-
*
|
|
361
|
-
* - To satisfy both constraints at once we keep `function_locations` required in the static TypeScript type
|
|
362
|
-
* (so `ivc-integration` keeps compiling) but relax the runtime input shape via this preprocessor (so legacy
|
|
363
|
-
* artifacts keep parsing). Once all v4-next artifacts get regenerated with the new Noir compiler, this
|
|
364
|
-
* helper — and both `z.preprocess(...)` wrappers — can be removed.
|
|
365
|
-
*/
|
|
366
|
-
function fillMissingFunctionLocations(val: unknown): unknown {
|
|
367
|
-
if (val && typeof val === 'object') {
|
|
368
|
-
for (const entry of Object.values(val as Record<string, unknown>)) {
|
|
369
|
-
if (
|
|
370
|
-
entry &&
|
|
371
|
-
typeof entry === 'object' &&
|
|
372
|
-
(entry as { function_locations?: unknown }).function_locations === undefined
|
|
373
|
-
) {
|
|
374
|
-
(entry as { function_locations: FunctionLocation[] }).function_locations = [];
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
return val;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
335
|
/** Type representing a field layout in the storage of a contract. */
|
|
382
336
|
export type FieldLayout = {
|
|
383
337
|
/** Slot in which the field is stored. */
|
|
@@ -429,20 +383,13 @@ export const ContractArtifactSchema = zodFor<ContractArtifact>()(
|
|
|
429
383
|
globals: z.record(z.array(AbiValueSchema)),
|
|
430
384
|
}),
|
|
431
385
|
storageLayout: z.record(z.object({ slot: schemas.Fr })),
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
z.coerce.number(),
|
|
440
|
-
z.object({
|
|
441
|
-
source: z.string(),
|
|
442
|
-
path: z.string(),
|
|
443
|
-
function_locations: z.array(z.object({ start: z.number(), name: z.string() })),
|
|
444
|
-
}),
|
|
445
|
-
),
|
|
386
|
+
fileMap: z.record(
|
|
387
|
+
z.coerce.number(),
|
|
388
|
+
z.object({
|
|
389
|
+
source: z.string(),
|
|
390
|
+
path: z.string(),
|
|
391
|
+
function_locations: z.array(z.object({ start: z.number(), name: z.string() })),
|
|
392
|
+
}),
|
|
446
393
|
),
|
|
447
394
|
}),
|
|
448
395
|
);
|
|
@@ -7,18 +7,12 @@ import { BufferReader } from '@aztec/foundation/serialize';
|
|
|
7
7
|
|
|
8
8
|
import { Selector } from './selector.js';
|
|
9
9
|
|
|
10
|
-
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
|
11
|
-
|
|
12
|
-
/** Authorization selector branding */
|
|
13
|
-
export interface AuthorizationSelector {
|
|
14
|
-
/** Brand. */
|
|
15
|
-
_branding: 'AuthorizationSelector';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
/**
|
|
19
11
|
* An authorization selector is the first 4 bytes of the hash of an authorization struct signature.
|
|
20
12
|
*/
|
|
21
13
|
export class AuthorizationSelector extends Selector {
|
|
14
|
+
/** Branding for nominal typing. */
|
|
15
|
+
declare private readonly _branding: 'AuthorizationSelector';
|
|
22
16
|
/**
|
|
23
17
|
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
24
18
|
* @param buffer - Buffer or BufferReader to read from.
|
package/src/abi/encoder.ts
CHANGED
|
@@ -106,13 +106,28 @@ class ArgumentEncoder {
|
|
|
106
106
|
this.flattened.push(new Fr(arg ? 1n : 0n));
|
|
107
107
|
break;
|
|
108
108
|
case 'array':
|
|
109
|
+
if (!Array.isArray(arg)) {
|
|
110
|
+
throw new Error(`Expected array for '${name ?? 'unnamed'}' but received ${typeof arg}`);
|
|
111
|
+
}
|
|
112
|
+
if (arg.length !== abiType.length) {
|
|
113
|
+
throw new Error(
|
|
114
|
+
`Expected array of length ${abiType.length} for '${name ?? 'unnamed'}' but received length ${arg.length}`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
109
117
|
for (let i = 0; i < abiType.length; i += 1) {
|
|
110
118
|
this.encodeArgument(abiType.type, arg[i], `${name}[${i}]`);
|
|
111
119
|
}
|
|
112
120
|
break;
|
|
113
121
|
case 'string':
|
|
122
|
+
if (typeof arg !== 'string') {
|
|
123
|
+
throw new Error(`Expected string for '${name ?? 'unnamed'}' but received ${typeof arg}`);
|
|
124
|
+
}
|
|
125
|
+
if (arg.length > abiType.length) {
|
|
126
|
+
throw new Error(
|
|
127
|
+
`Expected string of max length ${abiType.length} for '${name ?? 'unnamed'}' but received length ${arg.length}`,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
114
130
|
for (let i = 0; i < abiType.length; i += 1) {
|
|
115
|
-
// If the string is shorter than the defined length, pad it with 0s.
|
|
116
131
|
const toInsert = i < arg.length ? BigInt((arg as string).charCodeAt(i)) : 0n;
|
|
117
132
|
this.flattened.push(new Fr(toInsert));
|
|
118
133
|
}
|
|
@@ -157,12 +172,28 @@ class ArgumentEncoder {
|
|
|
157
172
|
}
|
|
158
173
|
case 'integer': {
|
|
159
174
|
const value = BigInt(arg);
|
|
160
|
-
if (abiType.sign === '
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
175
|
+
if (abiType.sign === 'unsigned') {
|
|
176
|
+
const maxValue = (1n << BigInt(abiType.width)) - 1n;
|
|
177
|
+
if (value < 0n || value > maxValue) {
|
|
178
|
+
throw new Error(
|
|
179
|
+
`Value ${value} does not fit in u${abiType.width} for '${name ?? 'unnamed'}' (valid range: 0 to ${maxValue})`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
165
182
|
this.flattened.push(new Fr(value));
|
|
183
|
+
} else {
|
|
184
|
+
const minValue = -(1n << BigInt(abiType.width - 1));
|
|
185
|
+
const maxValue = (1n << BigInt(abiType.width - 1)) - 1n;
|
|
186
|
+
if (value < minValue || value > maxValue) {
|
|
187
|
+
throw new Error(
|
|
188
|
+
`Value ${value} does not fit in i${abiType.width} for '${name ?? 'unnamed'}' (valid range: ${minValue} to ${maxValue})`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
if (value < 0n) {
|
|
192
|
+
const twosComplement = value + (1n << BigInt(abiType.width));
|
|
193
|
+
this.flattened.push(new Fr(twosComplement));
|
|
194
|
+
} else {
|
|
195
|
+
this.flattened.push(new Fr(value));
|
|
196
|
+
}
|
|
166
197
|
}
|
|
167
198
|
break;
|
|
168
199
|
}
|
|
@@ -176,6 +207,11 @@ class ArgumentEncoder {
|
|
|
176
207
|
* @returns The encoded arguments.
|
|
177
208
|
*/
|
|
178
209
|
public encode() {
|
|
210
|
+
if (this.args.length !== this.abi.parameters.length) {
|
|
211
|
+
throw new Error(
|
|
212
|
+
`Function '${this.abi.name}' expects ${this.abi.parameters.length} argument(s) but received ${this.args.length}`,
|
|
213
|
+
);
|
|
214
|
+
}
|
|
179
215
|
for (let i = 0; i < this.abi.parameters.length; i += 1) {
|
|
180
216
|
const parameterAbi = this.abi.parameters[i];
|
|
181
217
|
this.encodeArgument(parameterAbi.type, this.args[i], parameterAbi.name);
|
|
@@ -7,16 +7,10 @@ import { BufferReader } from '@aztec/foundation/serialize';
|
|
|
7
7
|
|
|
8
8
|
import { Selector } from './selector.js';
|
|
9
9
|
|
|
10
|
-
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
|
11
|
-
|
|
12
|
-
/** Event selector branding */
|
|
13
|
-
export interface EventSelector {
|
|
14
|
-
/** Brand. */
|
|
15
|
-
_branding: 'EventSelector';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
/** An event selector is the first 4 bytes of the hash of an event signature. */
|
|
19
11
|
export class EventSelector extends Selector {
|
|
12
|
+
/** Branding for nominal typing. */
|
|
13
|
+
declare private readonly _branding: 'EventSelector';
|
|
20
14
|
/**
|
|
21
15
|
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
22
16
|
* @param buffer - Buffer or BufferReader to read from.
|
|
@@ -3,22 +3,16 @@ import { poseidon2HashBytes } from '@aztec/foundation/crypto/poseidon';
|
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
4
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import { type ZodFor, hexSchemaFor } from '@aztec/foundation/schemas';
|
|
6
|
-
import { BufferReader, FieldReader
|
|
6
|
+
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
7
7
|
|
|
8
8
|
import type { ABIParameter } from './abi.js';
|
|
9
9
|
import { decodeFunctionSignature } from './function_signature_decoder.js';
|
|
10
10
|
import { Selector } from './selector.js';
|
|
11
11
|
|
|
12
|
-
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
|
13
|
-
|
|
14
|
-
/** Function selector branding */
|
|
15
|
-
export interface FunctionSelector {
|
|
16
|
-
/** Brand. */
|
|
17
|
-
_branding: 'FunctionSelector';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
12
|
/** A function selector is the first 4 bytes of the hash of a function signature. */
|
|
21
13
|
export class FunctionSelector extends Selector {
|
|
14
|
+
/** Branding for nominal typing. */
|
|
15
|
+
declare private readonly _branding: 'FunctionSelector';
|
|
22
16
|
/**
|
|
23
17
|
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
24
18
|
* @param buffer - Buffer or BufferReader to read from.
|
|
@@ -127,6 +121,3 @@ export class FunctionSelector extends Selector {
|
|
|
127
121
|
return hexSchemaFor(FunctionSelector);
|
|
128
122
|
}
|
|
129
123
|
}
|
|
130
|
-
|
|
131
|
-
// For deserializing JSON.
|
|
132
|
-
TypeRegistry.register('FunctionSelector', FunctionSelector);
|
package/src/abi/note_selector.ts
CHANGED
|
@@ -2,23 +2,17 @@ import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
|
2
2
|
import { randomInt } from '@aztec/foundation/crypto/random';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import { hexSchemaFor } from '@aztec/foundation/schemas';
|
|
5
|
-
import { BufferReader
|
|
5
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
6
6
|
|
|
7
7
|
import { Selector } from './selector.js';
|
|
8
8
|
|
|
9
|
-
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
|
10
|
-
|
|
11
|
-
/** Note selector branding */
|
|
12
|
-
export interface NoteSelector {
|
|
13
|
-
/** Brand. */
|
|
14
|
-
_branding: 'NoteSelector';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
9
|
/**
|
|
18
10
|
* A note selector is a 7 bit long value that identifies a note type within a contract.
|
|
19
11
|
* TODO(#10952): Encoding of note type id can be reduced to 7 bits.
|
|
20
12
|
*/
|
|
21
13
|
export class NoteSelector extends Selector {
|
|
14
|
+
/** Branding for nominal typing. */
|
|
15
|
+
declare private readonly _branding: 'NoteSelector';
|
|
22
16
|
/**
|
|
23
17
|
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
24
18
|
* @param buffer - Buffer or BufferReader to read from.
|
|
@@ -73,6 +67,3 @@ export class NoteSelector extends Selector {
|
|
|
73
67
|
return hexSchemaFor(NoteSelector);
|
|
74
68
|
}
|
|
75
69
|
}
|
|
76
|
-
|
|
77
|
-
// For deserializing JSON.
|
|
78
|
-
TypeRegistry.register('NoteSelector', NoteSelector);
|
|
@@ -88,11 +88,11 @@ export class AvmAccumulatedData {
|
|
|
88
88
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
89
89
|
const reader = BufferReader.asReader(buffer);
|
|
90
90
|
return new this(
|
|
91
|
-
reader.
|
|
92
|
-
reader.
|
|
93
|
-
reader.
|
|
91
|
+
reader.readArray(MAX_NOTE_HASHES_PER_TX, Fr),
|
|
92
|
+
reader.readArray(MAX_NULLIFIERS_PER_TX, Fr),
|
|
93
|
+
reader.readArray(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
94
94
|
reader.readObject(FlatPublicLogs),
|
|
95
|
-
reader.
|
|
95
|
+
reader.readArray(MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, PublicDataWrite),
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -115,9 +115,9 @@ export class AvmAccumulatedData {
|
|
|
115
115
|
return new this(
|
|
116
116
|
reader.readFieldArray(MAX_NOTE_HASHES_PER_TX),
|
|
117
117
|
reader.readFieldArray(MAX_NULLIFIERS_PER_TX),
|
|
118
|
-
reader.
|
|
118
|
+
reader.readArray(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
119
119
|
reader.readObject(FlatPublicLogs),
|
|
120
|
-
reader.
|
|
120
|
+
reader.readArray(MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, PublicDataWrite),
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -143,8 +143,8 @@ export class AvmCircuitPublicInputs {
|
|
|
143
143
|
reader.readObject(AztecAddress),
|
|
144
144
|
reader.readObject(Fr),
|
|
145
145
|
reader.readObject(PublicCallRequestArrayLengths),
|
|
146
|
-
reader.
|
|
147
|
-
reader.
|
|
146
|
+
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
147
|
+
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
148
148
|
reader.readObject(PublicCallRequest),
|
|
149
149
|
reader.readObject(PrivateToAvmAccumulatedDataArrayLengths),
|
|
150
150
|
reader.readObject(PrivateToAvmAccumulatedDataArrayLengths),
|
|
@@ -206,8 +206,8 @@ export class AvmCircuitPublicInputs {
|
|
|
206
206
|
AztecAddress.fromFields(reader),
|
|
207
207
|
reader.readField(),
|
|
208
208
|
PublicCallRequestArrayLengths.fromFields(reader),
|
|
209
|
-
reader.
|
|
210
|
-
reader.
|
|
209
|
+
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
210
|
+
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
211
211
|
PublicCallRequest.fromFields(reader),
|
|
212
212
|
PrivateToAvmAccumulatedDataArrayLengths.fromFields(reader),
|
|
213
213
|
PrivateToAvmAccumulatedDataArrayLengths.fromFields(reader),
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
|
2
1
|
import { Fr, fromBuffer } from '@aztec/foundation/curves/bn254';
|
|
3
2
|
import { Point } from '@aztec/foundation/curves/grumpkin';
|
|
4
3
|
import { type ZodFor, bufferSchemaFor, hexSchemaFor } from '@aztec/foundation/schemas';
|
|
5
|
-
import { type BufferReader, FieldReader
|
|
4
|
+
import { type BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
6
5
|
import { hexToBuffer } from '@aztec/foundation/string';
|
|
7
6
|
|
|
8
7
|
import { inspect } from 'util';
|
|
9
8
|
import { z } from 'zod';
|
|
10
9
|
|
|
11
|
-
/** Branding to ensure fields are not interchangeable types. */
|
|
12
|
-
export interface AztecAddress {
|
|
13
|
-
/** Brand. */
|
|
14
|
-
_branding: 'AztecAddress';
|
|
15
|
-
}
|
|
16
10
|
/**
|
|
17
11
|
* AztecAddress represents a 32-byte address in the Aztec Protocol. It provides methods to create, manipulate, and
|
|
18
12
|
* compare addresses, as well as conversion to and from strings, buffers, and other formats.
|
|
@@ -23,6 +17,9 @@ export interface AztecAddress {
|
|
|
23
17
|
* wild.
|
|
24
18
|
*/
|
|
25
19
|
export class AztecAddress {
|
|
20
|
+
/** Branding for nominal typing. */
|
|
21
|
+
declare private readonly _branding: 'AztecAddress';
|
|
22
|
+
|
|
26
23
|
private xCoord: Fr;
|
|
27
24
|
|
|
28
25
|
constructor(buffer: Buffer | Fr) {
|
|
@@ -165,6 +162,3 @@ export class AztecAddress {
|
|
|
165
162
|
]);
|
|
166
163
|
}
|
|
167
164
|
}
|
|
168
|
-
|
|
169
|
-
// For deserializing JSON.
|
|
170
|
-
TypeRegistry.register('AztecAddress', AztecAddress);
|