@aztec/aztec-node 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/aztec-node/block_response_helpers.d.ts +21 -0
- package/dest/aztec-node/block_response_helpers.d.ts.map +1 -0
- package/dest/aztec-node/block_response_helpers.js +88 -0
- package/dest/aztec-node/server.d.ts +21 -53
- package/dest/aztec-node/server.d.ts.map +1 -1
- package/dest/aztec-node/server.js +312 -117
- package/dest/sentinel/factory.d.ts +3 -2
- package/dest/sentinel/factory.d.ts.map +1 -1
- package/dest/sentinel/sentinel.d.ts +6 -3
- package/dest/sentinel/sentinel.d.ts.map +1 -1
- package/dest/sentinel/sentinel.js +7 -1
- package/package.json +26 -26
- package/src/aztec-node/block_response_helpers.ts +131 -0
- package/src/aztec-node/server.ts +342 -146
- package/src/sentinel/factory.ts +2 -1
- package/src/sentinel/sentinel.ts +17 -5
|
@@ -402,7 +402,7 @@ import { PublicProcessorFactory } from '@aztec/simulator/server';
|
|
|
402
402
|
import { AttestationsBlockWatcher, EpochPruneWatcher, createSlasher } from '@aztec/slasher';
|
|
403
403
|
import { CollectionLimitsConfig, PublicSimulatorConfig } from '@aztec/stdlib/avm';
|
|
404
404
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
405
|
-
import { BlockHash, L2Block } from '@aztec/stdlib/block';
|
|
405
|
+
import { BlockHash, L2Block, inspectBlockParameter } from '@aztec/stdlib/block';
|
|
406
406
|
import { GasFees } from '@aztec/stdlib/gas';
|
|
407
407
|
import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
|
|
408
408
|
import { AztecNodeAdminConfigSchema } from '@aztec/stdlib/interfaces/client';
|
|
@@ -417,6 +417,7 @@ import { FullNodeCheckpointsBuilder as CheckpointsBuilder, FullNodeCheckpointsBu
|
|
|
417
417
|
import { createWorldStateSynchronizer } from '@aztec/world-state';
|
|
418
418
|
import { createPublicClient } from 'viem';
|
|
419
419
|
import { createSentinel } from '../sentinel/factory.js';
|
|
420
|
+
import { blockResponseFromBlockData, blockResponseFromL2Block, checkpointResponseFromCheckpointData, checkpointResponseFromPublishedCheckpoint } from './block_response_helpers.js';
|
|
420
421
|
import { createKeyStoreForValidator } from './config.js';
|
|
421
422
|
import { NodeMetrics } from './node_metrics.js';
|
|
422
423
|
_dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
@@ -437,6 +438,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
437
438
|
slasherClient;
|
|
438
439
|
validatorsSentinel;
|
|
439
440
|
epochPruneWatcher;
|
|
441
|
+
attestationsBlockWatcher;
|
|
440
442
|
l1ChainId;
|
|
441
443
|
version;
|
|
442
444
|
globalVariableBuilder;
|
|
@@ -465,7 +467,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
465
467
|
// Prevent two snapshot operations to happen simultaneously
|
|
466
468
|
isUploadingSnapshot;
|
|
467
469
|
tracer;
|
|
468
|
-
constructor(config, p2pClient, blockSource, logsSource, contractDataSource, l1ToL2MessageSource, worldStateSynchronizer, sequencer, proverNode, slasherClient, validatorsSentinel, epochPruneWatcher, l1ChainId, version, globalVariableBuilder, feeProvider, epochCache, packageVersion, peerProofVerifier, rpcProofVerifier, telemetry = getTelemetryClient(), log = createLogger('node'), blobClient, validatorClient, keyStoreManager, debugLogStore = new NullDebugLogStore()){
|
|
470
|
+
constructor(config, p2pClient, blockSource, logsSource, contractDataSource, l1ToL2MessageSource, worldStateSynchronizer, sequencer, proverNode, slasherClient, validatorsSentinel, epochPruneWatcher, attestationsBlockWatcher, l1ChainId, version, globalVariableBuilder, feeProvider, epochCache, packageVersion, peerProofVerifier, rpcProofVerifier, telemetry = getTelemetryClient(), log = createLogger('node'), blobClient, validatorClient, keyStoreManager, debugLogStore = new NullDebugLogStore()){
|
|
469
471
|
this.config = config;
|
|
470
472
|
this.p2pClient = p2pClient;
|
|
471
473
|
this.blockSource = blockSource;
|
|
@@ -478,6 +480,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
478
480
|
this.slasherClient = slasherClient;
|
|
479
481
|
this.validatorsSentinel = validatorsSentinel;
|
|
480
482
|
this.epochPruneWatcher = epochPruneWatcher;
|
|
483
|
+
this.attestationsBlockWatcher = attestationsBlockWatcher;
|
|
481
484
|
this.l1ChainId = l1ChainId;
|
|
482
485
|
this.version = version;
|
|
483
486
|
this.globalVariableBuilder = globalVariableBuilder;
|
|
@@ -512,9 +515,273 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
512
515
|
const status = await this.worldStateSynchronizer.status();
|
|
513
516
|
return status.syncSummary;
|
|
514
517
|
}
|
|
518
|
+
async getChainTips() {
|
|
519
|
+
const { proposed, checkpointed, proven, finalized } = await this.blockSource.getL2Tips();
|
|
520
|
+
return {
|
|
521
|
+
proposed,
|
|
522
|
+
checkpointed,
|
|
523
|
+
proven,
|
|
524
|
+
finalized
|
|
525
|
+
};
|
|
526
|
+
}
|
|
515
527
|
getL2Tips() {
|
|
516
528
|
return this.blockSource.getL2Tips();
|
|
517
529
|
}
|
|
530
|
+
async getBlockHeader(number) {
|
|
531
|
+
const resolvedNumber = number === 'latest' ? await this.blockSource.getBlockNumber() : number;
|
|
532
|
+
if (resolvedNumber === BlockNumber.ZERO) {
|
|
533
|
+
return this.worldStateSynchronizer.getCommitted().getInitialHeader();
|
|
534
|
+
}
|
|
535
|
+
return this.blockSource.getBlockHeader(resolvedNumber);
|
|
536
|
+
}
|
|
537
|
+
async getCheckpointedBlocks(from, limit) {
|
|
538
|
+
return await this.blockSource.getCheckpointedBlocks(from, limit) ?? [];
|
|
539
|
+
}
|
|
540
|
+
getCheckpointsDataForEpoch(epoch) {
|
|
541
|
+
return this.blockSource.getCheckpointsDataForEpoch(epoch);
|
|
542
|
+
}
|
|
543
|
+
getBlockNumber(tip) {
|
|
544
|
+
switch(tip){
|
|
545
|
+
case undefined:
|
|
546
|
+
case 'proposed':
|
|
547
|
+
return this.blockSource.getBlockNumber();
|
|
548
|
+
case 'checkpointed':
|
|
549
|
+
return this.blockSource.getCheckpointedL2BlockNumber();
|
|
550
|
+
case 'proven':
|
|
551
|
+
return this.blockSource.getProvenBlockNumber();
|
|
552
|
+
case 'finalized':
|
|
553
|
+
return this.blockSource.getFinalizedL2BlockNumber();
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
async getCheckpointNumber(tip) {
|
|
557
|
+
switch(tip){
|
|
558
|
+
case undefined:
|
|
559
|
+
case 'proposed':
|
|
560
|
+
case 'checkpointed':
|
|
561
|
+
return await this.blockSource.getCheckpointNumber();
|
|
562
|
+
case 'proven':
|
|
563
|
+
case 'finalized':
|
|
564
|
+
{
|
|
565
|
+
const tips = await this.blockSource.getL2Tips();
|
|
566
|
+
return tip === 'proven' ? tips.proven.checkpoint.number : tips.finalized.checkpoint.number;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
isChainTip(value) {
|
|
571
|
+
return value === 'proposed' || value === 'checkpointed' || value === 'proven' || value === 'finalized';
|
|
572
|
+
}
|
|
573
|
+
async resolveBlockParameter(param) {
|
|
574
|
+
if (BlockHash.isBlockHash(param)) {
|
|
575
|
+
return {
|
|
576
|
+
hash: param
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
if (typeof param === 'number') {
|
|
580
|
+
return {
|
|
581
|
+
number: param
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
if (param === 'latest') {
|
|
585
|
+
return {
|
|
586
|
+
number: await this.blockSource.getBlockNumber()
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
if (this.isChainTip(param)) {
|
|
590
|
+
return {
|
|
591
|
+
number: await this.getBlockNumber(param)
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
if (typeof param === 'object' && param !== null) {
|
|
595
|
+
if ('number' in param) {
|
|
596
|
+
return {
|
|
597
|
+
number: param.number
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
if ('hash' in param) {
|
|
601
|
+
return {
|
|
602
|
+
hash: param.hash
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
if ('archive' in param) {
|
|
606
|
+
return {
|
|
607
|
+
archive: param.archive
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
throw new BadRequestError(`Invalid BlockParameter: ${JSON.stringify(param)}`);
|
|
612
|
+
}
|
|
613
|
+
async resolveCheckpointParameter(param) {
|
|
614
|
+
if (typeof param === 'number') {
|
|
615
|
+
return {
|
|
616
|
+
number: param
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
if (param === 'latest') {
|
|
620
|
+
return {
|
|
621
|
+
number: await this.blockSource.getCheckpointNumber()
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
if (this.isChainTip(param)) {
|
|
625
|
+
return {
|
|
626
|
+
number: await this.getCheckpointNumber(param)
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
if (typeof param === 'object' && param !== null) {
|
|
630
|
+
if ('number' in param) {
|
|
631
|
+
return {
|
|
632
|
+
number: param.number
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
if ('slot' in param) {
|
|
636
|
+
return {
|
|
637
|
+
slot: param.slot
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
throw new BadRequestError(`Invalid CheckpointParameter: ${JSON.stringify(param)}`);
|
|
642
|
+
}
|
|
643
|
+
async getBlock(param, options = {}) {
|
|
644
|
+
const resolved = await this.resolveBlockParameter(param);
|
|
645
|
+
const wantTxs = !!options.includeTransactions;
|
|
646
|
+
const wantContext = !!options.includeL1PublishInfo || !!options.includeAttestations;
|
|
647
|
+
if (resolved.hash !== undefined) {
|
|
648
|
+
const initial = await this.#getInitialHeaderHash();
|
|
649
|
+
if (resolved.hash.equals(initial)) {
|
|
650
|
+
return await this.buildGenesisBlockResponse(options);
|
|
651
|
+
}
|
|
652
|
+
if (wantTxs) {
|
|
653
|
+
const block = await this.blockSource.getL2BlockByHash(resolved.hash);
|
|
654
|
+
if (!block) {
|
|
655
|
+
return undefined;
|
|
656
|
+
}
|
|
657
|
+
const ctx = wantContext ? await this.blockSource.getBlockDataWithCheckpointContext(block.number) : undefined;
|
|
658
|
+
return await blockResponseFromL2Block(block, options, ctx);
|
|
659
|
+
}
|
|
660
|
+
const data = await this.blockSource.getBlockHeaderByHash(resolved.hash);
|
|
661
|
+
if (!data) {
|
|
662
|
+
return undefined;
|
|
663
|
+
}
|
|
664
|
+
const blockNumber = data.globalVariables.blockNumber;
|
|
665
|
+
const ctx = wantContext ? await this.blockSource.getBlockDataWithCheckpointContext(blockNumber) : undefined;
|
|
666
|
+
if (ctx) {
|
|
667
|
+
return blockResponseFromBlockData(ctx.data, blockNumber, options, ctx);
|
|
668
|
+
}
|
|
669
|
+
const blockData = await this.blockSource.getBlockData(blockNumber);
|
|
670
|
+
if (!blockData) {
|
|
671
|
+
return undefined;
|
|
672
|
+
}
|
|
673
|
+
return blockResponseFromBlockData(blockData, blockNumber, options);
|
|
674
|
+
}
|
|
675
|
+
if (resolved.archive !== undefined) {
|
|
676
|
+
if (wantTxs) {
|
|
677
|
+
const block = await this.blockSource.getL2BlockByArchive(resolved.archive);
|
|
678
|
+
if (!block) {
|
|
679
|
+
return undefined;
|
|
680
|
+
}
|
|
681
|
+
const ctx = wantContext ? await this.blockSource.getBlockDataWithCheckpointContext(block.number) : undefined;
|
|
682
|
+
return await blockResponseFromL2Block(block, options, ctx);
|
|
683
|
+
}
|
|
684
|
+
const data = await this.blockSource.getBlockDataByArchive(resolved.archive);
|
|
685
|
+
if (!data) {
|
|
686
|
+
return undefined;
|
|
687
|
+
}
|
|
688
|
+
const blockNumber = data.header.globalVariables.blockNumber;
|
|
689
|
+
const ctx = wantContext ? await this.blockSource.getBlockDataWithCheckpointContext(blockNumber) : undefined;
|
|
690
|
+
return blockResponseFromBlockData(data, blockNumber, options, ctx);
|
|
691
|
+
}
|
|
692
|
+
const blockNumber = resolved.number;
|
|
693
|
+
if (blockNumber === BlockNumber.ZERO) {
|
|
694
|
+
return await this.buildGenesisBlockResponse(options);
|
|
695
|
+
}
|
|
696
|
+
if (wantTxs) {
|
|
697
|
+
const block = await this.blockSource.getL2Block(blockNumber);
|
|
698
|
+
if (!block) {
|
|
699
|
+
return undefined;
|
|
700
|
+
}
|
|
701
|
+
const ctx = wantContext ? await this.blockSource.getBlockDataWithCheckpointContext(blockNumber) : undefined;
|
|
702
|
+
return await blockResponseFromL2Block(block, options, ctx);
|
|
703
|
+
}
|
|
704
|
+
const ctx = await this.blockSource.getBlockDataWithCheckpointContext(blockNumber);
|
|
705
|
+
if (!ctx) {
|
|
706
|
+
return undefined;
|
|
707
|
+
}
|
|
708
|
+
return blockResponseFromBlockData(ctx.data, blockNumber, options, ctx);
|
|
709
|
+
}
|
|
710
|
+
async getBlocks(from, limit, options = {}) {
|
|
711
|
+
const wantTxs = !!options.includeTransactions;
|
|
712
|
+
const wantContext = !!options.includeL1PublishInfo || !!options.includeAttestations;
|
|
713
|
+
if (wantTxs) {
|
|
714
|
+
const blocks = await this.blockSource.getBlocks(from, limit);
|
|
715
|
+
return await Promise.all(blocks.map(async (block)=>{
|
|
716
|
+
const ctx = wantContext ? await this.blockSource.getBlockDataWithCheckpointContext(block.number) : undefined;
|
|
717
|
+
return blockResponseFromL2Block(block, options, ctx);
|
|
718
|
+
}));
|
|
719
|
+
}
|
|
720
|
+
const results = [];
|
|
721
|
+
for(let i = 0; i < limit; i++){
|
|
722
|
+
const blockNumber = BlockNumber(from + i);
|
|
723
|
+
const ctx = await this.blockSource.getBlockDataWithCheckpointContext(blockNumber);
|
|
724
|
+
if (!ctx) {
|
|
725
|
+
break;
|
|
726
|
+
}
|
|
727
|
+
results.push(blockResponseFromBlockData(ctx.data, blockNumber, options, ctx));
|
|
728
|
+
}
|
|
729
|
+
return results;
|
|
730
|
+
}
|
|
731
|
+
async getCheckpoint(param, options = {}) {
|
|
732
|
+
const resolved = await this.resolveCheckpointParameter(param);
|
|
733
|
+
let checkpointNumber = resolved.number;
|
|
734
|
+
if (checkpointNumber === undefined && resolved.slot !== undefined) {
|
|
735
|
+
checkpointNumber = await this.blockSource.getCheckpointNumberBySlot(resolved.slot);
|
|
736
|
+
}
|
|
737
|
+
if (checkpointNumber === undefined) {
|
|
738
|
+
return undefined;
|
|
739
|
+
}
|
|
740
|
+
if (options.includeBlocks) {
|
|
741
|
+
const [checkpoint] = await this.blockSource.getCheckpoints(checkpointNumber, 1);
|
|
742
|
+
if (!checkpoint) {
|
|
743
|
+
return undefined;
|
|
744
|
+
}
|
|
745
|
+
return await checkpointResponseFromPublishedCheckpoint(checkpoint, options);
|
|
746
|
+
}
|
|
747
|
+
const data = await this.blockSource.getCheckpointData(checkpointNumber);
|
|
748
|
+
if (!data) {
|
|
749
|
+
return undefined;
|
|
750
|
+
}
|
|
751
|
+
return checkpointResponseFromCheckpointData(data, options);
|
|
752
|
+
}
|
|
753
|
+
async getCheckpoints(from, limit, options = {}) {
|
|
754
|
+
if (options.includeBlocks) {
|
|
755
|
+
const checkpoints = await this.blockSource.getCheckpoints(from, limit);
|
|
756
|
+
return await Promise.all(checkpoints.map((cp)=>checkpointResponseFromPublishedCheckpoint(cp, options)));
|
|
757
|
+
}
|
|
758
|
+
const datas = await this.blockSource.getCheckpointDataRange(from, limit);
|
|
759
|
+
return datas.map((d)=>checkpointResponseFromCheckpointData(d, options));
|
|
760
|
+
}
|
|
761
|
+
async buildGenesisBlockResponse(options) {
|
|
762
|
+
const initial = this.worldStateSynchronizer.getCommitted().getInitialHeader();
|
|
763
|
+
const empty = L2Block.empty(initial);
|
|
764
|
+
const response = {
|
|
765
|
+
header: empty.header,
|
|
766
|
+
archive: empty.archive,
|
|
767
|
+
hash: await this.#getInitialHeaderHash(),
|
|
768
|
+
checkpointNumber: empty.checkpointNumber,
|
|
769
|
+
indexWithinCheckpoint: empty.indexWithinCheckpoint,
|
|
770
|
+
number: empty.number
|
|
771
|
+
};
|
|
772
|
+
if (options.includeTransactions) {
|
|
773
|
+
response.body = empty.body;
|
|
774
|
+
}
|
|
775
|
+
if (options.includeL1PublishInfo) {
|
|
776
|
+
response.l1 = {
|
|
777
|
+
published: false
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
if (options.includeAttestations) {
|
|
781
|
+
response.attestations = [];
|
|
782
|
+
}
|
|
783
|
+
return response;
|
|
784
|
+
}
|
|
518
785
|
/**
|
|
519
786
|
* initializes the Aztec Node, wait for component to sync.
|
|
520
787
|
* @param config - The configuration to be used by the aztec node.
|
|
@@ -659,7 +926,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
659
926
|
maxTxsPerCheckpoint: config.validateMaxTxsPerCheckpoint
|
|
660
927
|
}, worldStateSynchronizer, archiver, dateProvider, telemetry);
|
|
661
928
|
let validatorClient;
|
|
662
|
-
if (!
|
|
929
|
+
if (!config.disableValidator) {
|
|
663
930
|
// Create validator client if required
|
|
664
931
|
validatorClient = await createValidatorClient(config, {
|
|
665
932
|
checkpointsBuilder: validatorCheckpointsBuilder,
|
|
@@ -730,9 +997,18 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
730
997
|
}
|
|
731
998
|
// Start p2p-related services once the archiver has completed sync
|
|
732
999
|
void archiver.waitForInitialSync().then(async ()=>{
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
1000
|
+
if (validatorsSentinel) {
|
|
1001
|
+
await validatorsSentinel.start();
|
|
1002
|
+
started.push(validatorsSentinel);
|
|
1003
|
+
}
|
|
1004
|
+
if (epochPruneWatcher) {
|
|
1005
|
+
await epochPruneWatcher.start();
|
|
1006
|
+
started.push(epochPruneWatcher);
|
|
1007
|
+
}
|
|
1008
|
+
if (attestationsBlockWatcher) {
|
|
1009
|
+
await attestationsBlockWatcher.start();
|
|
1010
|
+
started.push(attestationsBlockWatcher);
|
|
1011
|
+
}
|
|
736
1012
|
log.info(`All p2p services started`);
|
|
737
1013
|
}).catch((err)=>log.error('Failed to start p2p services after archiver sync', err));
|
|
738
1014
|
// Validator enabled, create/start relevant service
|
|
@@ -833,7 +1109,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
833
1109
|
log.info(`Prover node subsystem created but not started`);
|
|
834
1110
|
}
|
|
835
1111
|
}
|
|
836
|
-
const node = new AztecNodeService(config, p2pClient, archiver, archiver, archiver, archiver, worldStateSynchronizer, sequencer, proverNode, slasherClient, validatorsSentinel, epochPruneWatcher, ethereumChain.chainInfo.id, config.rollupVersion, globalVariableBuilder, feeProvider, epochCache, packageVersion, peerProofVerifier, rpcProofVerifier, telemetry, log, blobClient, validatorClient, keyStoreManager, debugLogStore);
|
|
1112
|
+
const node = new AztecNodeService(config, p2pClient, archiver, archiver, archiver, archiver, worldStateSynchronizer, sequencer, proverNode, slasherClient, validatorsSentinel, epochPruneWatcher, attestationsBlockWatcher, ethereumChain.chainInfo.id, config.rollupVersion, globalVariableBuilder, feeProvider, epochCache, packageVersion, peerProofVerifier, rpcProofVerifier, telemetry, log, blobClient, validatorClient, keyStoreManager, debugLogStore);
|
|
837
1113
|
return node;
|
|
838
1114
|
} catch (err) {
|
|
839
1115
|
log.error('Failed during node creation, stopping started resources', err);
|
|
@@ -902,59 +1178,6 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
902
1178
|
};
|
|
903
1179
|
return nodeInfo;
|
|
904
1180
|
}
|
|
905
|
-
/**
|
|
906
|
-
* Get a block specified by its block number, block hash, or 'latest'.
|
|
907
|
-
* @param block - The block parameter (block number, block hash, or 'latest').
|
|
908
|
-
* @returns The requested block.
|
|
909
|
-
*/ async getBlock(block) {
|
|
910
|
-
if (BlockHash.isBlockHash(block)) {
|
|
911
|
-
return this.getBlockByHash(block);
|
|
912
|
-
}
|
|
913
|
-
const blockNumber = block === 'latest' ? await this.getBlockNumber() : block;
|
|
914
|
-
if (blockNumber === BlockNumber.ZERO) {
|
|
915
|
-
return this.buildInitialBlock();
|
|
916
|
-
}
|
|
917
|
-
return await this.blockSource.getL2Block(blockNumber);
|
|
918
|
-
}
|
|
919
|
-
/**
|
|
920
|
-
* Get a block specified by its hash.
|
|
921
|
-
* @param blockHash - The block hash being requested.
|
|
922
|
-
* @returns The requested block.
|
|
923
|
-
*/ async getBlockByHash(blockHash) {
|
|
924
|
-
const initialBlockHash = await this.#getInitialHeaderHash();
|
|
925
|
-
if (blockHash.equals(initialBlockHash)) {
|
|
926
|
-
return this.buildInitialBlock();
|
|
927
|
-
}
|
|
928
|
-
return await this.blockSource.getL2BlockByHash(blockHash);
|
|
929
|
-
}
|
|
930
|
-
buildInitialBlock() {
|
|
931
|
-
const initialHeader = this.worldStateSynchronizer.getCommitted().getInitialHeader();
|
|
932
|
-
return L2Block.empty(initialHeader);
|
|
933
|
-
}
|
|
934
|
-
/**
|
|
935
|
-
* Get a block specified by its archive root.
|
|
936
|
-
* @param archive - The archive root being requested.
|
|
937
|
-
* @returns The requested block.
|
|
938
|
-
*/ async getBlockByArchive(archive) {
|
|
939
|
-
return await this.blockSource.getL2BlockByArchive(archive);
|
|
940
|
-
}
|
|
941
|
-
/**
|
|
942
|
-
* Method to request blocks. Will attempt to return all requested blocks but will return only those available.
|
|
943
|
-
* @param from - The start of the range of blocks to return.
|
|
944
|
-
* @param limit - The maximum number of blocks to obtain.
|
|
945
|
-
* @returns The blocks requested.
|
|
946
|
-
*/ async getBlocks(from, limit) {
|
|
947
|
-
return await this.blockSource.getBlocks(from, BlockNumber(limit)) ?? [];
|
|
948
|
-
}
|
|
949
|
-
async getCheckpoints(from, limit) {
|
|
950
|
-
return await this.blockSource.getCheckpoints(from, limit) ?? [];
|
|
951
|
-
}
|
|
952
|
-
async getCheckpointedBlocks(from, limit) {
|
|
953
|
-
return await this.blockSource.getCheckpointedBlocks(from, limit) ?? [];
|
|
954
|
-
}
|
|
955
|
-
getCheckpointsDataForEpoch(epochNumber) {
|
|
956
|
-
return this.blockSource.getCheckpointsDataForEpoch(epochNumber);
|
|
957
|
-
}
|
|
958
1181
|
async getCurrentMinFees() {
|
|
959
1182
|
return await this.feeProvider.getCurrentMinFees();
|
|
960
1183
|
}
|
|
@@ -971,21 +1194,6 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
971
1194
|
});
|
|
972
1195
|
}
|
|
973
1196
|
/**
|
|
974
|
-
* Method to fetch the latest block number synchronized by the node.
|
|
975
|
-
* @returns The block number.
|
|
976
|
-
*/ async getBlockNumber() {
|
|
977
|
-
return await this.blockSource.getBlockNumber();
|
|
978
|
-
}
|
|
979
|
-
async getProvenBlockNumber() {
|
|
980
|
-
return await this.blockSource.getProvenBlockNumber();
|
|
981
|
-
}
|
|
982
|
-
async getCheckpointedBlockNumber() {
|
|
983
|
-
return await this.blockSource.getCheckpointedL2BlockNumber();
|
|
984
|
-
}
|
|
985
|
-
getCheckpointNumber() {
|
|
986
|
-
return this.blockSource.getCheckpointNumber();
|
|
987
|
-
}
|
|
988
|
-
/**
|
|
989
1197
|
* Method to fetch the version of the package.
|
|
990
1198
|
* @returns The node package version
|
|
991
1199
|
*/ getNodeVersion() {
|
|
@@ -1073,7 +1281,15 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1073
1281
|
});
|
|
1074
1282
|
throw new Error(`Invalid tx: ${reason}`);
|
|
1075
1283
|
}
|
|
1076
|
-
|
|
1284
|
+
try {
|
|
1285
|
+
await this.p2pClient.sendTx(tx);
|
|
1286
|
+
} catch (err) {
|
|
1287
|
+
this.metrics.receivedTx(timer.ms(), false);
|
|
1288
|
+
this.log.warn(`Mempool rejected tx ${txHash}: ${err.message}`, {
|
|
1289
|
+
txHash
|
|
1290
|
+
});
|
|
1291
|
+
throw err;
|
|
1292
|
+
}
|
|
1077
1293
|
const duration = timer.ms();
|
|
1078
1294
|
this.metrics.receivedTx(duration, true);
|
|
1079
1295
|
this.log.info(`Received tx ${txHash} in ${duration}ms`, {
|
|
@@ -1094,10 +1310,10 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1094
1310
|
// If the tx is in the pool but not in the archiver, it's pending.
|
|
1095
1311
|
// This handles race conditions between archiver and p2p, where the archiver
|
|
1096
1312
|
// has pruned the block in which a tx was mined, but p2p has not caught up yet.
|
|
1097
|
-
receipt = new TxReceipt(txHash, TxStatus.PENDING, undefined, undefined);
|
|
1313
|
+
receipt = new TxReceipt(txHash, TxStatus.PENDING, /*executionResult=*/ undefined, /*error=*/ undefined);
|
|
1098
1314
|
} else {
|
|
1099
1315
|
// Otherwise, if we don't know the tx, we consider it dropped.
|
|
1100
|
-
receipt = new TxReceipt(txHash, TxStatus.DROPPED, undefined, 'Tx dropped by P2P node');
|
|
1316
|
+
receipt = new TxReceipt(txHash, TxStatus.DROPPED, /*executionResult=*/ undefined, /*error=*/ 'Tx dropped by P2P node');
|
|
1101
1317
|
}
|
|
1102
1318
|
this.debugLogStore.decorateReceiptWithLogs(txHash.toString(), receipt);
|
|
1103
1319
|
return receipt;
|
|
@@ -1109,6 +1325,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1109
1325
|
* Method to stop the aztec node.
|
|
1110
1326
|
*/ async stop() {
|
|
1111
1327
|
this.log.info(`Stopping Aztec Node`);
|
|
1328
|
+
await tryStop(this.attestationsBlockWatcher);
|
|
1112
1329
|
await tryStop(this.validatorsSentinel);
|
|
1113
1330
|
await tryStop(this.epochPruneWatcher);
|
|
1114
1331
|
await tryStop(this.slasherClient);
|
|
@@ -1317,36 +1534,6 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1317
1534
|
const preimage = await committedDb.getLeafPreimage(MerkleTreeId.PUBLIC_DATA_TREE, lowLeafResult.index);
|
|
1318
1535
|
return preimage.leaf.value;
|
|
1319
1536
|
}
|
|
1320
|
-
async getBlockHeader(block = 'latest') {
|
|
1321
|
-
if (BlockHash.isBlockHash(block)) {
|
|
1322
|
-
const initialBlockHash = await this.#getInitialHeaderHash();
|
|
1323
|
-
if (block.equals(initialBlockHash)) {
|
|
1324
|
-
// Block source doesn't handle initial header so we need to handle the case separately.
|
|
1325
|
-
return this.worldStateSynchronizer.getCommitted().getInitialHeader();
|
|
1326
|
-
}
|
|
1327
|
-
return this.blockSource.getBlockHeaderByHash(block);
|
|
1328
|
-
} else {
|
|
1329
|
-
// Block source doesn't handle initial header so we need to handle the case separately.
|
|
1330
|
-
const blockNumber = block === 'latest' ? await this.getBlockNumber() : block;
|
|
1331
|
-
if (blockNumber === BlockNumber.ZERO) {
|
|
1332
|
-
return this.worldStateSynchronizer.getCommitted().getInitialHeader();
|
|
1333
|
-
}
|
|
1334
|
-
return this.blockSource.getBlockHeader(block);
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
/**
|
|
1338
|
-
* Get a block header specified by its archive root.
|
|
1339
|
-
* @param archive - The archive root being requested.
|
|
1340
|
-
* @returns The requested block header.
|
|
1341
|
-
*/ async getBlockHeaderByArchive(archive) {
|
|
1342
|
-
return await this.blockSource.getBlockHeaderByArchive(archive);
|
|
1343
|
-
}
|
|
1344
|
-
getBlockData(number) {
|
|
1345
|
-
return this.blockSource.getBlockData(number);
|
|
1346
|
-
}
|
|
1347
|
-
getBlockDataByArchive(archive) {
|
|
1348
|
-
return this.blockSource.getBlockDataByArchive(archive);
|
|
1349
|
-
}
|
|
1350
1537
|
/**
|
|
1351
1538
|
* Simulates the public part of a transaction with the current state.
|
|
1352
1539
|
* @param tx - The transaction to simulate.
|
|
@@ -1713,7 +1900,7 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1713
1900
|
}
|
|
1714
1901
|
// Check it's within world state sync range
|
|
1715
1902
|
if (blockNumber > blockSyncedTo) {
|
|
1716
|
-
throw new Error(`Queried block ${block} not yet synced by the node (node is synced upto ${blockSyncedTo}).`);
|
|
1903
|
+
throw new Error(`Queried block ${inspectBlockParameter(block)} not yet synced by the node (node is synced upto ${blockSyncedTo}).`);
|
|
1717
1904
|
}
|
|
1718
1905
|
this.log.debug(`Using snapshot for block ${blockNumber}, world state synced upto ${blockSyncedTo}`);
|
|
1719
1906
|
const snapshot = this.worldStateSynchronizer.getSnapshot(blockNumber);
|
|
@@ -1727,22 +1914,30 @@ _dec = trackSpan('AztecNodeService.simulatePublicCalls', (tx)=>({
|
|
|
1727
1914
|
}
|
|
1728
1915
|
return snapshot;
|
|
1729
1916
|
}
|
|
1730
|
-
/** Resolves
|
|
1731
|
-
|
|
1732
|
-
|
|
1917
|
+
/** Resolves any {@link BlockParameter} variant to a concrete block number. */ async resolveBlockNumber(block) {
|
|
1918
|
+
const resolved = await this.resolveBlockParameter(block);
|
|
1919
|
+
if (resolved.number !== undefined) {
|
|
1920
|
+
return resolved.number;
|
|
1733
1921
|
}
|
|
1734
|
-
if (
|
|
1922
|
+
if (resolved.hash !== undefined) {
|
|
1735
1923
|
const initialBlockHash = await this.#getInitialHeaderHash();
|
|
1736
|
-
if (
|
|
1924
|
+
if (resolved.hash.equals(initialBlockHash)) {
|
|
1737
1925
|
return BlockNumber.ZERO;
|
|
1738
1926
|
}
|
|
1739
|
-
const header = await this.blockSource.getBlockHeaderByHash(
|
|
1927
|
+
const header = await this.blockSource.getBlockHeaderByHash(resolved.hash);
|
|
1928
|
+
if (!header) {
|
|
1929
|
+
throw new Error(`Block hash ${resolved.hash.toString()} not found.`);
|
|
1930
|
+
}
|
|
1931
|
+
return header.getBlockNumber();
|
|
1932
|
+
}
|
|
1933
|
+
if (resolved.archive !== undefined) {
|
|
1934
|
+
const header = await this.blockSource.getBlockHeaderByArchive(resolved.archive);
|
|
1740
1935
|
if (!header) {
|
|
1741
|
-
throw new Error(`Block
|
|
1936
|
+
throw new Error(`Block with archive ${resolved.archive.toString()} not found.`);
|
|
1742
1937
|
}
|
|
1743
1938
|
return header.getBlockNumber();
|
|
1744
1939
|
}
|
|
1745
|
-
|
|
1940
|
+
throw new BadRequestError(`Invalid BlockParameter: ${JSON.stringify(block)}`);
|
|
1746
1941
|
}
|
|
1747
1942
|
/**
|
|
1748
1943
|
* Ensure we fully sync the world state
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
2
|
import type { P2PClient } from '@aztec/p2p';
|
|
3
3
|
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
4
|
+
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
4
5
|
import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
5
6
|
import type { DataStoreConfig } from '@aztec/stdlib/kv-store';
|
|
6
7
|
import type { SentinelConfig } from './config.js';
|
|
7
8
|
import { Sentinel } from './sentinel.js';
|
|
8
|
-
export declare function createSentinel(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, config: SentinelConfig & DataStoreConfig & SlasherConfig, logger?: import("@aztec/foundation/log").Logger): Promise<Sentinel | undefined>;
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
export declare function createSentinel(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, config: SentinelConfig & DataStoreConfig & SlasherConfig & Pick<ChainConfig, 'l1ChainId' | 'l1Contracts'>, logger?: import("@aztec/foundation/log").Logger): Promise<Sentinel | undefined>;
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjdG9yeS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlbnRpbmVsL2ZhY3RvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QU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EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,aAAa,EACvB,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,cAAc,GAAG,eAAe,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/sentinel/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,aAAa,EACvB,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,cAAc,GAAG,eAAe,GAAG,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,aAAa,CAAC,EACzG,MAAM,yCAAgC,GACrC,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAY/B"}
|
|
@@ -7,15 +7,17 @@ import type { P2PClient } from '@aztec/p2p';
|
|
|
7
7
|
import { type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
8
8
|
import type { SlasherConfig } from '@aztec/slasher/config';
|
|
9
9
|
import { type L2BlockSource, L2BlockStream, type L2BlockStreamEvent, type L2BlockStreamEventHandler } from '@aztec/stdlib/block';
|
|
10
|
+
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
10
11
|
import type { SingleValidatorStats, ValidatorStats, ValidatorStatusHistory, ValidatorStatusInSlot, ValidatorStatusType, ValidatorsEpochPerformance, ValidatorsStats } from '@aztec/stdlib/validators';
|
|
11
12
|
import { SentinelStore } from './store.js';
|
|
13
|
+
export type SentinelRuntimeConfig = Pick<SlasherConfig, 'slashInactivityTargetPercentage' | 'slashInactivityPenalty' | 'slashInactivityConsecutiveEpochThreshold'> & Pick<ChainConfig, 'l1ChainId' | 'l1Contracts'>;
|
|
12
14
|
declare const Sentinel_base: new () => WatcherEmitter;
|
|
13
15
|
export declare class Sentinel extends Sentinel_base implements L2BlockStreamEventHandler, Watcher {
|
|
14
16
|
protected epochCache: EpochCache;
|
|
15
17
|
protected archiver: L2BlockSource;
|
|
16
18
|
protected p2p: P2PClient;
|
|
17
19
|
protected store: SentinelStore;
|
|
18
|
-
protected config:
|
|
20
|
+
protected config: SentinelRuntimeConfig;
|
|
19
21
|
protected logger: import("@aztec/foundation/log").Logger;
|
|
20
22
|
protected runningPromise: RunningPromise;
|
|
21
23
|
protected blockStream: L2BlockStream;
|
|
@@ -27,7 +29,8 @@ export declare class Sentinel extends Sentinel_base implements L2BlockStreamEven
|
|
|
27
29
|
archive: string;
|
|
28
30
|
attestors: EthAddress[];
|
|
29
31
|
}>;
|
|
30
|
-
constructor(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, store: SentinelStore, config:
|
|
32
|
+
constructor(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, store: SentinelStore, config: SentinelRuntimeConfig, logger?: import("@aztec/foundation/log").Logger);
|
|
33
|
+
private getSignatureContext;
|
|
31
34
|
updateConfig(config: Partial<SlasherConfig>): void;
|
|
32
35
|
start(): Promise<void>;
|
|
33
36
|
/** Loads initial slot and initializes blockstream. We will not process anything at or before the initial slot. */
|
|
@@ -90,4 +93,4 @@ export declare class Sentinel extends Sentinel_base implements L2BlockStreamEven
|
|
|
90
93
|
} | undefined;
|
|
91
94
|
}
|
|
92
95
|
export {};
|
|
93
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VudGluZWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZW50aW5lbC9zZW50aW5lbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNyRCxPQUFPLEVBQWUsZ0JBQWdCLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRXpHLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUUzRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDbkUsT0FBTyxFQUFxQixLQUFLLFdBQVcsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQzdFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEVBSUwsS0FBSyxPQUFPLEVBQ1osS0FBSyxjQUFjLEVBQ3BCLE1BQU0sZ0JBQWdCLENBQUM7QUFDeEIsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDM0QsT0FBTyxFQUNMLEtBQUssYUFBYSxFQUNsQixhQUFhLEVBQ2IsS0FBSyxrQkFBa0IsRUFDdkIsS0FBSyx5QkFBeUIsRUFFL0IsTUFBTSxxQkFBcUIsQ0FBQztBQUM3QixPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUU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