@aztec/simulator 4.0.0-nightly.20260112 → 4.0.0-nightly.20260113
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/public/avm/opcodes/accrued_substate.d.ts +15 -15
- package/dest/public/avm/opcodes/accrued_substate.d.ts.map +1 -1
- package/dest/public/avm/opcodes/accrued_substate.js +28 -28
- package/dest/public/avm/opcodes/arithmetic.js +1 -1
- package/dest/public/avm/opcodes/bitwise.d.ts +3 -3
- package/dest/public/avm/opcodes/bitwise.d.ts.map +1 -1
- package/dest/public/avm/opcodes/bitwise.js +5 -5
- package/dest/public/avm/opcodes/comparators.js +1 -1
- package/dest/public/avm/opcodes/contract.d.ts +3 -3
- package/dest/public/avm/opcodes/contract.d.ts.map +1 -1
- package/dest/public/avm/opcodes/contract.js +4 -4
- package/dest/public/avm/opcodes/control_flow.d.ts +3 -3
- package/dest/public/avm/opcodes/control_flow.d.ts.map +1 -1
- package/dest/public/avm/opcodes/control_flow.js +4 -4
- package/dest/public/avm/opcodes/conversion.d.ts +3 -3
- package/dest/public/avm/opcodes/conversion.d.ts.map +1 -1
- package/dest/public/avm/opcodes/conversion.js +4 -4
- package/dest/public/avm/opcodes/ec_add.d.ts +3 -3
- package/dest/public/avm/opcodes/ec_add.d.ts.map +1 -1
- package/dest/public/avm/opcodes/ec_add.js +4 -4
- package/dest/public/avm/opcodes/environment_getters.d.ts +3 -3
- package/dest/public/avm/opcodes/environment_getters.d.ts.map +1 -1
- package/dest/public/avm/opcodes/environment_getters.js +4 -4
- package/dest/public/avm/opcodes/external_calls.d.ts +9 -9
- package/dest/public/avm/opcodes/external_calls.d.ts.map +1 -1
- package/dest/public/avm/opcodes/external_calls.js +16 -16
- package/dest/public/avm/opcodes/hashing.d.ts +7 -7
- package/dest/public/avm/opcodes/hashing.d.ts.map +1 -1
- package/dest/public/avm/opcodes/hashing.js +12 -12
- package/dest/public/avm/opcodes/instruction_impl.d.ts +4 -4
- package/dest/public/avm/opcodes/instruction_impl.d.ts.map +1 -1
- package/dest/public/avm/opcodes/instruction_impl.js +4 -4
- package/dest/public/avm/opcodes/memory.d.ts +13 -13
- package/dest/public/avm/opcodes/memory.d.ts.map +1 -1
- package/dest/public/avm/opcodes/memory.js +24 -24
- package/dest/public/avm/opcodes/misc.d.ts +3 -3
- package/dest/public/avm/opcodes/misc.d.ts.map +1 -1
- package/dest/public/avm/opcodes/misc.js +4 -4
- package/dest/public/avm/opcodes/storage.d.ts +5 -5
- package/dest/public/avm/opcodes/storage.d.ts.map +1 -1
- package/dest/public/avm/opcodes/storage.js +9 -9
- package/dest/public/fixtures/custom_bytecode_tests.d.ts +1 -1
- package/dest/public/fixtures/custom_bytecode_tests.d.ts.map +1 -1
- package/dest/public/fixtures/custom_bytecode_tests.js +18 -18
- package/dest/public/fixtures/minimal_public_tx.js +2 -2
- package/dest/public/fixtures/opcode_spammer.d.ts +1 -1
- package/dest/public/fixtures/opcode_spammer.d.ts.map +1 -1
- package/dest/public/fixtures/opcode_spammer.js +76 -76
- package/package.json +16 -16
- package/src/public/avm/opcodes/accrued_substate.ts +14 -14
- package/src/public/avm/opcodes/arithmetic.ts +1 -1
- package/src/public/avm/opcodes/bitwise.ts +3 -3
- package/src/public/avm/opcodes/comparators.ts +1 -1
- package/src/public/avm/opcodes/contract.ts +3 -3
- package/src/public/avm/opcodes/control_flow.ts +2 -2
- package/src/public/avm/opcodes/conversion.ts +3 -3
- package/src/public/avm/opcodes/ec_add.ts +2 -2
- package/src/public/avm/opcodes/environment_getters.ts +3 -3
- package/src/public/avm/opcodes/external_calls.ts +9 -9
- package/src/public/avm/opcodes/hashing.ts +6 -6
- package/src/public/avm/opcodes/instruction_impl.ts +2 -2
- package/src/public/avm/opcodes/memory.ts +18 -18
- package/src/public/avm/opcodes/misc.ts +2 -2
- package/src/public/avm/opcodes/storage.ts +7 -7
- package/src/public/fixtures/custom_bytecode_tests.ts +27 -18
- package/src/public/fixtures/minimal_public_tx.ts +2 -2
- package/src/public/fixtures/opcode_spammer.ts +164 -77
|
@@ -449,7 +449,7 @@ export const EXTERNAL_CALL_CONFIG: SpamConfig = {
|
|
|
449
449
|
{ offset: CONST_MAX_U32_OFFSET, value: new Uint32(MAX_U32) }, // l2Gas/daGas - MAX_U32 gets capped to remaining gas
|
|
450
450
|
() => [
|
|
451
451
|
new CalldataCopy(
|
|
452
|
-
/*
|
|
452
|
+
/*addressing_mode=*/ 0,
|
|
453
453
|
/*copySizeOffset=*/ CALL_COPY_SIZE_OFFSET,
|
|
454
454
|
/*cdStartOffset=*/ CALL_CALLDATA_INDEX_OFFSET,
|
|
455
455
|
/*dstOffset=*/ CALL_ADDR_OFFSET,
|
|
@@ -458,7 +458,7 @@ export const EXTERNAL_CALL_CONFIG: SpamConfig = {
|
|
|
458
458
|
],
|
|
459
459
|
targetInstructions: () => [
|
|
460
460
|
new Call(
|
|
461
|
-
/*
|
|
461
|
+
/*addressing_mode=*/ 0,
|
|
462
462
|
/*l2GasOffset=*/ CALL_L2_GAS_OFFSET,
|
|
463
463
|
/*daGasOffset=*/ CALL_DA_GAS_OFFSET,
|
|
464
464
|
/*addrOffset=*/ CALL_ADDR_OFFSET,
|
|
@@ -477,7 +477,7 @@ const STATIC_CALL_CONFIG: SpamConfig = {
|
|
|
477
477
|
{ offset: CONST_MAX_U32_OFFSET, value: new Uint32(MAX_U32) }, // l2Gas/daGas - MAX_U32 gets capped to remaining gas
|
|
478
478
|
() => [
|
|
479
479
|
new CalldataCopy(
|
|
480
|
-
/*
|
|
480
|
+
/*addressing_mode=*/ 0,
|
|
481
481
|
/*copySizeOffset=*/ CALL_COPY_SIZE_OFFSET,
|
|
482
482
|
/*cdStartOffset=*/ CALL_CALLDATA_INDEX_OFFSET,
|
|
483
483
|
/*dstOffset=*/ CALL_ADDR_OFFSET,
|
|
@@ -486,7 +486,7 @@ const STATIC_CALL_CONFIG: SpamConfig = {
|
|
|
486
486
|
],
|
|
487
487
|
targetInstructions: () => [
|
|
488
488
|
new StaticCall(
|
|
489
|
-
/*
|
|
489
|
+
/*addressing_mode=*/ 0,
|
|
490
490
|
/*l2GasOffset=*/ CALL_L2_GAS_OFFSET,
|
|
491
491
|
/*daGasOffset=*/ CALL_DA_GAS_OFFSET,
|
|
492
492
|
/*addrOffset=*/ CALL_ADDR_OFFSET,
|
|
@@ -517,7 +517,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
517
517
|
{ offset: 1, value: randomWithTag(tag) }, // random addend
|
|
518
518
|
],
|
|
519
519
|
targetInstructions: () => [
|
|
520
|
-
new Add(/*
|
|
520
|
+
new Add(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
521
|
+
Opcode.ADD_8,
|
|
522
|
+
Add.wireFormat8,
|
|
523
|
+
),
|
|
521
524
|
],
|
|
522
525
|
})),
|
|
523
526
|
|
|
@@ -528,7 +531,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
528
531
|
{ offset: 1, value: randomWithTag(tag) }, // random subtrahend
|
|
529
532
|
],
|
|
530
533
|
targetInstructions: () => [
|
|
531
|
-
new Sub(/*
|
|
534
|
+
new Sub(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
535
|
+
Opcode.SUB_8,
|
|
536
|
+
Sub.wireFormat8,
|
|
537
|
+
),
|
|
532
538
|
],
|
|
533
539
|
})),
|
|
534
540
|
|
|
@@ -539,7 +545,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
539
545
|
{ offset: 1, value: randomWithTag(tag) }, // random multiplier
|
|
540
546
|
],
|
|
541
547
|
targetInstructions: () => [
|
|
542
|
-
new Mul(/*
|
|
548
|
+
new Mul(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
549
|
+
Opcode.MUL_8,
|
|
550
|
+
Mul.wireFormat8,
|
|
551
|
+
),
|
|
543
552
|
],
|
|
544
553
|
})),
|
|
545
554
|
|
|
@@ -551,7 +560,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
551
560
|
{ offset: 1, value: randomNonZeroWithTag(tag) }, // random non-zero divisor
|
|
552
561
|
],
|
|
553
562
|
targetInstructions: () => [
|
|
554
|
-
new Div(/*
|
|
563
|
+
new Div(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
564
|
+
Opcode.DIV_8,
|
|
565
|
+
Div.wireFormat8,
|
|
566
|
+
),
|
|
555
567
|
],
|
|
556
568
|
})),
|
|
557
569
|
|
|
@@ -563,7 +575,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
563
575
|
{ offset: 1, value: randomNonZeroField() }, // random non-zero divisor
|
|
564
576
|
],
|
|
565
577
|
targetInstructions: () => [
|
|
566
|
-
new FieldDiv(/*
|
|
578
|
+
new FieldDiv(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
567
579
|
Opcode.FDIV_8,
|
|
568
580
|
FieldDiv.wireFormat8,
|
|
569
581
|
),
|
|
@@ -581,7 +593,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
581
593
|
{ offset: 1, value: randomWithTag(tag) }, // random value b
|
|
582
594
|
],
|
|
583
595
|
targetInstructions: () => [
|
|
584
|
-
new Eq(/*
|
|
596
|
+
new Eq(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 2).as(Opcode.EQ_8, Eq.wireFormat8),
|
|
585
597
|
],
|
|
586
598
|
})),
|
|
587
599
|
|
|
@@ -592,7 +604,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
592
604
|
{ offset: 1, value: randomWithTag(tag) }, // random value b
|
|
593
605
|
],
|
|
594
606
|
targetInstructions: () => [
|
|
595
|
-
new Lt(/*
|
|
607
|
+
new Lt(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 2).as(Opcode.LT_8, Lt.wireFormat8),
|
|
596
608
|
],
|
|
597
609
|
})),
|
|
598
610
|
|
|
@@ -603,7 +615,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
603
615
|
{ offset: 1, value: randomWithTag(tag) }, // random value b
|
|
604
616
|
],
|
|
605
617
|
targetInstructions: () => [
|
|
606
|
-
new Lte(/*
|
|
618
|
+
new Lte(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 2).as(
|
|
619
|
+
Opcode.LTE_8,
|
|
620
|
+
Lte.wireFormat8,
|
|
621
|
+
),
|
|
607
622
|
],
|
|
608
623
|
})),
|
|
609
624
|
|
|
@@ -617,7 +632,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
617
632
|
{ offset: 1, value: randomWithTag(tag) }, // random value b
|
|
618
633
|
],
|
|
619
634
|
targetInstructions: () => [
|
|
620
|
-
new And(/*
|
|
635
|
+
new And(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
636
|
+
Opcode.AND_8,
|
|
637
|
+
And.wireFormat8,
|
|
638
|
+
),
|
|
621
639
|
],
|
|
622
640
|
})),
|
|
623
641
|
|
|
@@ -628,7 +646,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
628
646
|
{ offset: 1, value: randomWithTag(tag) }, // random value b
|
|
629
647
|
],
|
|
630
648
|
targetInstructions: () => [
|
|
631
|
-
new Or(/*
|
|
649
|
+
new Or(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(Opcode.OR_8, Or.wireFormat8),
|
|
632
650
|
],
|
|
633
651
|
})),
|
|
634
652
|
|
|
@@ -639,7 +657,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
639
657
|
{ offset: 1, value: randomWithTag(tag) }, // random value b
|
|
640
658
|
],
|
|
641
659
|
targetInstructions: () => [
|
|
642
|
-
new Xor(/*
|
|
660
|
+
new Xor(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
661
|
+
Opcode.XOR_8,
|
|
662
|
+
Xor.wireFormat8,
|
|
663
|
+
),
|
|
643
664
|
],
|
|
644
665
|
})),
|
|
645
666
|
|
|
@@ -647,7 +668,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
647
668
|
label: TypeTag[tag],
|
|
648
669
|
setup: [{ offset: 0, value: randomWithTag(tag) }], // random value
|
|
649
670
|
targetInstructions: () => [
|
|
650
|
-
new Not(/*
|
|
671
|
+
new Not(/*addressing_mode=*/ 0, /*srcOffset=*/ 0, /*dstOffset=*/ 0).as(Opcode.NOT_8, Not.wireFormat8),
|
|
651
672
|
],
|
|
652
673
|
})),
|
|
653
674
|
|
|
@@ -658,7 +679,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
658
679
|
{ offset: 1, value: withTag(1n, tag) }, // shift by 1 (small fixed amount to avoid overflow)
|
|
659
680
|
],
|
|
660
681
|
targetInstructions: () => [
|
|
661
|
-
new Shl(/*
|
|
682
|
+
new Shl(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
683
|
+
Opcode.SHL_8,
|
|
684
|
+
Shl.wireFormat8,
|
|
685
|
+
),
|
|
662
686
|
],
|
|
663
687
|
})),
|
|
664
688
|
|
|
@@ -669,7 +693,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
669
693
|
{ offset: 1, value: withTag(1n, tag) }, // shift by 1 (small fixed amount)
|
|
670
694
|
],
|
|
671
695
|
targetInstructions: () => [
|
|
672
|
-
new Shr(/*
|
|
696
|
+
new Shr(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
697
|
+
Opcode.SHR_8,
|
|
698
|
+
Shr.wireFormat8,
|
|
699
|
+
),
|
|
673
700
|
],
|
|
674
701
|
})),
|
|
675
702
|
|
|
@@ -680,7 +707,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
680
707
|
label: TypeTag[tag],
|
|
681
708
|
setup: [{ offset: 0, value: randomWithTag(tag) }], // random value to cast
|
|
682
709
|
targetInstructions: () => [
|
|
683
|
-
new Cast(/*
|
|
710
|
+
new Cast(/*addressing_mode=*/ 0, /*srcOffset=*/ 0, /*dstOffset=*/ 1, /*dstTag=*/ TypeTag.UINT32).as(
|
|
684
711
|
Opcode.CAST_8,
|
|
685
712
|
Cast.wireFormat8,
|
|
686
713
|
),
|
|
@@ -691,7 +718,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
691
718
|
label: TypeTag[tag],
|
|
692
719
|
setup: [{ offset: 0, value: randomWithTag(tag) }], // random value to move
|
|
693
720
|
targetInstructions: () => [
|
|
694
|
-
new Mov(/*
|
|
721
|
+
new Mov(/*addressing_mode=*/ 0, /*srcOffset=*/ 0, /*dstOffset=*/ 1).as(Opcode.MOV_8, Mov.wireFormat8),
|
|
695
722
|
],
|
|
696
723
|
})),
|
|
697
724
|
|
|
@@ -732,7 +759,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
732
759
|
{
|
|
733
760
|
setup: [],
|
|
734
761
|
targetInstructions: () => [
|
|
735
|
-
new Set(/*
|
|
762
|
+
new Set(/*addressing_mode=*/ 0, /*dstOffset=*/ 0, /*inTag=*/ TypeTag.UINT128, /*value=*/ 4242424242424242n).as(
|
|
736
763
|
Opcode.SET_128,
|
|
737
764
|
Set.wireFormat128,
|
|
738
765
|
),
|
|
@@ -761,7 +788,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
761
788
|
[Opcode.JUMPI_32]: [
|
|
762
789
|
{
|
|
763
790
|
setup: [{ offset: 0, value: new Uint1(0n) }], // Always false
|
|
764
|
-
targetInstructions: () => [new JumpI(/*
|
|
791
|
+
targetInstructions: () => [new JumpI(/*addressing_mode=*/ 0, /*condOffset=*/ 0, /*loc=*/ 0)],
|
|
765
792
|
},
|
|
766
793
|
],
|
|
767
794
|
|
|
@@ -801,7 +828,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
801
828
|
{ offset: 0, value: new Uint32(0) }, // returnSize = 0
|
|
802
829
|
],
|
|
803
830
|
targetInstructions: () => [
|
|
804
|
-
new Return(/*
|
|
831
|
+
new Return(/*addressing_mode=*/ 0, /*returnSizeOffset=*/ 0, /*returnOffset=*/ 0), // return nothing (size=0)
|
|
805
832
|
],
|
|
806
833
|
// Use the side-effect-limit pattern (even though it's not a side-effect) as it fits
|
|
807
834
|
// this case (we want to CALL, RETURN, then CALL again back in parent). We omit "cleanup"
|
|
@@ -818,7 +845,10 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
818
845
|
{ offset: 0, value: new Uint32(0) }, // retSize = 0
|
|
819
846
|
],
|
|
820
847
|
targetInstructions: () => [
|
|
821
|
-
new Revert(/*
|
|
848
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 0, /*returnOffset=*/ 1).as(
|
|
849
|
+
Opcode.REVERT_8,
|
|
850
|
+
Revert.wireFormat8,
|
|
851
|
+
),
|
|
822
852
|
],
|
|
823
853
|
limit: 1, // REVERT can only execute once per call
|
|
824
854
|
},
|
|
@@ -831,7 +861,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
831
861
|
{
|
|
832
862
|
setup: [],
|
|
833
863
|
targetInstructions: () => [
|
|
834
|
-
new GetEnvVar(/*
|
|
864
|
+
new GetEnvVar(/*addressing_mode=*/ 0, /*dstOffset=*/ 0, /*varEnum=*/ 0).as(
|
|
835
865
|
Opcode.GETENVVAR_16,
|
|
836
866
|
GetEnvVar.wireFormat16,
|
|
837
867
|
),
|
|
@@ -849,7 +879,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
849
879
|
{ offset: 1, value: new Uint32(0n) }, // cdStart = 0
|
|
850
880
|
],
|
|
851
881
|
targetInstructions: () => [
|
|
852
|
-
new CalldataCopy(/*
|
|
882
|
+
new CalldataCopy(/*addressing_mode=*/ 0, /*copySizeOffset=*/ 0, /*cdStartOffset=*/ 1, /*dstOffset=*/ 2),
|
|
853
883
|
],
|
|
854
884
|
},
|
|
855
885
|
{
|
|
@@ -862,7 +892,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
862
892
|
{ offset: 1, value: new Uint32(0n) }, // cdStart = 0
|
|
863
893
|
],
|
|
864
894
|
targetInstructions: () => [
|
|
865
|
-
new CalldataCopy(/*
|
|
895
|
+
new CalldataCopy(/*addressing_mode=*/ 0, /*copySizeOffset=*/ 0, /*cdStartOffset=*/ 1, /*dstOffset=*/ 2),
|
|
866
896
|
],
|
|
867
897
|
},
|
|
868
898
|
{
|
|
@@ -873,7 +903,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
873
903
|
{ offset: 1, value: new Uint32(0n) }, // cdStart = 0
|
|
874
904
|
],
|
|
875
905
|
targetInstructions: () => [
|
|
876
|
-
new CalldataCopy(/*
|
|
906
|
+
new CalldataCopy(/*addressing_mode=*/ 0, /*copySizeOffset=*/ 0, /*cdStartOffset=*/ 1, /*dstOffset=*/ 2),
|
|
877
907
|
],
|
|
878
908
|
},
|
|
879
909
|
],
|
|
@@ -881,14 +911,14 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
881
911
|
[Opcode.SUCCESSCOPY]: [
|
|
882
912
|
{
|
|
883
913
|
setup: [],
|
|
884
|
-
targetInstructions: () => [new SuccessCopy(/*
|
|
914
|
+
targetInstructions: () => [new SuccessCopy(/*addressing_mode=*/ 0, /*dstOffset=*/ 0)],
|
|
885
915
|
},
|
|
886
916
|
],
|
|
887
917
|
|
|
888
918
|
[Opcode.RETURNDATASIZE]: [
|
|
889
919
|
{
|
|
890
920
|
setup: [],
|
|
891
|
-
targetInstructions: () => [new ReturndataSize(/*
|
|
921
|
+
targetInstructions: () => [new ReturndataSize(/*addressing_mode=*/ 0, /*dstOffset=*/ 0)],
|
|
892
922
|
},
|
|
893
923
|
],
|
|
894
924
|
|
|
@@ -901,7 +931,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
901
931
|
{ offset: 1, value: new Uint32(0n) }, // rdOffset
|
|
902
932
|
],
|
|
903
933
|
targetInstructions: () => [
|
|
904
|
-
new ReturndataCopy(/*
|
|
934
|
+
new ReturndataCopy(/*addressing_mode=*/ 0, /*copySizeOffset=*/ 0, /*rdStartOffset=*/ 1, /*dstOffset=*/ 2),
|
|
905
935
|
],
|
|
906
936
|
},
|
|
907
937
|
{
|
|
@@ -914,7 +944,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
914
944
|
{ offset: 1, value: new Uint32(0n) }, // rdOffset
|
|
915
945
|
],
|
|
916
946
|
targetInstructions: () => [
|
|
917
|
-
new ReturndataCopy(/*
|
|
947
|
+
new ReturndataCopy(/*addressing_mode=*/ 0, /*copySizeOffset=*/ 0, /*rdStartOffset=*/ 1, /*dstOffset=*/ 2),
|
|
918
948
|
],
|
|
919
949
|
},
|
|
920
950
|
{
|
|
@@ -925,7 +955,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
925
955
|
{ offset: 1, value: new Uint32(0n) }, // rdOffset
|
|
926
956
|
],
|
|
927
957
|
targetInstructions: () => [
|
|
928
|
-
new ReturndataCopy(/*
|
|
958
|
+
new ReturndataCopy(/*addressing_mode=*/ 0, /*copySizeOffset=*/ 0, /*rdStartOffset=*/ 1, /*dstOffset=*/ 2),
|
|
929
959
|
],
|
|
930
960
|
},
|
|
931
961
|
],
|
|
@@ -937,13 +967,13 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
937
967
|
{
|
|
938
968
|
label: 'Cold read (slot not written)',
|
|
939
969
|
setup: [{ offset: 0, value: new Field(Fr.random()) }], // random slot
|
|
940
|
-
targetInstructions: () => [new SLoad(/*
|
|
970
|
+
targetInstructions: () => [new SLoad(/*addressing_mode=*/ 0, /*slotOffset=*/ 0, /*dstOffset=*/ 1)],
|
|
941
971
|
},
|
|
942
972
|
{
|
|
943
973
|
label: 'Warm read (from tree)',
|
|
944
974
|
// Uses pre-inserted storage from insertWarmTreeEntries() which is called after contract deployment
|
|
945
975
|
setup: [{ offset: 0, value: new Field(WARM_STORAGE_SLOT) }], // pre-inserted slot
|
|
946
|
-
targetInstructions: () => [new SLoad(/*
|
|
976
|
+
targetInstructions: () => [new SLoad(/*addressing_mode=*/ 0, /*slotOffset=*/ 0, /*dstOffset=*/ 1)],
|
|
947
977
|
},
|
|
948
978
|
{
|
|
949
979
|
label: 'Warm read (SSTORE first, unique slot per SLOAD)',
|
|
@@ -955,12 +985,18 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
955
985
|
{ offset: 3, value: new Uint32(0n) }, // revertSize
|
|
956
986
|
],
|
|
957
987
|
targetInstructions: () => [
|
|
958
|
-
new SStore(/*
|
|
959
|
-
new SLoad(/*
|
|
960
|
-
new Add(/*
|
|
988
|
+
new SStore(/*addressing_mode=*/ 0, /*srcOffset=*/ 1, /*slotOffset=*/ 0),
|
|
989
|
+
new SLoad(/*addressing_mode=*/ 0, /*slotOffset=*/ 0, /*dstOffset=*/ 4),
|
|
990
|
+
new Add(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 2, /*dstOffset=*/ 0).as(
|
|
991
|
+
Opcode.ADD_8,
|
|
992
|
+
Add.wireFormat8,
|
|
993
|
+
), // slot++
|
|
961
994
|
],
|
|
962
995
|
cleanupInstructions: () => [
|
|
963
|
-
new Revert(/*
|
|
996
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 3, /*returnOffset=*/ 0).as(
|
|
997
|
+
Opcode.REVERT_8,
|
|
998
|
+
Revert.wireFormat8,
|
|
999
|
+
),
|
|
964
1000
|
],
|
|
965
1001
|
limit: MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
|
|
966
1002
|
},
|
|
@@ -976,7 +1012,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
976
1012
|
{ offset: 1, value: randomWithTag(TypeTag.UINT64) }, // random leafIndex
|
|
977
1013
|
],
|
|
978
1014
|
targetInstructions: () => [
|
|
979
|
-
new NoteHashExists(/*
|
|
1015
|
+
new NoteHashExists(/*addressing_mode=*/ 0, /*noteHashOffset=*/ 0, /*leafIndexOffset=*/ 1, /*existsOffset=*/ 2),
|
|
980
1016
|
],
|
|
981
1017
|
},
|
|
982
1018
|
{
|
|
@@ -987,7 +1023,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
987
1023
|
{ offset: 1, value: new Uint64(WARM_NOTE_HASH_LEAF_INDEX) }, // known leafIndex
|
|
988
1024
|
],
|
|
989
1025
|
targetInstructions: () => [
|
|
990
|
-
new NoteHashExists(/*
|
|
1026
|
+
new NoteHashExists(/*addressing_mode=*/ 0, /*noteHashOffset=*/ 0, /*leafIndexOffset=*/ 1, /*existsOffset=*/ 2),
|
|
991
1027
|
],
|
|
992
1028
|
},
|
|
993
1029
|
],
|
|
@@ -1000,7 +1036,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1000
1036
|
{ offset: 1, value: new Field(Fr.random()) }, // random address
|
|
1001
1037
|
],
|
|
1002
1038
|
targetInstructions: () => [
|
|
1003
|
-
new NullifierExists(/*
|
|
1039
|
+
new NullifierExists(/*addressing_mode=*/ 0, /*nullifierOffset=*/ 0, /*addressOffset=*/ 1, /*existsOffset=*/ 2),
|
|
1004
1040
|
],
|
|
1005
1041
|
},
|
|
1006
1042
|
{
|
|
@@ -1011,7 +1047,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1011
1047
|
{ offset: 1, value: new Field(WARM_NULLIFIER_ADDRESS.toField()) }, // address it was siloed with
|
|
1012
1048
|
],
|
|
1013
1049
|
targetInstructions: () => [
|
|
1014
|
-
new NullifierExists(/*
|
|
1050
|
+
new NullifierExists(/*addressing_mode=*/ 0, /*nullifierOffset=*/ 0, /*addressOffset=*/ 1, /*existsOffset=*/ 2),
|
|
1015
1051
|
],
|
|
1016
1052
|
},
|
|
1017
1053
|
{
|
|
@@ -1022,7 +1058,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1022
1058
|
{ offset: 1, value: new Field(1n) }, // constant 1 for ADD
|
|
1023
1059
|
() => [
|
|
1024
1060
|
// Get current contract address into offset 2
|
|
1025
|
-
new GetEnvVar(/*
|
|
1061
|
+
new GetEnvVar(/*addressing_mode=*/ 0, /*dstOffset=*/ 2, /*varEnum=*/ 0).as(
|
|
1026
1062
|
Opcode.GETENVVAR_16,
|
|
1027
1063
|
GetEnvVar.wireFormat16,
|
|
1028
1064
|
),
|
|
@@ -1030,12 +1066,18 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1030
1066
|
{ offset: 3, value: new Uint32(0n) }, // revertSize
|
|
1031
1067
|
],
|
|
1032
1068
|
targetInstructions: () => [
|
|
1033
|
-
new EmitNullifier(/*
|
|
1034
|
-
new NullifierExists(/*
|
|
1035
|
-
new Add(/*
|
|
1069
|
+
new EmitNullifier(/*addressing_mode=*/ 0, /*nullifierOffset=*/ 0),
|
|
1070
|
+
new NullifierExists(/*addressing_mode=*/ 0, /*nullifierOffset=*/ 0, /*addressOffset=*/ 2, /*existsOffset=*/ 4),
|
|
1071
|
+
new Add(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
1072
|
+
Opcode.ADD_8,
|
|
1073
|
+
Add.wireFormat8,
|
|
1074
|
+
), // nullifier++
|
|
1036
1075
|
],
|
|
1037
1076
|
cleanupInstructions: () => [
|
|
1038
|
-
new Revert(/*
|
|
1077
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 3, /*returnOffset=*/ 0).as(
|
|
1078
|
+
Opcode.REVERT_8,
|
|
1079
|
+
Revert.wireFormat8,
|
|
1080
|
+
),
|
|
1039
1081
|
],
|
|
1040
1082
|
limit: MAX_NULLIFIERS_PER_TX - 1,
|
|
1041
1083
|
},
|
|
@@ -1049,7 +1091,12 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1049
1091
|
{ offset: 1, value: randomWithTag(TypeTag.UINT64) }, // random msgLeafIndex
|
|
1050
1092
|
],
|
|
1051
1093
|
targetInstructions: () => [
|
|
1052
|
-
new L1ToL2MessageExists(
|
|
1094
|
+
new L1ToL2MessageExists(
|
|
1095
|
+
/*addressing_mode=*/ 0,
|
|
1096
|
+
/*msgHashOffset=*/ 0,
|
|
1097
|
+
/*msgLeafIndexOffset=*/ 1,
|
|
1098
|
+
/*existsOffset=*/ 2,
|
|
1099
|
+
),
|
|
1053
1100
|
],
|
|
1054
1101
|
},
|
|
1055
1102
|
{
|
|
@@ -1060,7 +1107,12 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1060
1107
|
{ offset: 1, value: new Uint64(WARM_L1_TO_L2_MSG_LEAF_INDEX) }, // known msgLeafIndex
|
|
1061
1108
|
],
|
|
1062
1109
|
targetInstructions: () => [
|
|
1063
|
-
new L1ToL2MessageExists(
|
|
1110
|
+
new L1ToL2MessageExists(
|
|
1111
|
+
/*addressing_mode=*/ 0,
|
|
1112
|
+
/*msgHashOffset=*/ 0,
|
|
1113
|
+
/*msgLeafIndexOffset=*/ 1,
|
|
1114
|
+
/*existsOffset=*/ 2,
|
|
1115
|
+
),
|
|
1064
1116
|
],
|
|
1065
1117
|
},
|
|
1066
1118
|
],
|
|
@@ -1071,7 +1123,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1071
1123
|
// This ensures we're querying a valid deployed contract
|
|
1072
1124
|
setup: [
|
|
1073
1125
|
() => [
|
|
1074
|
-
new GetEnvVar(/*
|
|
1126
|
+
new GetEnvVar(/*addressing_mode=*/ 0, /*dstOffset=*/ 0, /*varEnum=*/ 0).as(
|
|
1075
1127
|
Opcode.GETENVVAR_16,
|
|
1076
1128
|
GetEnvVar.wireFormat16,
|
|
1077
1129
|
),
|
|
@@ -1079,7 +1131,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1079
1131
|
],
|
|
1080
1132
|
// memberEnum 0 = DEPLOYER
|
|
1081
1133
|
targetInstructions: () => [
|
|
1082
|
-
new GetContractInstance(/*
|
|
1134
|
+
new GetContractInstance(/*addressing_mode=*/ 0, /*addressOffset=*/ 0, /*dstOffset=*/ 1, /*memberEnum=*/ 0),
|
|
1083
1135
|
],
|
|
1084
1136
|
},
|
|
1085
1137
|
],
|
|
@@ -1093,9 +1145,12 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1093
1145
|
{ offset: 0, value: new Field(Fr.random()) }, // random noteHash
|
|
1094
1146
|
{ offset: 1, value: new Uint32(0n) }, // revertSize
|
|
1095
1147
|
],
|
|
1096
|
-
targetInstructions: () => [new EmitNoteHash(/*
|
|
1148
|
+
targetInstructions: () => [new EmitNoteHash(/*addressing_mode=*/ 0, /*noteHashOffset=*/ 0)],
|
|
1097
1149
|
cleanupInstructions: () => [
|
|
1098
|
-
new Revert(/*
|
|
1150
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 1, /*returnOffset=*/ 0).as(
|
|
1151
|
+
Opcode.REVERT_8,
|
|
1152
|
+
Revert.wireFormat8,
|
|
1153
|
+
),
|
|
1099
1154
|
], // revert with empty
|
|
1100
1155
|
limit: MAX_NOTE_HASHES_PER_TX,
|
|
1101
1156
|
},
|
|
@@ -1111,11 +1166,17 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1111
1166
|
{ offset: 2, value: new Uint32(0n) }, // revertSize
|
|
1112
1167
|
],
|
|
1113
1168
|
targetInstructions: () => [
|
|
1114
|
-
new EmitNullifier(/*
|
|
1115
|
-
new Add(/*
|
|
1169
|
+
new EmitNullifier(/*addressing_mode=*/ 0, /*nullifierOffset=*/ 0),
|
|
1170
|
+
new Add(/*addressing_mode=*/ 0, /*aOffset=*/ 0, /*bOffset=*/ 1, /*dstOffset=*/ 0).as(
|
|
1171
|
+
Opcode.ADD_8,
|
|
1172
|
+
Add.wireFormat8,
|
|
1173
|
+
), // nullifier++
|
|
1116
1174
|
],
|
|
1117
1175
|
cleanupInstructions: () => [
|
|
1118
|
-
new Revert(/*
|
|
1176
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 2, /*returnOffset=*/ 0).as(
|
|
1177
|
+
Opcode.REVERT_8,
|
|
1178
|
+
Revert.wireFormat8,
|
|
1179
|
+
),
|
|
1119
1180
|
], // revert with empty
|
|
1120
1181
|
limit: MAX_NULLIFIERS_PER_TX - 1, // minus 1 because a TX will always have 1 "TX nullifier" from private
|
|
1121
1182
|
},
|
|
@@ -1128,9 +1189,14 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1128
1189
|
{ offset: 1, value: new Field(Fr.random()) }, // random content
|
|
1129
1190
|
{ offset: 2, value: new Uint32(0n) }, // revertSize
|
|
1130
1191
|
],
|
|
1131
|
-
targetInstructions: () => [
|
|
1192
|
+
targetInstructions: () => [
|
|
1193
|
+
new SendL2ToL1Message(/*addressing_mode=*/ 0, /*recipientOffset=*/ 0, /*contentOffset=*/ 1),
|
|
1194
|
+
],
|
|
1132
1195
|
cleanupInstructions: () => [
|
|
1133
|
-
new Revert(/*
|
|
1196
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 2, /*returnOffset=*/ 0).as(
|
|
1197
|
+
Opcode.REVERT_8,
|
|
1198
|
+
Revert.wireFormat8,
|
|
1199
|
+
),
|
|
1134
1200
|
], // revert with empty
|
|
1135
1201
|
limit: MAX_L2_TO_L1_MSGS_PER_TX,
|
|
1136
1202
|
},
|
|
@@ -1147,9 +1213,12 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1147
1213
|
{ offset: 1, value: new Field(Fr.random()) }, // random slot (same slot each iteration)
|
|
1148
1214
|
{ offset: 2, value: new Uint32(0n) }, // revertSize
|
|
1149
1215
|
],
|
|
1150
|
-
targetInstructions: () => [new SStore(/*
|
|
1216
|
+
targetInstructions: () => [new SStore(/*addressing_mode=*/ 0, /*srcOffset=*/ 0, /*slotOffset=*/ 1)],
|
|
1151
1217
|
cleanupInstructions: () => [
|
|
1152
|
-
new Revert(/*
|
|
1218
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 2, /*returnOffset=*/ 0).as(
|
|
1219
|
+
Opcode.REVERT_8,
|
|
1220
|
+
Revert.wireFormat8,
|
|
1221
|
+
),
|
|
1153
1222
|
], // revert with empty
|
|
1154
1223
|
},
|
|
1155
1224
|
{
|
|
@@ -1161,11 +1230,17 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1161
1230
|
{ offset: 3, value: new Uint32(0n) }, // revertSize
|
|
1162
1231
|
],
|
|
1163
1232
|
targetInstructions: () => [
|
|
1164
|
-
new SStore(/*
|
|
1165
|
-
new Add(/*
|
|
1233
|
+
new SStore(/*addressing_mode=*/ 0, /*srcOffset=*/ 0, /*slotOffset=*/ 1),
|
|
1234
|
+
new Add(/*addressing_mode=*/ 0, /*aOffset=*/ 1, /*bOffset=*/ 2, /*dstOffset=*/ 1).as(
|
|
1235
|
+
Opcode.ADD_8,
|
|
1236
|
+
Add.wireFormat8,
|
|
1237
|
+
), // slot++
|
|
1166
1238
|
],
|
|
1167
1239
|
cleanupInstructions: () => [
|
|
1168
|
-
new Revert(/*
|
|
1240
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 3, /*returnOffset=*/ 0).as(
|
|
1241
|
+
Opcode.REVERT_8,
|
|
1242
|
+
Revert.wireFormat8,
|
|
1243
|
+
),
|
|
1169
1244
|
], // revert with empty
|
|
1170
1245
|
limit: MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
|
|
1171
1246
|
},
|
|
@@ -1179,9 +1254,14 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1179
1254
|
{ offset: 0, value: new Uint32(0n) }, // logSize = 0 fields (minimal)
|
|
1180
1255
|
{ offset: 1, value: new Uint32(0n) }, // revertSize
|
|
1181
1256
|
],
|
|
1182
|
-
targetInstructions: () => [
|
|
1257
|
+
targetInstructions: () => [
|
|
1258
|
+
new EmitUnencryptedLog(/*addressing_mode=*/ 0, /*logSizeOffset=*/ 0, /*logOffset=*/ 1),
|
|
1259
|
+
], // logOffset doesn't matter when size is 0
|
|
1183
1260
|
cleanupInstructions: () => [
|
|
1184
|
-
new Revert(/*
|
|
1261
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 1, /*returnOffset=*/ 0).as(
|
|
1262
|
+
Opcode.REVERT_8,
|
|
1263
|
+
Revert.wireFormat8,
|
|
1264
|
+
),
|
|
1185
1265
|
], // revert with empty
|
|
1186
1266
|
// Max logs with 0-field content: floor(4096 / 2) = 2048
|
|
1187
1267
|
limit: Math.floor(FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH / PUBLIC_LOG_HEADER_LENGTH),
|
|
@@ -1200,9 +1280,14 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1200
1280
|
// value: new Field(0n),
|
|
1201
1281
|
//})),
|
|
1202
1282
|
],
|
|
1203
|
-
targetInstructions: () => [
|
|
1283
|
+
targetInstructions: () => [
|
|
1284
|
+
new EmitUnencryptedLog(/*addressing_mode=*/ 0, /*logSizeOffset=*/ 0, /*logOffset=*/ 2),
|
|
1285
|
+
], // uses logOffset 2 (uninitialized Field(0))
|
|
1204
1286
|
cleanupInstructions: () => [
|
|
1205
|
-
new Revert(/*
|
|
1287
|
+
new Revert(/*addressing_mode=*/ 0, /*retSizeOffset=*/ 1, /*returnOffset=*/ 0).as(
|
|
1288
|
+
Opcode.REVERT_8,
|
|
1289
|
+
Revert.wireFormat8,
|
|
1290
|
+
),
|
|
1206
1291
|
], // revert with empty
|
|
1207
1292
|
limit: 1, // Only 1 max-size log fits
|
|
1208
1293
|
},
|
|
@@ -1219,7 +1304,9 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1219
1304
|
value: new Field(Fr.random()), // random field element
|
|
1220
1305
|
})),
|
|
1221
1306
|
// Poseidon hash data at M[0..3], write result to M[0:3] (reuse results as next inputs)
|
|
1222
|
-
targetInstructions: () => [
|
|
1307
|
+
targetInstructions: () => [
|
|
1308
|
+
new Poseidon2(/*addressing_mode=*/ 0, /*inputStateOffset=*/ 0, /*outputStateOffset=*/ 0),
|
|
1309
|
+
],
|
|
1223
1310
|
},
|
|
1224
1311
|
],
|
|
1225
1312
|
|
|
@@ -1238,7 +1325,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1238
1325
|
})),
|
|
1239
1326
|
],
|
|
1240
1327
|
targetInstructions: () => [
|
|
1241
|
-
new Sha256Compression(/*
|
|
1328
|
+
new Sha256Compression(/*addressing_mode=*/ 0, /*outputOffset=*/ 0, /*stateOffset=*/ 0, /*inputsOffset=*/ 8),
|
|
1242
1329
|
],
|
|
1243
1330
|
},
|
|
1244
1331
|
],
|
|
@@ -1250,7 +1337,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1250
1337
|
offset: i,
|
|
1251
1338
|
value: randomWithTag(TypeTag.UINT64),
|
|
1252
1339
|
})),
|
|
1253
|
-
targetInstructions: () => [new KeccakF1600(/*
|
|
1340
|
+
targetInstructions: () => [new KeccakF1600(/*addressing_mode=*/ 0, /*dstOffset=*/ 0, /*inputOffset=*/ 0)],
|
|
1254
1341
|
},
|
|
1255
1342
|
],
|
|
1256
1343
|
|
|
@@ -1267,7 +1354,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1267
1354
|
],
|
|
1268
1355
|
targetInstructions: () => [
|
|
1269
1356
|
new EcAdd(
|
|
1270
|
-
/*
|
|
1357
|
+
/*addressing_mode=*/ 0,
|
|
1271
1358
|
/*p1XOffset=*/ 0,
|
|
1272
1359
|
/*p1YOffset=*/ 1,
|
|
1273
1360
|
/*p1IsInfiniteOffset=*/ 2,
|
|
@@ -1292,7 +1379,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1292
1379
|
],
|
|
1293
1380
|
targetInstructions: () => [
|
|
1294
1381
|
new ToRadixBE(
|
|
1295
|
-
/*
|
|
1382
|
+
/*addressing_mode=*/ 0,
|
|
1296
1383
|
/*srcOffset=*/ 0,
|
|
1297
1384
|
/*radixOffset=*/ 1,
|
|
1298
1385
|
/*numLimbsOffset=*/ 2,
|
|
@@ -1311,7 +1398,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1311
1398
|
],
|
|
1312
1399
|
targetInstructions: () => [
|
|
1313
1400
|
new ToRadixBE(
|
|
1314
|
-
/*
|
|
1401
|
+
/*addressing_mode=*/ 0,
|
|
1315
1402
|
/*srcOffset=*/ 0,
|
|
1316
1403
|
/*radixOffset=*/ 1,
|
|
1317
1404
|
/*numLimbsOffset=*/ 2,
|
|
@@ -1332,7 +1419,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1332
1419
|
],
|
|
1333
1420
|
targetInstructions: () => [
|
|
1334
1421
|
new ToRadixBE(
|
|
1335
|
-
/*
|
|
1422
|
+
/*addressing_mode=*/ 0,
|
|
1336
1423
|
/*srcOffset=*/ 0,
|
|
1337
1424
|
/*radixOffset=*/ 1,
|
|
1338
1425
|
/*numLimbsOffset=*/ 2,
|
|
@@ -1359,7 +1446,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1359
1446
|
// messageSize = 0
|
|
1360
1447
|
targetInstructions: () => [
|
|
1361
1448
|
new DebugLog(
|
|
1362
|
-
/*
|
|
1449
|
+
/*addressing_mode=*/ 0,
|
|
1363
1450
|
/*levelOffset=*/ 0,
|
|
1364
1451
|
/*messageOffset=*/ 1,
|
|
1365
1452
|
/*fieldsOffset=*/ 2,
|
|
@@ -1381,7 +1468,7 @@ export const SPAM_CONFIGS: Partial<Record<Opcode, SpamConfig[]>> = {
|
|
|
1381
1468
|
// // messageSize = 1000 (large enough to show scaling)
|
|
1382
1469
|
// targetInstructions: () => [
|
|
1383
1470
|
// new DebugLog(
|
|
1384
|
-
// /*
|
|
1471
|
+
// /*addressing_mode=*/ 0,
|
|
1385
1472
|
// /*levelOffset=*/ 0,
|
|
1386
1473
|
// /*messageOffset=*/ 1,
|
|
1387
1474
|
// /*fieldsOffset=*/ 2,
|