add ANSI art placeholder for Electra 🦒 (#6338)

Trigger ANSI art on upgrade to Electra

Art created by http://beatscribe.com (beatscribe#1008 on Discord)
This commit is contained in:
Etan Kissling 2024-06-10 18:45:40 +02:00 committed by GitHub
parent de01ad4f9b
commit cccd81a47b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 75 additions and 5 deletions

View File

@ -2408,7 +2408,7 @@ proc updateHead*(
if dag.headState.kind > lastHeadKind: if dag.headState.kind > lastHeadKind:
case dag.headState.kind case dag.headState.kind
of ConsensusFork.Phase0 .. ConsensusFork.Bellatrix, ConsensusFork.Electra: of ConsensusFork.Phase0 .. ConsensusFork.Bellatrix:
discard discard
of ConsensusFork.Capella: of ConsensusFork.Capella:
if dag.vanityLogs.onUpgradeToCapella != nil: if dag.vanityLogs.onUpgradeToCapella != nil:
@ -2416,6 +2416,9 @@ proc updateHead*(
of ConsensusFork.Deneb: of ConsensusFork.Deneb:
if dag.vanityLogs.onUpgradeToDeneb != nil: if dag.vanityLogs.onUpgradeToDeneb != nil:
dag.vanityLogs.onUpgradeToDeneb() dag.vanityLogs.onUpgradeToDeneb()
of ConsensusFork.Electra:
if dag.vanityLogs.onUpgradeToElectra != nil:
dag.vanityLogs.onUpgradeToElectra()
if dag.vanityLogs.onKnownBlsToExecutionChange != nil and if dag.vanityLogs.onKnownBlsToExecutionChange != nil and
checkBlsToExecutionChanges( checkBlsToExecutionChanges(

View File

@ -0,0 +1,28 @@

..-|\_/|
  text .-'..d :.: $
(_: __. :::::$
`-' ? :::: $
\ :::: $
\::::::$
area\ :::::$
|:.::: $
 `| :::: $..__
`.::::::.::.`-.
|:::::::::::::`--.
here `.::::.:::::::::::`---.....
  `.:::::::::::::::::::::::`\
 |:::::::::::::::::::::::::|
 |:::::::::::::::::::::::|:|
  |::::::::::::|::::::::::|:|
':::)___..----\ :::::| .`. \
|:::| | :|`.::::|: : `.`.
() () O  O |:::| |. ||:::| `.: |:|
\ / \ /   |:::| | :|`.:::`. .:`.`.
() ()()  ()  () O () |:::| |: |::::| |::|`.`.
\  / \ // / / |:::| | :||:::| | :| )))
 () ()  O() O ()  () O  () |:::||.:.| () ()::| |:..;((( ()
. \. /. \. // O. /. . \. /. \ /. . \ .'::.'|::'|. /. . /.|::|. ` :.\ `/ .
....()O...O()...\()()....()O...O.()....()|:::| |_M()()....()..:::|.()|: :()..()
\../...\./...\../....\../...\./....\../..|:::|\../....\../...|:::<...\_M/|.....
 ():::::O:::::()::::::():::::O::::::():::|_N_|:()::::::()::::|_N_|::::():::::::

View File

@ -0,0 +1,28 @@
..-|\_/|
text .-'..d :.: $
(_: __. :::::$
`-' ? :::: $
\ :::: $
\::::::$
area \ :::::$
|:.::: $
`| :::: $..__
`.::::::.::.`-.
|:::::::::::::`--.
here `.::::.:::::::::::`---.....
`.:::::::::::::::::::::::`\
|:::::::::::::::::::::::::|
|:::::::::::::::::::::::|:|
|::::::::::::|::::::::::|:|
':::)___..----\ :::::| .`. \
|:::| | :| `.::::|: : `.`.
() () O O |:::| |. | |:::| `.: |:|
\ / \ / |:::| | :| `.:::`. .:`.`.
() ()() () () O () |:::| |: | ::::| |::|`.`.
\ / \ / / / / |:::| | :| |:::| | :| )))
() () O() O () () O () |:::||.:.| () ()::| |:..;((( ()
. \. /. \. // O. /. . \. /. \ /. . \ .'::.'|::'|. /. . /.|::|. ` :.\ `/ .
....()O...O()...\()()....()O...O.()....()|:::| |_M()()....()..:::|.()|: :()..()
\../...\./...\../....\../...\./....\../..|:::|\../....\../...|:::<...\_M/|.....
():::::O:::::()::::::():::::O::::::():::|_N_|:()::::::()::::|_N_|::::():::::::

View File

@ -34,6 +34,10 @@ type
# in case of chain reorgs around the upgrade. # in case of chain reorgs around the upgrade.
onUpgradeToDeneb*: LogProc onUpgradeToDeneb*: LogProc
# Gets displayed on upgrade to Electra. May be displayed multiple times
# in case of chain reorgs around the upgrade.
onUpgradeToElectra*: LogProc
# Created by http://beatscribe.com/ (beatscribe#1008 on Discord) # Created by http://beatscribe.com/ (beatscribe#1008 on Discord)
# These need to be the main body of the log not to be reformatted or escaped. # These need to be the main body of the log not to be reformatted or escaped.
@ -47,3 +51,6 @@ proc capellaBlink*() = notice "\n" & staticRead("capella" / "blink.ans")
proc denebMono*() = notice "\n" & staticRead("deneb" / "mono.txt") proc denebMono*() = notice "\n" & staticRead("deneb" / "mono.txt")
proc denebColor*() = notice "\n" & staticRead("deneb" / "color.ans") proc denebColor*() = notice "\n" & staticRead("deneb" / "color.ans")
proc electraMono*() = notice "\n" & staticRead("electra" / "mono.txt")
proc electraColor*() = notice "\n" & staticRead("electra" / "color.ans")

View File

@ -147,14 +147,16 @@ func getVanityLogs(stdoutKind: StdoutLogKind): VanityLogs =
onFinalizedMergeTransitionBlock: bellatrixBlink, onFinalizedMergeTransitionBlock: bellatrixBlink,
onUpgradeToCapella: capellaColor, onUpgradeToCapella: capellaColor,
onKnownBlsToExecutionChange: capellaBlink, onKnownBlsToExecutionChange: capellaBlink,
onUpgradeToDeneb: denebColor) onUpgradeToDeneb: denebColor,
onUpgradeToElectra: electraColor)
of StdoutLogKind.NoColors: of StdoutLogKind.NoColors:
VanityLogs( VanityLogs(
onMergeTransitionBlock: bellatrixMono, onMergeTransitionBlock: bellatrixMono,
onFinalizedMergeTransitionBlock: bellatrixMono, onFinalizedMergeTransitionBlock: bellatrixMono,
onUpgradeToCapella: capellaMono, onUpgradeToCapella: capellaMono,
onKnownBlsToExecutionChange: capellaMono, onKnownBlsToExecutionChange: capellaMono,
onUpgradeToDeneb: denebMono) onUpgradeToDeneb: denebMono,
onUpgradeToElectra: electraMono)
of StdoutLogKind.Json, StdoutLogKind.None: of StdoutLogKind.Json, StdoutLogKind.None:
VanityLogs( VanityLogs(
onMergeTransitionBlock: onMergeTransitionBlock:
@ -166,12 +168,14 @@ func getVanityLogs(stdoutKind: StdoutLogKind): VanityLogs =
onKnownBlsToExecutionChange: onKnownBlsToExecutionChange:
(proc() = notice "🦉 BLS to execution changed 🦉"), (proc() = notice "🦉 BLS to execution changed 🦉"),
onUpgradeToDeneb: onUpgradeToDeneb:
(proc() = notice "🐟 Proto-Danksharding is ON 🐟")) (proc() = notice "🐟 Proto-Danksharding is ON 🐟"),
onUpgradeToElectra:
(proc() = notice "🦒 [PH] Electra 🦒"))
func getVanityMascot(consensusFork: ConsensusFork): string = func getVanityMascot(consensusFork: ConsensusFork): string =
case consensusFork case consensusFork
of ConsensusFork.Electra: of ConsensusFork.Electra:
" " "🦒"
of ConsensusFork.Deneb: of ConsensusFork.Deneb:
"🐟" "🐟"
of ConsensusFork.Capella: of ConsensusFork.Capella: