@lodestar/beacon-node 1.43.0-dev.2740f92909 → 1.43.0-dev.433e692fd9

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.
Files changed (105) hide show
  1. package/lib/api/impl/validator/index.d.ts.map +1 -1
  2. package/lib/api/impl/validator/index.js +4 -3
  3. package/lib/api/impl/validator/index.js.map +1 -1
  4. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
  5. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +2 -4
  6. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
  7. package/lib/chain/blocks/importBlock.d.ts.map +1 -1
  8. package/lib/chain/blocks/importBlock.js +24 -28
  9. package/lib/chain/blocks/importBlock.js.map +1 -1
  10. package/lib/chain/blocks/importExecutionPayload.js +2 -2
  11. package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
  12. package/lib/chain/blocks/index.js +1 -1
  13. package/lib/chain/blocks/index.js.map +1 -1
  14. package/lib/chain/blocks/types.d.ts +1 -1
  15. package/lib/chain/blocks/types.d.ts.map +1 -1
  16. package/lib/chain/chain.d.ts.map +1 -1
  17. package/lib/chain/chain.js +17 -37
  18. package/lib/chain/chain.js.map +1 -1
  19. package/lib/chain/errors/attestationError.d.ts +8 -1
  20. package/lib/chain/errors/attestationError.d.ts.map +1 -1
  21. package/lib/chain/errors/attestationError.js +4 -0
  22. package/lib/chain/errors/attestationError.js.map +1 -1
  23. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  24. package/lib/chain/forkChoice/index.js +6 -2
  25. package/lib/chain/forkChoice/index.js.map +1 -1
  26. package/lib/chain/prepareNextSlot.d.ts.map +1 -1
  27. package/lib/chain/prepareNextSlot.js +2 -6
  28. package/lib/chain/prepareNextSlot.js.map +1 -1
  29. package/lib/chain/produceBlock/computeNewStateRoot.d.ts +3 -9
  30. package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
  31. package/lib/chain/produceBlock/computeNewStateRoot.js +5 -32
  32. package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
  33. package/lib/chain/produceBlock/produceBlockBody.d.ts +0 -6
  34. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  35. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  36. package/lib/chain/regen/errors.d.ts +1 -11
  37. package/lib/chain/regen/errors.d.ts.map +1 -1
  38. package/lib/chain/regen/errors.js +0 -2
  39. package/lib/chain/regen/errors.js.map +1 -1
  40. package/lib/chain/regen/interface.d.ts +6 -12
  41. package/lib/chain/regen/interface.d.ts.map +1 -1
  42. package/lib/chain/regen/queued.d.ts +6 -11
  43. package/lib/chain/regen/queued.d.ts.map +1 -1
  44. package/lib/chain/regen/queued.js +8 -40
  45. package/lib/chain/regen/queued.js.map +1 -1
  46. package/lib/chain/regen/regen.d.ts +0 -5
  47. package/lib/chain/regen/regen.d.ts.map +1 -1
  48. package/lib/chain/regen/regen.js +7 -34
  49. package/lib/chain/regen/regen.js.map +1 -1
  50. package/lib/chain/stateCache/datastore/db.d.ts +5 -4
  51. package/lib/chain/stateCache/datastore/db.d.ts.map +1 -1
  52. package/lib/chain/stateCache/datastore/db.js +10 -32
  53. package/lib/chain/stateCache/datastore/db.js.map +1 -1
  54. package/lib/chain/stateCache/datastore/file.d.ts +1 -1
  55. package/lib/chain/stateCache/datastore/file.d.ts.map +1 -1
  56. package/lib/chain/stateCache/datastore/file.js +5 -5
  57. package/lib/chain/stateCache/datastore/file.js.map +1 -1
  58. package/lib/chain/stateCache/datastore/types.d.ts +1 -1
  59. package/lib/chain/stateCache/datastore/types.d.ts.map +1 -1
  60. package/lib/chain/stateCache/fifoBlockStateCache.d.ts +1 -7
  61. package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
  62. package/lib/chain/stateCache/fifoBlockStateCache.js +0 -8
  63. package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
  64. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +13 -30
  65. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
  66. package/lib/chain/stateCache/persistentCheckpointsCache.js +116 -215
  67. package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
  68. package/lib/chain/stateCache/types.d.ts +8 -15
  69. package/lib/chain/stateCache/types.d.ts.map +1 -1
  70. package/lib/chain/stateCache/types.js.map +1 -1
  71. package/lib/chain/validation/aggregateAndProof.js +12 -0
  72. package/lib/chain/validation/aggregateAndProof.js.map +1 -1
  73. package/lib/chain/validation/attestation.d.ts.map +1 -1
  74. package/lib/chain/validation/attestation.js +12 -0
  75. package/lib/chain/validation/attestation.js.map +1 -1
  76. package/lib/chain/validation/executionPayloadEnvelope.js +2 -2
  77. package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
  78. package/lib/network/gossip/topic.d.ts +2 -729
  79. package/lib/network/gossip/topic.d.ts.map +1 -1
  80. package/package.json +15 -15
  81. package/src/api/impl/validator/index.ts +6 -5
  82. package/src/chain/archiveStore/strategies/frequencyStateArchiveStrategy.ts +2 -4
  83. package/src/chain/blocks/importBlock.ts +23 -28
  84. package/src/chain/blocks/importExecutionPayload.ts +2 -2
  85. package/src/chain/blocks/index.ts +1 -1
  86. package/src/chain/blocks/types.ts +1 -1
  87. package/src/chain/chain.ts +16 -47
  88. package/src/chain/errors/attestationError.ts +6 -1
  89. package/src/chain/forkChoice/index.ts +6 -2
  90. package/src/chain/prepareNextSlot.ts +2 -6
  91. package/src/chain/produceBlock/computeNewStateRoot.ts +6 -43
  92. package/src/chain/produceBlock/produceBlockBody.ts +0 -6
  93. package/src/chain/regen/errors.ts +1 -6
  94. package/src/chain/regen/interface.ts +6 -12
  95. package/src/chain/regen/queued.ts +12 -48
  96. package/src/chain/regen/regen.ts +8 -36
  97. package/src/chain/stateCache/datastore/db.ts +10 -33
  98. package/src/chain/stateCache/datastore/file.ts +5 -6
  99. package/src/chain/stateCache/datastore/types.ts +2 -3
  100. package/src/chain/stateCache/fifoBlockStateCache.ts +1 -10
  101. package/src/chain/stateCache/persistentCheckpointsCache.ts +135 -246
  102. package/src/chain/stateCache/types.ts +8 -14
  103. package/src/chain/validation/aggregateAndProof.ts +13 -0
  104. package/src/chain/validation/attestation.ts +13 -0
  105. package/src/chain/validation/executionPayloadEnvelope.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["../../../src/network/gossip/topic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAEL,QAAQ,EAMT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAE,iBAAiB,EAAmB,MAAM,iBAAiB,CAAC;AAEjF,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAiB,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEjH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC;CACzC;AAED,qBAAa,gBAAiB,YAAW,iBAAiB;IAG5C,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAF9C,OAAO,CAAC,gBAAgB,CAA4C;IAEpE,YAA6B,iBAAiB,EAAE,iBAAiB,EAAI;IAErE,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAQtC;IAED,8DAA8D;IAC9D,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEvD;IAED,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAInD;CACF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,GAAG,MAAM,CAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyClD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAOnH;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,GAAG,WAAW,CAMjG;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,GAAG,iBAAiB,CAS7G;AAMD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,CAyD9G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE;IAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAAC,wBAAwB,CAAC,EAAE,OAAO,CAAA;CAAC,GACxE,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,EAAE,CA2DhD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,GAC3B,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,EAAE,CAShD;AAgBD,eAAO,MAAM,sCAAsC,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,CAiB9E,CAAC"}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.43.0-dev.2740f92909",
