-
-
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.
rename verge to electra and fix upgrade issues and transition banner
- Loading branch information
Showing
31 changed files
with
182 additions
and
156 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 ELECTRA_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/upgradeStateToElectra.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, CachedBeaconStateElectra} from "../types.js"; | ||
import {getCachedBeaconState} from "../cache/stateCache.js"; | ||
|
||
/** | ||
* Upgrade a state from Capella (Eventualy DENEB) to Electra. | ||
*/ | ||
export function upgradeStateToElectra(stateCapella: CachedBeaconStateCapella): CachedBeaconStateElectra { | ||
const {config} = stateCapella; | ||
|
||
const stateCapellaNode = ssz.capella.BeaconState.commitViewDU(stateCapella); | ||
const stateElectraView = ssz.electra.BeaconState.getViewDU(stateCapellaNode); | ||
|
||
const stateElectra = getCachedBeaconState(stateElectraView, stateCapella); | ||
|
||
stateElectra.fork = ssz.phase0.Fork.toViewDU({ | ||
previousVersion: stateCapella.fork.currentVersion, | ||
currentVersion: config.ELECTRA_FORK_VERSION, | ||
epoch: stateCapella.epochCtx.epoch, | ||
}); | ||
|
||
// latestExecutionPayloadHeader's executionWitnessRoot will have default zero root | ||
|
||
stateElectra.commit(); | ||
return stateElectra; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.