@aztec/stdlib 0.0.1-commit.0dc957cde → 0.0.1-commit.0ec55a70b
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/avm/avm.d.ts +300 -300
- package/dest/block/attestation_info.d.ts +3 -2
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +7 -5
- package/dest/block/block_data.d.ts +290 -1
- package/dest/block/block_data.d.ts.map +1 -1
- package/dest/block/block_data.js +14 -0
- package/dest/block/block_parameter.d.ts +30 -3
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +36 -2
- package/dest/block/l2_block_source.d.ts +39 -4
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.d.ts +13 -6
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +26 -18
- package/dest/checkpoint/checkpoint_data.d.ts +7 -1
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_data.js +2 -0
- package/dest/config/chain-config.d.ts +2 -2
- package/dest/config/chain-config.d.ts.map +1 -1
- package/dest/config/chain-config.js +2 -2
- package/dest/config/sequencer-config.d.ts +5 -3
- package/dest/config/sequencer-config.d.ts.map +1 -1
- package/dest/config/sequencer-config.js +13 -6
- package/dest/ha-signing/local_config.d.ts +1 -1
- package/dest/ha-signing/local_config.d.ts.map +1 -1
- package/dest/ha-signing/local_config.js +2 -2
- package/dest/interfaces/archiver.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +7 -3
- package/dest/interfaces/aztec-node-admin.d.ts +14 -1
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +2 -1
- package/dest/interfaces/aztec-node.d.ts +45 -55
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +18 -16
- package/dest/interfaces/block_response.d.ts +156 -0
- package/dest/interfaces/block_response.d.ts.map +1 -0
- package/dest/interfaces/block_response.js +24 -0
- package/dest/interfaces/chain_tips.d.ts +304 -0
- package/dest/interfaces/chain_tips.d.ts.map +1 -0
- package/dest/interfaces/chain_tips.js +11 -0
- package/dest/interfaces/checkpoint_parameter.d.ts +27 -0
- package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
- package/dest/interfaces/checkpoint_parameter.js +20 -0
- package/dest/interfaces/checkpoint_response.d.ts +312 -0
- package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
- package/dest/interfaces/checkpoint_response.js +26 -0
- package/dest/interfaces/client.d.ts +6 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/client.js +5 -0
- package/dest/interfaces/configs.d.ts +12 -2
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +3 -1
- package/dest/interfaces/l1_publish_info.d.ts +43 -0
- package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
- package/dest/interfaces/l1_publish_info.js +26 -0
- package/dest/interfaces/proving-job.d.ts +166 -166
- package/dest/interfaces/server.d.ts +6 -1
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +5 -0
- package/dest/interfaces/validator.d.ts +14 -2
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -0
- package/dest/p2p/block_proposal.d.ts +19 -9
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +42 -32
- package/dest/p2p/checkpoint_attestation.d.ts +7 -3
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +15 -17
- package/dest/p2p/checkpoint_proposal.d.ts +15 -7
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +31 -29
- package/dest/p2p/consensus_payload.d.ts +18 -7
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +31 -19
- package/dest/p2p/signature_utils.d.ts +28 -19
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +118 -21
- package/dest/p2p/signed_txs.d.ts +15 -13
- package/dest/p2p/signed_txs.d.ts.map +1 -1
- package/dest/p2p/signed_txs.js +26 -24
- package/dest/parity/parity_base_private_inputs.d.ts +7 -3
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +7 -5
- package/dest/parity/parity_public_inputs.d.ts +7 -3
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.js +6 -3
- package/dest/tests/factories.d.ts +1 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +2 -2
- package/dest/tests/mocks.d.ts +7 -1
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +28 -14
- package/dest/timetable/index.d.ts +1 -1
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +25 -11
- package/dest/tx/profiling.js +4 -4
- package/package.json +8 -8
- package/src/block/attestation_info.ts +11 -11
- package/src/block/block_data.ts +17 -0
- package/src/block/block_parameter.ts +35 -2
- package/src/block/l2_block_source.ts +43 -3
- package/src/block/proposal/attestations_and_signers.ts +32 -17
- package/src/checkpoint/checkpoint_data.ts +4 -0
- package/src/config/chain-config.ts +2 -3
- package/src/config/sequencer-config.ts +25 -7
- package/src/ha-signing/local_config.ts +2 -2
- package/src/interfaces/archiver.ts +13 -3
- package/src/interfaces/aztec-node-admin.ts +3 -1
- package/src/interfaces/aztec-node.ts +105 -95
- package/src/interfaces/block_response.ts +79 -0
- package/src/interfaces/chain_tips.ts +24 -0
- package/src/interfaces/checkpoint_parameter.ts +22 -0
- package/src/interfaces/checkpoint_response.ts +84 -0
- package/src/interfaces/client.ts +5 -0
- package/src/interfaces/configs.ts +8 -1
- package/src/interfaces/l1_publish_info.ts +40 -0
- package/src/interfaces/server.ts +5 -0
- package/src/interfaces/validator.ts +7 -1
- package/src/p2p/block_proposal.ts +84 -28
- package/src/p2p/checkpoint_attestation.ts +15 -20
- package/src/p2p/checkpoint_proposal.ts +69 -37
- package/src/p2p/consensus_payload.ts +50 -28
- package/src/p2p/signature_utils.ts +110 -25
- package/src/p2p/signed_txs.ts +46 -28
- package/src/parity/parity_base_private_inputs.ts +10 -4
- package/src/parity/parity_public_inputs.ts +9 -2
- package/src/tests/factories.ts +6 -1
- package/src/tests/mocks.ts +46 -26
- package/src/timetable/index.ts +26 -11
- package/src/tx/profiling.ts +4 -4
package/src/tests/mocks.ts
CHANGED
|
@@ -14,8 +14,11 @@ import { padArrayEnd, times } from '@aztec/foundation/collection';
|
|
|
14
14
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
15
15
|
import { Secp256k1Signer } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
16
16
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
17
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
17
18
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
18
19
|
|
|
20
|
+
import { type TypedDataDefinition, hashTypedData } from 'viem';
|
|
21
|
+
|
|
19
22
|
import type { ContractArtifact } from '../abi/abi.js';
|
|
20
23
|
import { PublicTxEffect } from '../avm/avm.js';
|
|
21
24
|
import type { AvmAccumulatedData } from '../avm/avm_accumulated_data.js';
|
|
@@ -51,7 +54,7 @@ import { BlockProposal } from '../p2p/block_proposal.js';
|
|
|
51
54
|
import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
|
|
52
55
|
import { CheckpointProposal } from '../p2p/checkpoint_proposal.js';
|
|
53
56
|
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
54
|
-
import {
|
|
57
|
+
import { type CoordinationSignatureContext, getHashedSignaturePayloadTypedData } from '../p2p/signature_utils.js';
|
|
55
58
|
import { ChonkProof } from '../proofs/chonk_proof.js';
|
|
56
59
|
import { ProvingRequestType } from '../proofs/proving_request_type.js';
|
|
57
60
|
import { CheckpointHeader } from '../rollup/checkpoint_header.js';
|
|
@@ -86,6 +89,15 @@ import {
|
|
|
86
89
|
makePublicDataWrite,
|
|
87
90
|
} from './factories.js';
|
|
88
91
|
|
|
92
|
+
export const TEST_COORDINATION_SIGNATURE_CONTEXT: CoordinationSignatureContext = {
|
|
93
|
+
chainId: 31337,
|
|
94
|
+
rollupAddress: EthAddress.fromNumber(1),
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
function signTypedData(signer: Secp256k1Signer, typedData: TypedDataDefinition): Signature {
|
|
98
|
+
return signer.sign(Buffer32.fromString(hashTypedData(typedData)));
|
|
99
|
+
}
|
|
100
|
+
|
|
89
101
|
export const randomTxHash = (): TxHash => TxHash.random();
|
|
90
102
|
|
|
91
103
|
export const mockTx = async (
|
|
@@ -519,6 +531,7 @@ export interface MakeConsensusPayloadOptions {
|
|
|
519
531
|
txHashes?: TxHash[];
|
|
520
532
|
txs?: Tx[];
|
|
521
533
|
feeAssetPriceModifier?: bigint;
|
|
534
|
+
signatureContext?: CoordinationSignatureContext;
|
|
522
535
|
}
|
|
523
536
|
|
|
524
537
|
export interface MakeBlockProposalOptions {
|
|
@@ -529,6 +542,7 @@ export interface MakeBlockProposalOptions {
|
|
|
529
542
|
archiveRoot?: Fr;
|
|
530
543
|
txHashes?: TxHash[];
|
|
531
544
|
txs?: Tx[];
|
|
545
|
+
signatureContext?: CoordinationSignatureContext;
|
|
532
546
|
}
|
|
533
547
|
|
|
534
548
|
export interface MakeCheckpointProposalOptions {
|
|
@@ -536,6 +550,7 @@ export interface MakeCheckpointProposalOptions {
|
|
|
536
550
|
checkpointHeader?: CheckpointHeader;
|
|
537
551
|
archiveRoot?: Fr;
|
|
538
552
|
feeAssetPriceModifier?: bigint;
|
|
553
|
+
signatureContext?: CoordinationSignatureContext;
|
|
539
554
|
/** Options for the lastBlock - if undefined, no lastBlock is included */
|
|
540
555
|
lastBlock?: {
|
|
541
556
|
blockHeader?: BlockHeader;
|
|
@@ -546,10 +561,7 @@ export interface MakeCheckpointProposalOptions {
|
|
|
546
561
|
}
|
|
547
562
|
|
|
548
563
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
549
|
-
const makeAndSignConsensusPayload = (
|
|
550
|
-
domainSeparator: SignatureDomainSeparator,
|
|
551
|
-
options?: MakeConsensusPayloadOptions,
|
|
552
|
-
) => {
|
|
564
|
+
const makeAndSignConsensusPayload = (options?: MakeConsensusPayloadOptions) => {
|
|
553
565
|
const header = options?.header ?? makeCheckpointHeader(1);
|
|
554
566
|
const { signer = Secp256k1Signer.random(), archive = Fr.random(), feeAssetPriceModifier = 0n } = options ?? {};
|
|
555
567
|
|
|
@@ -557,9 +569,10 @@ const makeAndSignConsensusPayload = (
|
|
|
557
569
|
header,
|
|
558
570
|
archive,
|
|
559
571
|
feeAssetPriceModifier,
|
|
572
|
+
signatureContext: TEST_COORDINATION_SIGNATURE_CONTEXT,
|
|
560
573
|
});
|
|
561
574
|
|
|
562
|
-
const hash =
|
|
575
|
+
const hash = getHashedSignaturePayloadTypedData(payload);
|
|
563
576
|
const signature = signer.sign(hash);
|
|
564
577
|
|
|
565
578
|
return { blockNumber: header.slotNumber, payload, signature };
|
|
@@ -569,10 +582,7 @@ export const makeAndSignCommitteeAttestationsAndSigners = (
|
|
|
569
582
|
attestationsAndSigners: CommitteeAttestationsAndSigners,
|
|
570
583
|
signer: Secp256k1Signer = Secp256k1Signer.random(),
|
|
571
584
|
) => {
|
|
572
|
-
const hash =
|
|
573
|
-
attestationsAndSigners,
|
|
574
|
-
SignatureDomainSeparator.attestationsAndSigners,
|
|
575
|
-
);
|
|
585
|
+
const hash = getHashedSignaturePayloadTypedData(attestationsAndSigners);
|
|
576
586
|
return signer.sign(hash);
|
|
577
587
|
};
|
|
578
588
|
|
|
@@ -584,6 +594,7 @@ export const makeBlockProposal = (options?: MakeBlockProposalOptions): Promise<B
|
|
|
584
594
|
const txHashes = options?.txHashes ?? [0, 1, 2, 3, 4, 5].map(() => TxHash.random());
|
|
585
595
|
const txs = options?.txs;
|
|
586
596
|
const signer = options?.signer ?? Secp256k1Signer.random();
|
|
597
|
+
const signatureContext = options?.signatureContext ?? TEST_COORDINATION_SIGNATURE_CONTEXT;
|
|
587
598
|
|
|
588
599
|
return BlockProposal.createProposalFromSigner(
|
|
589
600
|
blockHeader,
|
|
@@ -593,7 +604,9 @@ export const makeBlockProposal = (options?: MakeBlockProposalOptions): Promise<B
|
|
|
593
604
|
archiveRoot,
|
|
594
605
|
txHashes,
|
|
595
606
|
txs,
|
|
596
|
-
|
|
607
|
+
signatureContext,
|
|
608
|
+
(typedData, _context) => Promise.resolve(signTypedData(signer, typedData)),
|
|
609
|
+
(typedData, _context) => Promise.resolve(signTypedData(signer, typedData)),
|
|
597
610
|
);
|
|
598
611
|
};
|
|
599
612
|
|
|
@@ -602,6 +615,7 @@ export const makeCheckpointProposal = async (options?: MakeCheckpointProposalOpt
|
|
|
602
615
|
const archiveRoot = options?.archiveRoot ?? Fr.random();
|
|
603
616
|
const feeAssetPriceModifier = options?.feeAssetPriceModifier ?? 0n;
|
|
604
617
|
const signer = options?.signer ?? Secp256k1Signer.random();
|
|
618
|
+
const signatureContext = options?.signatureContext ?? TEST_COORDINATION_SIGNATURE_CONTEXT;
|
|
605
619
|
|
|
606
620
|
// Build a signed block proposal if lastBlock options are provided
|
|
607
621
|
const lastBlockProposal = options?.lastBlock
|
|
@@ -613,6 +627,7 @@ export const makeCheckpointProposal = async (options?: MakeCheckpointProposalOpt
|
|
|
613
627
|
txHashes: options.lastBlock.txHashes,
|
|
614
628
|
txs: options.lastBlock.txs,
|
|
615
629
|
signer,
|
|
630
|
+
signatureContext,
|
|
616
631
|
})
|
|
617
632
|
: undefined;
|
|
618
633
|
|
|
@@ -622,7 +637,8 @@ export const makeCheckpointProposal = async (options?: MakeCheckpointProposalOpt
|
|
|
622
637
|
CheckpointNumber(1),
|
|
623
638
|
feeAssetPriceModifier,
|
|
624
639
|
lastBlockProposal,
|
|
625
|
-
|
|
640
|
+
signatureContext,
|
|
641
|
+
typedData => Promise.resolve(signTypedData(signer, typedData)),
|
|
626
642
|
);
|
|
627
643
|
};
|
|
628
644
|
|
|
@@ -636,6 +652,7 @@ export type MakeCheckpointAttestationOptions = {
|
|
|
636
652
|
attesterSigner?: Secp256k1Signer;
|
|
637
653
|
proposerSigner?: Secp256k1Signer;
|
|
638
654
|
signer?: Secp256k1Signer;
|
|
655
|
+
signatureContext?: CoordinationSignatureContext;
|
|
639
656
|
};
|
|
640
657
|
|
|
641
658
|
/**
|
|
@@ -645,26 +662,27 @@ export const makeCheckpointAttestation = (options: MakeCheckpointAttestationOpti
|
|
|
645
662
|
const header = options.header ?? makeCheckpointHeader(1);
|
|
646
663
|
const archive = options.archive ?? Fr.random();
|
|
647
664
|
const feeAssetPriceModifier = options.feeAssetPriceModifier ?? 0n;
|
|
665
|
+
const signatureContext = options.signatureContext ?? TEST_COORDINATION_SIGNATURE_CONTEXT;
|
|
648
666
|
const { signer, attesterSigner = signer, proposerSigner = signer } = options;
|
|
649
667
|
|
|
650
|
-
const payload = new ConsensusPayload(header, archive, feeAssetPriceModifier);
|
|
668
|
+
const payload = new ConsensusPayload(header, archive, feeAssetPriceModifier, signatureContext);
|
|
651
669
|
|
|
652
670
|
// Sign as attester
|
|
653
|
-
const attestationHash =
|
|
654
|
-
payload,
|
|
655
|
-
SignatureDomainSeparator.checkpointAttestation,
|
|
656
|
-
);
|
|
671
|
+
const attestationHash = getHashedSignaturePayloadTypedData(payload);
|
|
657
672
|
const attestationSigner = attesterSigner ?? Secp256k1Signer.random();
|
|
658
673
|
const attestationSignature = attestationSigner.sign(attestationHash);
|
|
659
674
|
|
|
660
675
|
// Sign as proposer - use CheckpointProposal's payload format (serializeToBuffer)
|
|
661
676
|
// This is different from ConsensusPayload's format (ABI encoding)
|
|
662
677
|
const proposalSignerToUse = proposerSigner ?? Secp256k1Signer.random();
|
|
663
|
-
const tempProposal = new CheckpointProposal(
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
678
|
+
const tempProposal = new CheckpointProposal(
|
|
679
|
+
header,
|
|
680
|
+
archive,
|
|
681
|
+
feeAssetPriceModifier,
|
|
682
|
+
Signature.empty(),
|
|
683
|
+
signatureContext,
|
|
667
684
|
);
|
|
685
|
+
const proposalHash = getHashedSignaturePayloadTypedData(tempProposal);
|
|
668
686
|
const proposerSignature = proposalSignerToUse.sign(proposalHash);
|
|
669
687
|
|
|
670
688
|
return new CheckpointAttestation(payload, attestationSignature, proposerSignature);
|
|
@@ -677,13 +695,15 @@ export const makeCheckpointAttestationFromProposal = (
|
|
|
677
695
|
proposal: CheckpointProposal,
|
|
678
696
|
attesterSigner?: Secp256k1Signer,
|
|
679
697
|
): CheckpointAttestation => {
|
|
680
|
-
const payload = new ConsensusPayload(
|
|
698
|
+
const payload = new ConsensusPayload(
|
|
699
|
+
proposal.checkpointHeader,
|
|
700
|
+
proposal.archive,
|
|
701
|
+
proposal.feeAssetPriceModifier,
|
|
702
|
+
proposal.signatureContext,
|
|
703
|
+
);
|
|
681
704
|
|
|
682
705
|
// Sign as attester
|
|
683
|
-
const attestationHash =
|
|
684
|
-
payload,
|
|
685
|
-
SignatureDomainSeparator.checkpointAttestation,
|
|
686
|
-
);
|
|
706
|
+
const attestationHash = getHashedSignaturePayloadTypedData(payload);
|
|
687
707
|
const attestationSigner = attesterSigner ?? Secp256k1Signer.random();
|
|
688
708
|
const attestationSignature = attestationSigner.sign(attestationHash);
|
|
689
709
|
|
package/src/timetable/index.ts
CHANGED
|
@@ -162,23 +162,39 @@ class StandardCheckpointTimingModel extends BaseCheckpointTiming {
|
|
|
162
162
|
/**
|
|
163
163
|
* Checkpoint timing model for proposer pipelining.
|
|
164
164
|
*
|
|
165
|
-
* In this mode, the build work
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
165
|
+
* In this mode, the build work starts at the wall-clock slot boundary and the
|
|
166
|
+
* checkpoint proposal is broadcast early enough that attestations complete by
|
|
167
|
+
* the end of the build slot. L1 submission can then be sent at the boundary of
|
|
168
|
+
* the target slot. The extra target-slot window getters are intended for
|
|
169
|
+
* consumers such as P2P validators that need to validate pipelined messages
|
|
170
|
+
* against wallclock time.
|
|
169
171
|
*/
|
|
170
172
|
class PipelinedCheckpointTimingModel extends BaseCheckpointTiming implements PipelinedCheckpointTiming {
|
|
171
173
|
public get proposalWindowIntoTargetSlot(): number {
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
+
// Proposals no longer spill into the target slot: they are broadcast early
|
|
175
|
+
// enough in the build slot that attestations complete before the boundary.
|
|
176
|
+
// Any residual tolerance into the target slot is covered by clock disparity.
|
|
177
|
+
return 0;
|
|
174
178
|
}
|
|
175
179
|
|
|
176
180
|
public get attestationWindowIntoTargetSlot(): number {
|
|
177
|
-
|
|
181
|
+
// Straggler grace: attestations aim to complete by build-slot end. Allow a
|
|
182
|
+
// small window into the target slot for late arrivals (round-trip p2p).
|
|
183
|
+
return 2 * this.p2pPropagationTime;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
public override get pipeliningAttestationGracePeriod(): number {
|
|
187
|
+
// Under the early-pipelining regime attestations complete inside the build
|
|
188
|
+
// slot itself, so there is no extra grace into the target slot.
|
|
189
|
+
return 0;
|
|
178
190
|
}
|
|
179
191
|
|
|
180
192
|
public get timeReservedAtEnd(): number {
|
|
181
|
-
|
|
193
|
+
// Reserve enough time at the end of the build slot for:
|
|
194
|
+
// - assembling and broadcasting the checkpoint proposal
|
|
195
|
+
// - round-trip p2p propagation (proposal out, attestations back)
|
|
196
|
+
// - validators re-executing the last block
|
|
197
|
+
return this.checkpointAssembleTime + 2 * this.p2pPropagationTime + (this.blockDuration ?? 0);
|
|
182
198
|
}
|
|
183
199
|
|
|
184
200
|
public get minimumBuildSlotWork(): number {
|
|
@@ -186,9 +202,8 @@ class PipelinedCheckpointTimingModel extends BaseCheckpointTiming implements Pip
|
|
|
186
202
|
}
|
|
187
203
|
|
|
188
204
|
public get checkpointAssemblyDeadline(): number {
|
|
189
|
-
// Allow enough time to
|
|
190
|
-
//
|
|
191
|
-
// - receive attestations
|
|
205
|
+
// Allow enough time to build all blocks and receive attestations. With
|
|
206
|
+
// `pipeliningAttestationGracePeriod = 0` this equals `aztecSlotDuration`.
|
|
192
207
|
return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
|
|
193
208
|
}
|
|
194
209
|
|
package/src/tx/profiling.ts
CHANGED
|
@@ -133,12 +133,12 @@ export class TxProfileResult {
|
|
|
133
133
|
],
|
|
134
134
|
{
|
|
135
135
|
nodeRPCCalls: {
|
|
136
|
-
perMethod: {
|
|
136
|
+
perMethod: { getBlock: { times: [1] } },
|
|
137
137
|
roundTrips: {
|
|
138
138
|
roundTrips: 1,
|
|
139
139
|
totalBlockingTime: 1,
|
|
140
140
|
roundTripDurations: [1],
|
|
141
|
-
roundTripMethods: [['
|
|
141
|
+
roundTripMethods: [['getBlock']],
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
144
|
timings: {
|
|
@@ -184,12 +184,12 @@ export class UtilityExecutionResult {
|
|
|
184
184
|
static random(): UtilityExecutionResult {
|
|
185
185
|
return new UtilityExecutionResult([Fr.random()], [], 0n, {
|
|
186
186
|
nodeRPCCalls: {
|
|
187
|
-
perMethod: {
|
|
187
|
+
perMethod: { getBlock: { times: [1] } },
|
|
188
188
|
roundTrips: {
|
|
189
189
|
roundTrips: 1,
|
|
190
190
|
totalBlockingTime: 1,
|
|
191
191
|
roundTripDurations: [1],
|
|
192
|
-
roundTripMethods: [['
|
|
192
|
+
roundTripMethods: [['getBlock']],
|
|
193
193
|
},
|
|
194
194
|
},
|
|
195
195
|
timings: {
|