14
+ "version": "1.43.0-dev.433e692fd9",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -135,18 +135,18 @@
135
135
  "@libp2p/peer-id": "^6.0.4",
136
136
  "@libp2p/prometheus-metrics": "^5.0.14",
137
137
  "@libp2p/tcp": "^11.0.13",
138
- "@lodestar/api": "^1.43.0-dev.2740f92909",
139
- "@lodestar/config": "^1.43.0-dev.2740f92909",
140
- "@lodestar/db": "^1.43.0-dev.2740f92909",
141
- "@lodestar/fork-choice": "^1.43.0-dev.2740f92909",
142
- "@lodestar/light-client": "^1.43.0-dev.2740f92909",
143
- "@lodestar/logger": "^1.43.0-dev.2740f92909",
144
- "@lodestar/params": "^1.43.0-dev.2740f92909",
145
- "@lodestar/reqresp": "^1.43.0-dev.2740f92909",
146
- "@lodestar/state-transition": "^1.43.0-dev.2740f92909",
147
- "@lodestar/types": "^1.43.0-dev.2740f92909",
148
- "@lodestar/utils": "^1.43.0-dev.2740f92909",
149
- "@lodestar/validator": "^1.43.0-dev.2740f92909",
138
+ "@lodestar/api": "^1.43.0-dev.433e692fd9",
139
+ "@lodestar/config": "^1.43.0-dev.433e692fd9",
140
+ "@lodestar/db": "^1.43.0-dev.433e692fd9",
141
+ "@lodestar/fork-choice": "^1.43.0-dev.433e692fd9",
142
+ "@lodestar/light-client": "^1.43.0-dev.433e692fd9",
143
+ "@lodestar/logger": "^1.43.0-dev.433e692fd9",
144
+ "@lodestar/params": "^1.43.0-dev.433e692fd9",
145
+ "@lodestar/reqresp": "^1.43.0-dev.433e692fd9",
146
+ "@lodestar/state-transition": "^1.43.0-dev.433e692fd9",
147
+ "@lodestar/types": "^1.43.0-dev.433e692fd9",
148
+ "@lodestar/utils": "^1.43.0-dev.433e692fd9",
149
+ "@lodestar/validator": "^1.43.0-dev.433e692fd9",
150
150
  "@multiformats/multiaddr": "^13.0.1",
151
151
  "datastore-core": "^11.0.2",
152
152
  "datastore-fs": "^11.0.2",
@@ -169,7 +169,7 @@
169
169
  "@libp2p/interface-internal": "^3.0.13",
170
170
  "@libp2p/logger": "^6.2.2",
171
171
  "@libp2p/utils": "^7.0.13",
172
- "@lodestar/spec-test-util": "^1.43.0-dev.2740f92909",
172
+ "@lodestar/spec-test-util": "^1.43.0-dev.433e692fd9",
173
173
  "@types/js-yaml": "^4.0.5",
