-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update state transition Fix tests Add fork to LC tests rebase fixes get the types to match current kaustinen network insert verge between capella and deneb add payload to execution witness working local build with kaunstinen v2 geth build use electra in config few corrections fix build integrated ssz with optional deep log witness fix serialization for new payload rename verge to electra and fix upgrade issues and transition banner fix type issues add parent stateroot to witness rebase fixes rename electra to verkle
- Loading branch information
Showing
29 changed files
with
570 additions
and
12 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
packages/beacon-node/src/chain/blocks/utils/elephantWithWings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const VERKLE_ELEPHANTWITHWINGS_BANNER = String.raw` | ||
:~~. | ||
:!:^::^^!!^ | ||
:!^^ !:J. | ||
.!!:! .^7^ | ||
.?7~: ^#! !!!^!~. | ||
:!^ GP~..^^?^ ^!: | ||
!^ Y5 #7: | ||
.:^^~7~. ! ~~6800~~^ ^6800^ ~~6800 68 00 68~~ 00~ || | ||
.~! 55J ~~6800~~ :! !^ .YP :JP 7B. ^7# | ||
^7 :: 5 #:::^::~~6800~~^^?!?.~:: :! !^ 6800 .^PJ JG ~!B | ||
:G ^7 ^ !^68 00^ ~~6800~~ :! !: .&~ ^#! ^!55~~~6800~~7G~ !7B | ||
7G ~!5J ^? !.----. ~! ~~6800~~ .7#: 6800 ~ | ||
?G :^?G. ...... ^?^.!G. ?G :^?G. ...... ^?^.!G. ! | ||
~! ~~6800~~ .7#: 6800 G~ 7G ~!5J ^? !.----. :: | ||
:! !: .&~ ^#! ^!55~~~6800~~7G~ !7B :G ^7 ^ !^68 00^ ~~6800~~ :: | ||
:! !^ 6800 .^PJ JG ~!B ^7 :: 5 ^^ !!!! #:::^::~~6800~~^^?!?.~ | ||
:! !^ .YP :JP 7B. ^7# .~!~ ~~6800 ^6800^ ~~6800~~ | ||
6800 68 00 68~~ 00~ 6800 | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/state-transition/src/slot/upgradeStateToVerkle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {ssz} from "@lodestar/types"; | ||
import {CachedBeaconStateCapella, CachedBeaconStateVerkle} from "../types.js"; | ||
import {getCachedBeaconState} from "../cache/stateCache.js"; | ||
|
||
/** | ||
* Upgrade a state from Capella (Eventualy DENEB) to Verkle. | ||
*/ | ||
export function upgradeStateToVerkle(stateCapella: CachedBeaconStateCapella): CachedBeaconStateVerkle { | ||
const {config} = stateCapella; | ||
|
||
const stateCapellaNode = ssz.capella.BeaconState.commitViewDU(stateCapella); | ||
const stateVerkleView = ssz.verkle.BeaconState.getViewDU(stateCapellaNode); | ||
|
||
const stateVerkle = getCachedBeaconState(stateVerkleView, stateCapella); | ||
|
||
stateVerkle.fork = ssz.phase0.Fork.toViewDU({ | ||
previousVersion: stateCapella.fork.currentVersion, | ||
currentVersion: config.VERKLE_FORK_VERSION, | ||
epoch: stateCapella.epochCtx.epoch, | ||
}); | ||
|
||
// latestExecutionPayloadHeader's executionWitnessRoot will have default zero root | ||
|
||
stateVerkle.commit(); | ||
return stateVerkle; | ||
} |
Oops, something went wrong.