174
174
  "@types/qs": "^6.9.7",
175
175
  "@types/tmp": "^0.2.3",
@@ -186,5 +186,5 @@
186
186
  "beacon",
187
187
  "blockchain"
188
188
  ],
189
- "gitHead": "ca082739323537e636d41772433e6dc57c9d6067"
189
+ "gitHead": "b8bf3b10fd0b28c213c5eba705b3af9ba08983c8"
190
190
  }
@@ -70,7 +70,7 @@ import {ChainEvent, CommonBlockBody} from "../../../chain/index.js";
70
70
  import {PREPARE_NEXT_SLOT_BPS} from "../../../chain/prepareNextSlot.js";
71
71
  import {BlockType, ProduceFullDeneb, ProduceFullGloas} from "../../../chain/produceBlock/index.js";
72
72
  import {RegenCaller} from "../../../chain/regen/index.js";
73
- import {CheckpointHexPayload} from "../../../chain/stateCache/types.js";
73
+ import {CheckpointHex} from "../../../chain/stateCache/types.js";
74
74
  import {validateApiAggregateAndProof} from "../../../chain/validation/index.js";
75
75
  import {validateSyncCommitteeGossipContributionAndProof} from "../../../chain/validation/syncCommitteeContributionAndProof.js";
76
76
  import {ZERO_HASH} from "../../../constants/index.js";
@@ -301,7 +301,7 @@ export function getValidatorApi(
301
301
  * |
302
302
  * prepareNextSlot (4s before next slot)
303
303
  */
304
- async function waitForCheckpointState(cpHex: CheckpointHexPayload): Promise<IBeaconStateView | null> {
304
+ async function waitForCheckpointState(cpHex: CheckpointHex): Promise<IBeaconStateView | null> {
305
305
  const cpState = chain.regen.getCheckpointStateSync(cpHex);
306
306
  if (cpState) {
307
307
  return cpState;
@@ -1113,7 +1113,6 @@ export function getValidatorApi(
1113
1113
  const cpState = await waitForCheckpointState({
1114
1114
  rootHex: head.blockRoot,
1115
1115
  epoch,
1116
- payloadPresent: head.payloadStatus === PayloadStatus.FULL,
1117
1116
  });
1118
1117
  if (cpState) {
1119
1118
  state = cpState;
@@ -1642,7 +1641,7 @@ export function getValidatorApi(
1642
1641
  throw Error("Cached block production result is not full block");
1643
1642
  }
1644
1643
 
1645
- const {executionPayload, executionRequests, payloadEnvelopeStateRoot} = produceResult as ProduceFullGloas;
1644
+ const {executionPayload, executionRequests} = produceResult as ProduceFullGloas;
1646
1645
 
1647
1646
  const envelope: gloas.ExecutionPayloadEnvelope = {
1648
1647
  payload: executionPayload,
@@ -1650,7 +1649,9 @@ export function getValidatorApi(
1650
1649
  builderIndex: BUILDER_INDEX_SELF_BUILD,
1651
1650
  beaconBlockRoot,
1652
1651
  slot,
1653
- stateRoot: payloadEnvelopeStateRoot,
1652
+ // TODO GLOAS: stateRoot is no longer computed during block production.
1653
+ // This field will be removed when we implement defer payload processing
1654
+ stateRoot: ZERO_HASH,
1654
1655
  };
1655
1656
 
1656
1657
  logger.info("Produced execution payload envelope", {
@@ -9,7 +9,6 @@ import {AllocSource, BufferPool} from "../../../util/bufferPool.js";
9
9
  import {getStateSlotFromBytes} from "../../../util/multifork.js";
10
10
  import {IStateRegenerator} from "../../regen/interface.js";
11
11
  import {serializeState} from "../../serializeState.js";
12
- import {fcCheckpointToHexPayload} from "../../stateCache/persistentCheckpointsCache.js";
13
12
  import {StateArchiveStrategy, StatesArchiveOpts} from "../interface.js";
14
13
 
15
14
  /**
@@ -108,9 +107,8 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
108
107
  async archiveState(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void> {
109
108
  // starting from Mar 2024, the finalized state could be from disk or in memory
110
109
  let timer = metrics?.processFinalizedCheckpoint.frequencyStateArchive.startTimer();
111
- // Convert fork-choice checkpoint to beacon-node checkpoint with payloadPresent
112
- const finalizedHexPayload = fcCheckpointToHexPayload(finalized);
113
- const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHexPayload);
110
+ const finalizedHex = {epoch: finalized.epoch, rootHex: finalized.rootHex};
111
+ const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHex);
114
112
  timer?.({step: FrequencyStateArchiveStep.GetFinalizedState});
115
113
 
116
114
  const {rootHex} = finalized;
@@ -8,7 +8,6 @@ import {
8
8
  ForkChoiceErrorCode,
9
9
  NotReorgedReason,
10
10
  getSafeExecutionBlockHash,
11
- isGloasBlock,
12
11
  } from "@lodestar/fork-choice";
13
12
  import {
14
13
  ForkPostAltair,
@@ -48,7 +47,7 @@ import type {BeaconChain} from "../chain.js";
48
47
  import {ChainEvent, ReorgEventData} from "../emitter.js";
49
48
  import {ForkchoiceCaller} from "../forkChoice/index.js";
50
49
  import {REPROCESS_MIN_TIME_TO_NEXT_SLOT_SEC} from "../reprocess.js";
51
- import {toCheckpointHexPayload} from "../stateCache/persistentCheckpointsCache.js";
50
+ import {toCheckpointHex} from "../stateCache/persistentCheckpointsCache.js";
52
51
  import {isBlockInputBlobs, isBlockInputColumns} from "./blockInput/blockInput.js";
53
52
  import {AttestationImportOpt, FullyVerifiedBlock, ImportBlockOpts} from "./types.js";
54
53
  import {getCheckpointFromState} from "./utils/checkpoint.js";
@@ -87,7 +86,7 @@ export async function importBlock(
87
86
  fullyVerifiedBlock: FullyVerifiedBlock,
88
87
  opts: ImportBlockOpts
89
88
  ): Promise<void> {
90
- const {blockInput, postBlockState, parentBlockSlot, executionStatus, dataAvailabilityStatus, indexedAttestations} =
89
+ const {blockInput, postState, parentBlockSlot, executionStatus, dataAvailabilityStatus, indexedAttestations} =
91
90
  fullyVerifiedBlock;
92
91
  const block = blockInput.getBlock();
93
92
  const source = blockInput.getBlockSource();
@@ -99,7 +98,7 @@ export async function importBlock(
99
98
  const blockEpoch = computeEpochAtSlot(blockSlot);
100
99
  const prevFinalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
101
100
  const blockDelaySec =
102
- fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot, postBlockState.genesisTime);
101
+ fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot, postState.genesisTime);
103
102
  const recvToValLatency = Date.now() / 1000 - (opts.seenTimestampSec ?? Date.now() / 1000);
104
103
  const fork = this.config.getForkSeq(blockSlot);
105
104
 
@@ -122,10 +121,10 @@ export async function importBlock(
122
121
  // 2. Import block to fork choice
123
122
 
124
123
  // Should compute checkpoint balances before forkchoice.onBlock
125
- this.checkpointBalancesCache.processState(blockRootHex, postBlockState);
124
+ this.checkpointBalancesCache.processState(blockRootHex, postState);
126
125
  const blockSummary = this.forkChoice.onBlock(
127
126
  block.message,
128
- postBlockState,
127
+ postState,
129
128
  blockDelaySec,
130
129
  currentSlot,
131
130
  fork >= ForkSeq.gloas ? ExecutionStatus.PayloadSeparated : executionStatus,
@@ -134,11 +133,7 @@ export async function importBlock(
134
133
 
135
134
  // This adds the state necessary to process the next block
136
135
  // Some block event handlers require state being in state cache so need to do this before emitting EventType.block
137
- // Pre-Gloas: blockSummary.payloadStatus is always FULL, payloadPresent = true
138
- // Post-Gloas: blockSummary.payloadStatus is always PENDING, so payloadPresent = false (block state only, no payload processing yet)
139
- const payloadPresent = !isGloasBlock(blockSummary);
140
- // processState manages both block state and payload state variants together for memory/disk management
141
- this.regen.processBlockState(blockRootHex, postBlockState);
136
+ this.regen.processState(blockRootHex, postState);
142
137
 
143
138
  // For Gloas blocks, create PayloadEnvelopeInput so it's available for later payload import
144
139
  if (fork >= ForkSeq.gloas) {
@@ -191,7 +186,7 @@ export async function importBlock(
191
186
  (opts.importAttestations !== AttestationImportOpt.Skip && blockEpoch >= currentEpoch - FORK_CHOICE_ATT_EPOCH_LIMIT)
192
187
  ) {
193
188
  const attestations = block.message.body.attestations;
194
- const rootCache = new RootCache(postBlockState);
189
+ const rootCache = new RootCache(postState);
195
190
  const invalidAttestationErrorsByCode = new Map<string, {error: Error; count: number}>();
196
191
 
197
192
  const addAttestation = fork >= ForkSeq.electra ? addAttestationPostElectra : addAttestationPreElectra;
@@ -205,7 +200,7 @@ export async function importBlock(
205
200
  const attDataRoot = toRootHex(ssz.phase0.AttestationData.hashTreeRoot(indexedAttestation.data));
206
201
  addAttestation.call(
207
202
  this,
208
- postBlockState,
203
+ postState,
209
204
  target,
210
205
  attDataRoot,
211
206
  attestation as Attestation<ForkPostElectra>,
@@ -320,7 +315,7 @@ export async function importBlock(
320
315
 
321
316
  if (newHead.blockRoot !== oldHead.blockRoot) {
322
317
  // Set head state as strong reference
323
- this.regen.updateHeadState(newHead, postBlockState);
318
+ this.regen.updateHeadState(newHead, postState);
324
319
 
325
320
  try {
326
321
  this.emitter.emit(routes.events.EventType.head, {
@@ -390,10 +385,10 @@ export async function importBlock(
390
385
  // we want to import block asap so do this in the next event loop
391
386
  callInNextEventLoop(() => {
392
387
  try {
393
- if (isStatePostAltair(postBlockState)) {
388
+ if (isStatePostAltair(postState)) {
394
389
  this.lightClientServer?.onImportBlockHead(
395
390
  block.message as BeaconBlock<ForkPostAltair>,
396
- postBlockState,
391
+ postState,
397
392
  parentBlockSlot
398
393
  );
399
394
  }
@@ -415,11 +410,11 @@ export async function importBlock(
415
410
  // and the block is weak and can potentially be reorged out.
416
411
  let shouldOverrideFcu = false;
417
412
 
418
- if (blockSlot >= currentSlot && isStatePostBellatrix(postBlockState) && postBlockState.isExecutionStateType) {
413
+ if (blockSlot >= currentSlot && isStatePostBellatrix(postState) && postState.isExecutionStateType) {
419
414
  let notOverrideFcuReason = NotReorgedReason.Unknown;
420
415
  const proposalSlot = blockSlot + 1;
421
416
  try {
422
- const proposerIndex = postBlockState.getBeaconProposer(proposalSlot);
417
+ const proposerIndex = postState.getBeaconProposer(proposalSlot);
423
418
  const feeRecipient = this.beaconProposerCache.get(proposerIndex);
424
419
 
425
420
  if (feeRecipient) {
@@ -499,27 +494,27 @@ export async function importBlock(
499
494
  }
500
495
  }
501
496
 
502
- if (!postBlockState.isStateValidatorsNodesPopulated()) {
503
- this.logger.verbose("After importBlock caching postState without SSZ cache", {slot: postBlockState.slot});
497
+ if (!postState.isStateValidatorsNodesPopulated()) {
498
+ this.logger.verbose("After importBlock caching postState without SSZ cache", {slot: postState.slot});
504
499
  }
505
500
 
506
501
  // Cache shufflings when crossing an epoch boundary
507
502
  const parentEpoch = computeEpochAtSlot(parentBlockSlot);
508
503
  if (parentEpoch < blockEpoch) {
509
- this.shufflingCache.processState(postBlockState);
504
+ this.shufflingCache.processState(postState);
510
505
  this.logger.verbose("Processed shuffling for next epoch", {parentEpoch, blockEpoch, slot: blockSlot});
511
506
  }
512
507
 
513
508
  if (blockSlot % SLOTS_PER_EPOCH === 0) {
514
509
  // Cache state to preserve epoch transition work
515
- const checkpointState = postBlockState;
510
+ const checkpointState = postState;
516
511
  const cp = getCheckpointFromState(checkpointState);
517
- this.regen.addCheckpointState(cp, checkpointState, payloadPresent);
512
+ this.regen.addCheckpointState(cp, checkpointState);
518
513
  // consumers should not mutate state ever
519
514
  this.emitter.emit(ChainEvent.checkpoint, cp, checkpointState);
520
515
 
521
516
  // Note: in-lined code from previos handler of ChainEvent.checkpoint
522
- this.logger.verbose("Checkpoint processed", toCheckpointHexPayload(cp, payloadPresent));
517
+ this.logger.verbose("Checkpoint processed", toCheckpointHex(cp));
523
518
 
524
519
  const activeValidatorsCount = checkpointState.activeValidatorCount;
525
520
  this.metrics?.currentActiveValidators.set(activeValidatorsCount);
@@ -537,7 +532,7 @@ export async function importBlock(
537
532
  const justifiedEpoch = justifiedCheckpoint.epoch;
538
533
  const preJustifiedEpoch = parentBlockSummary.justifiedEpoch;
539
534
  if (justifiedEpoch > preJustifiedEpoch) {
540
- this.logger.verbose("Checkpoint justified", toCheckpointHexPayload(justifiedCheckpoint, payloadPresent));
535
+ this.logger.verbose("Checkpoint justified", toCheckpointHex(justifiedCheckpoint));
541
536
  this.metrics?.previousJustifiedEpoch.set(checkpointState.previousJustifiedCheckpoint.epoch);
542
537
  this.metrics?.currentJustifiedEpoch.set(justifiedCheckpoint.epoch);
543
538
  }
@@ -551,7 +546,7 @@ export async function importBlock(
551
546
  state: toRootHex(checkpointState.hashTreeRoot()),
552
547
  executionOptimistic: false,
553
548
  });
554
- this.logger.verbose("Checkpoint finalized", toCheckpointHexPayload(finalizedCheckpoint, payloadPresent));
549
+ this.logger.verbose("Checkpoint finalized", toCheckpointHex(finalizedCheckpoint));
555
550
  this.metrics?.finalizedEpoch.set(finalizedCheckpoint.epoch);
556
551
  }
557
552
  }
@@ -602,11 +597,11 @@ export async function importBlock(
602
597
  this.metrics?.parentBlockDistance.observe(blockSlot - parentBlockSlot);
603
598
  this.metrics?.proposerBalanceDeltaAny.observe(fullyVerifiedBlock.proposerBalanceDelta);
604
599
  this.validatorMonitor?.registerImportedBlock(block.message, fullyVerifiedBlock);
605
- if (isStatePostAltair(fullyVerifiedBlock.postBlockState)) {
600
+ if (isStatePostAltair(fullyVerifiedBlock.postState)) {
606
601
  this.validatorMonitor?.registerSyncAggregateInBlock(
607
602
  blockEpoch,
608
603
  (block as altair.SignedBeaconBlock).message.body.syncAggregate,
609
- fullyVerifiedBlock.postBlockState.currentSyncCommitteeIndexed.validatorIndices
604
+ fullyVerifiedBlock.postState.currentSyncCommitteeIndexed.validatorIndices
610
605
  );
611
606
  }
612
607
 
@@ -240,10 +240,10 @@ export async function importExecutionPayload(
240
240
  );
241
241
 
242
242
  // 8. Cache payload state
243
- this.regen.processPayloadState(postPayloadState);
243
+ this.regen.processState(blockRootHex, postPayloadState);
244
244
  if (postPayloadState.slot % SLOTS_PER_EPOCH === 0) {
245
245
  const {checkpoint} = postPayloadState.computeAnchorCheckpoint();
246
- this.regen.addCheckpointState(checkpoint, postPayloadState, true);
246
+ this.regen.addCheckpointState(checkpoint, postPayloadState);
247
247
  }
248
248
 
249
249
  // 9. Record metrics for payload envelope and column sources
@@ -88,7 +88,7 @@ export async function processBlocks(
88
88
  const fullyVerifiedBlocks = relevantBlocks.map(
89
89
  (block, i): FullyVerifiedBlock => ({
90
90
  blockInput: block,
91
- postBlockState: postStates[i],
91
+ postState: postStates[i],
92
92
  postPayloadState: null,
93
93
  parentBlockSlot: parentSlots[i],
94
94
  executionStatus: executionStatuses[i],
@@ -90,7 +90,7 @@ export type ImportBlockOpts = {
90
90
 
91
91
  type FullyVerifiedBlockBase = {
92
92
  blockInput: IBlockInput;
93
- postBlockState: IBeaconStateView;
93
+ postState: IBeaconStateView;
94
94
  parentBlockSlot: Slot;
95
95
  proposerBalanceDelta: number;
96
96
  dataAvailabilityStatus: DataAvailabilityStatus;
@@ -2,17 +2,9 @@ import path from "node:path";
2
2
  import {PrivateKey} from "@libp2p/interface";
3
3
  import {Type} from "@chainsafe/ssz";
4
4
  import {BeaconConfig} from "@lodestar/config";
5
- import {
6
- CheckpointWithPayloadStatus,
7
- IForkChoice,
8
- PayloadStatus,
9
- ProtoBlock,
10
- UpdateHeadOpt,
11
- getCheckpointPayloadStatus,
12
- } from "@lodestar/fork-choice";
5
+ import {CheckpointWithPayloadStatus, IForkChoice, ProtoBlock, UpdateHeadOpt} from "@lodestar/fork-choice";
13
6
  import {LoggerNode} from "@lodestar/logger/node";
14
7
  import {
15
- BUILDER_INDEX_SELF_BUILD,
16
8
  EFFECTIVE_BALANCE_INCREMENT,
17
9
  type ForkPostFulu,
18
10
  type ForkPostGloas,
@@ -31,7 +23,6 @@ import {
31
23
  getEffectiveBalancesFromStateBytes,
32
24
  isStatePostAltair,
33
25
  isStatePostElectra,
34
- isStatePostGloas,
35
26
  } from "@lodestar/state-transition";
36
27
  import {
37
28
  BeaconBlock,
@@ -100,8 +91,8 @@ import {
100
91
  } from "./opPools/index.js";
101
92
  import {IChainOptions} from "./options.js";
102
93
  import {PrepareNextSlotScheduler} from "./prepareNextSlot.js";
103
- import {computeNewStateRoot, computePayloadEnvelopeStateRoot} from "./produceBlock/computeNewStateRoot.js";
104
- import {AssembledBlockType, BlockType, ProduceFullGloas, ProduceResult} from "./produceBlock/index.js";
94
+ import {computeNewStateRoot} from "./produceBlock/computeNewStateRoot.js";
95
+ import {AssembledBlockType, BlockType, ProduceResult} from "./produceBlock/index.js";
105
96
  import {BlockAttributes, produceBlockBody, produceCommonBlockBody} from "./produceBlock/produceBlockBody.js";
106
97
  import {QueuedStateRegenerator, RegenCaller} from "./regen/index.js";
107
98
  import {ReprocessController} from "./reprocess.js";
@@ -125,7 +116,7 @@ import {DbCPStateDatastore, checkpointToDatastoreKey} from "./stateCache/datasto
125
116
  import {FileCPStateDatastore} from "./stateCache/datastore/file.js";
126
117
  import {CPStateDatastore} from "./stateCache/datastore/types.js";
127
118
  import {FIFOBlockStateCache} from "./stateCache/fifoBlockStateCache.js";
128
- import {PersistentCheckpointStateCache, fcCheckpointToHexPayload} from "./stateCache/persistentCheckpointsCache.js";
119
+ import {PersistentCheckpointStateCache} from "./stateCache/persistentCheckpointsCache.js";
129
120
  import {CheckpointStateCache} from "./stateCache/types.js";
130
121
  import {ValidatorMonitor} from "./validatorMonitor.js";
131
122
 
@@ -390,8 +381,7 @@ export class BeaconChain implements IBeaconChain {
390
381
  const {checkpoint} = anchorState.computeAnchorCheckpoint();
391
382
  blockStateCache.add(anchorState);
392
383
  blockStateCache.setHeadState(anchorState);
393
- const payloadPresent = getCheckpointPayloadStatus(config, anchorState, checkpoint.epoch) === PayloadStatus.FULL;
394
- checkpointStateCache.add(checkpoint, anchorState, payloadPresent);
384
+ checkpointStateCache.add(checkpoint, anchorState);
395
385
 
396
386
  const forkChoice = initializeForkChoice(
397
387
  config,
@@ -685,7 +675,7 @@ export class BeaconChain implements IBeaconChain {
685
675
 
686
676
  // TODO GLOAS: Need to revisit the design of this api. Currently we just retrieve FULL state of the checkpoint for backwards compatibility.
687
677
  // because pre-gloas we always store FULL checkpoint state.
688
- const persistedKey = checkpointToDatastoreKey(checkpoint, true);
678
+ const persistedKey = checkpointToDatastoreKey(checkpoint);
689
679
  return this.cpStateDatastore.read(persistedKey);
690
680
  }
691
681
 
@@ -693,8 +683,8 @@ export class BeaconChain implements IBeaconChain {
693
683
  checkpoint: CheckpointWithPayloadStatus
694
684
  ): {state: IBeaconStateView; executionOptimistic: boolean; finalized: boolean} | null {
695
685
  // finalized or justified checkpoint states maynot be available with PersistentCheckpointStateCache, use getCheckpointStateOrBytes() api to get Uint8Array
696
- const checkpointHexPayload = fcCheckpointToHexPayload(checkpoint);
697
- const cachedStateCtx = this.regen.getCheckpointStateSync(checkpointHexPayload);
686
+ const checkpointHex = {epoch: checkpoint.epoch, rootHex: checkpoint.rootHex};
687
+ const cachedStateCtx = this.regen.getCheckpointStateSync(checkpointHex);
698
688
  if (cachedStateCtx) {
699
689
  const block = this.forkChoice.getBlockDefaultStatus(
700
690
  ssz.phase0.BeaconBlockHeader.hashTreeRoot(cachedStateCtx.latestBlockHeader)
@@ -713,8 +703,8 @@ export class BeaconChain implements IBeaconChain {
713
703
  async getStateOrBytesByCheckpoint(
714
704
  checkpoint: CheckpointWithPayloadStatus
715
705
  ): Promise<{state: IBeaconStateView | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
716
- const checkpointHexPayload = fcCheckpointToHexPayload(checkpoint);
717
- const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpointHexPayload);
706
+ const checkpointHex = {epoch: checkpoint.epoch, rootHex: checkpoint.rootHex};
707
+ const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpointHex);
718
708
  if (cachedStateCtx) {
719
709
  const block = this.forkChoice.getBlockDefaultStatus(checkpoint.root);
720
710
  const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
@@ -1070,7 +1060,7 @@ export class BeaconChain implements IBeaconChain {
1070
1060
  body,
1071
1061
  } as AssembledBlockType<T>;
1072
1062
 
1073
- const {newStateRoot, proposerReward, postBlockState} = computeNewStateRoot(this.metrics, state, block);
1063
+ const {newStateRoot, proposerReward} = computeNewStateRoot(this.metrics, state, block);
1074
1064
  block.stateRoot = newStateRoot;
1075
1065
  const blockRoot =
1076
1066
  produceResult.type === BlockType.Full
@@ -1079,26 +1069,9 @@ export class BeaconChain implements IBeaconChain {
1079
1069
  const blockRootHex = toRootHex(blockRoot);
1080
1070
 
1081
1071
  const fork = this.config.getForkName(slot);
1082
- if (isForkPostGloas(fork)) {
1083
- // TODO GLOAS: we should retire BlockType post-gloas, may need a new enum for self vs non-self built
1084
- if (produceResult.type !== BlockType.Full) {
1085
- throw Error(`Unexpected block type=${produceResult.type} for post-gloas fork=${fork}`);
1086
- }
1087
-
1088
- const gloasResult = produceResult as ProduceFullGloas;
1089
- const envelope: gloas.ExecutionPayloadEnvelope = {
1090
- payload: gloasResult.executionPayload,
1091
- executionRequests: gloasResult.executionRequests,
1092
- builderIndex: BUILDER_INDEX_SELF_BUILD,
1093
- beaconBlockRoot: blockRoot,
1094
- slot,
1095
- stateRoot: ZERO_HASH,
1096
- };
1097
- if (!isStatePostGloas(postBlockState)) {
1098
- throw Error(`Expected gloas+ post-state for execution payload envelope, got fork=${postBlockState.forkName}`);
1099
- }
1100
- const payloadEnvelopeStateRoot = computePayloadEnvelopeStateRoot(this.metrics, postBlockState, envelope);
1101
- gloasResult.payloadEnvelopeStateRoot = payloadEnvelopeStateRoot;
1072
+ // TODO GLOAS: we should retire BlockType post-gloas, may need a new enum for self vs non-self built
1073
+ if (isForkPostGloas(fork) && produceResult.type !== BlockType.Full) {
1074
+ throw Error(`Unexpected block type=${produceResult.type} for post-gloas fork=${fork}`);
1102
1075
  }
1103
1076
 
1104
1077
  // Track the produced block for consensus broadcast validations, later validation, etc.
@@ -1346,8 +1319,8 @@ export class BeaconChain implements IBeaconChain {
1346
1319
  checkpoint: CheckpointWithPayloadStatus,
1347
1320
  blockState: IBeaconStateView
1348
1321
  ): {state: IBeaconStateView; stateId: string; shouldWarn: boolean} {
1349
- const checkpointHexPayload = fcCheckpointToHexPayload(checkpoint);
1350
- const state = this.regen.getCheckpointStateSync(checkpointHexPayload);
1322
+ const checkpointHex = {epoch: checkpoint.epoch, rootHex: checkpoint.rootHex};
1323
+ const state = this.regen.getCheckpointStateSync(checkpointHex);
1351
1324
  if (state) {
1352
1325
  return {state, stateId: "checkpoint_state", shouldWarn: false};
1353
1326
  }
@@ -1471,10 +1444,6 @@ export class BeaconChain implements IBeaconChain {
1471
1444
  private onClockEpoch(epoch: Epoch): void {
1472
1445
  this.metrics?.clockEpoch.set(epoch);
1473
1446
 
1474
- if (epoch === this.config.GLOAS_FORK_EPOCH) {
1475
- this.regen.upgradeForGloas(epoch);
1476
- }
1477
-
1478
1447
  this.seenAttesters.prune(epoch);
1479
1448
  this.seenAggregators.prune(epoch);
1480
1449
  this.seenPayloadAttesters.prune(epoch);
@@ -147,6 +147,10 @@ export enum AttestationErrorCode {
147
147
  * Gloas: Current slot attestation is marking payload as present
148
148
  */
149
149
  PREMATURELY_INDICATED_PAYLOAD_PRESENT = "ATTESTATION_ERROR_PREMATURELY_INDICATED_PAYLOAD_PRESENT",
150
+ /**
151
+ * Gloas: index-1 attestation but the execution payload has not been seen yet
152
+ */
153
+ EXECUTION_PAYLOAD_NOT_SEEN = "ATTESTATION_ERROR_EXECUTION_PAYLOAD_NOT_SEEN",
150
154
  }
151
155
 
152
156
  export type AttestationErrorType =
@@ -185,7 +189,8 @@ export type AttestationErrorType =
185
189
  | {code: AttestationErrorCode.NON_ZERO_ATTESTATION_DATA_INDEX}
186
190
  | {code: AttestationErrorCode.ATTESTER_NOT_IN_COMMITTEE}
187
191
  | {code: AttestationErrorCode.INVALID_PAYLOAD_STATUS_VALUE; attDataIndex: number}
188
- | {code: AttestationErrorCode.PREMATURELY_INDICATED_PAYLOAD_PRESENT};
192
+ | {code: AttestationErrorCode.PREMATURELY_INDICATED_PAYLOAD_PRESENT}
193
+ | {code: AttestationErrorCode.EXECUTION_PAYLOAD_NOT_SEEN; beaconBlockRoot: RootHex};
189
194
 
190
195
  export class AttestationError extends GossipActionError<AttestationErrorType> {
191
196
  getMetadata(): Record<string, string | number | null> {
@@ -105,10 +105,14 @@ export function initializeForkChoiceFromFinalizedState(
105
105
  const isForkPostGloas = computeEpochAtSlot(state.slot) >= config.GLOAS_FORK_EPOCH;
106
106
 
107
107
  // Determine justified checkpoint payload status
108
- const justifiedPayloadStatus = getCheckpointPayloadStatus(config, state, justifiedCheckpoint.epoch);
108
+ const justifiedPayloadStatus = isForkPostGloas
109
+ ? PayloadStatus.PENDING
110
+ : getCheckpointPayloadStatus(config, state, justifiedCheckpoint.epoch);
109
111
 
110
112
  // Determine finalized checkpoint payload status
111
- const finalizedPayloadStatus = getCheckpointPayloadStatus(config, state, finalizedCheckpoint.epoch);
113
+ const finalizedPayloadStatus = isForkPostGloas
114
+ ? PayloadStatus.PENDING
115
+ : getCheckpointPayloadStatus(config, state, finalizedCheckpoint.epoch);
112
116
 
113
117
  return new forkchoiceConstructor(
114
118
  config,
@@ -1,6 +1,6 @@
1
1
  import {routes} from "@lodestar/api";
2
2
  import {ChainForkConfig} from "@lodestar/config";
3
- import {PayloadStatus, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
3
+ import {getSafeExecutionBlockHash} from "@lodestar/fork-choice";
4
4
  import {ForkPostBellatrix, ForkSeq, SLOTS_PER_EPOCH, isForkPostBellatrix} from "@lodestar/params";
5
5
  import {
6
6
  IBeaconStateView,
@@ -217,11 +217,7 @@ export class PrepareNextSlotScheduler {
217
217
  // + if next slot is a skipped slot, it'd help getting target checkpoint state faster to validate attestations
218
218
  if (isEpochTransition) {
219
219
  this.metrics?.precomputeNextEpochTransition.count.inc({result: "success"}, 1);
220
- // Determine payloadPresent from head block's payload status
221
- // Pre-Gloas: payloadStatus is always FULL → payloadPresent = true
222
- // Post-Gloas: FULL → true, EMPTY → false, PENDING → false (conservative, treat as block state)
223
- const payloadPresent = headBlock.payloadStatus === PayloadStatus.FULL;
224
- const previousHits = this.chain.regen.updatePreComputedCheckpoint(headRoot, nextEpoch, payloadPresent);
220
+ const previousHits = this.chain.regen.updatePreComputedCheckpoint(headRoot, nextEpoch);
225
221
  if (previousHits === 0) {
226
222
  this.metrics?.precomputeNextEpochTransition.waste.inc();
227
223
  }