-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Electra upgrade #1283
base: main
Are you sure you want to change the base?
Electra upgrade #1283
Conversation
@@ -55,49 +53,3 @@ func DenebExecutionPayloadToScale(e *state.ExecutionPayloadDeneb) (scale.Executi | |||
}, nil | |||
} | |||
|
|||
func DenebJsonExecutionPayloadHeaderToScale(e *beaconjson.FullExecutionPayloadHeaderJson) (scale.ExecutionPayloadHeaderDeneb, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused method.
# Conflicts: # relayer/contracts/gateway.go # relayer/relays/beacon/header/syncer/syncer_test.go # relayer/relays/beacon/store/datastore_test.go
--rest.namespace="*" \ | ||
--jwt-secret $config_dir/jwtsecret \ | ||
--chain.archiveStateEpochFrequency 1 \ | ||
>"$output_dir/lodestar.log" 2>&1 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be output_electra_dir
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it outputs to /tmp/snowbridge
, which I think should be fine. :)
web/packages/test/scripts/set-env.sh
Outdated
if [ "$is_electra" == "true" ]; then | ||
HOST=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not work for machines with multi-network interfaces, my PC, e.g.
➜ test git:(electra) ✗ ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
192.168.0.127
26.26.26.1
192.168.64.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may be able to force bind docker to 127.0.0.1 when forwarding ports from host to container. But also maybe we should build from source to avoid docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build from source: 23eb81d
docker run --rm \ | ||
-v "${output_electra_dir}:/mnt" \ | ||
docker.io/ethpandaops/geth:lightclient-prague-devnet-4 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest not introducing docker for the local setup, can maybe build from source if necessary like lodestar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build geth from source: 23eb81d
retries := 5 | ||
bootstrap, err := s.getCheckpoint() | ||
if err != nil { | ||
return scale.BeaconCheckpoint{}, fmt.Errorf("get finalized checkpoint: %w", err) | ||
for retries > 0 { | ||
retries = retries - 1 | ||
bootstrap, err = s.getCheckpoint() | ||
if err != nil { | ||
log.WithError(err).Info("retry bootstrap, sleeping") | ||
time.Sleep(10 * time.Second) | ||
continue | ||
} | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious is the retry necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got intermittent failures from Lodestar (on the Mekong network) where a bootstrap payload was not available for the provided finalized checkpoint, so I added a retry, instead of having to retry the whole e2e script. :)
if isDeneb { | ||
if forkVersion == protocol.Electra { | ||
beaconState = &state.BeaconStateElectra{} | ||
} else if forkVersion == protocol.Deneb { | ||
beaconState = &state.BeaconStateDenebMainnet{} | ||
} else { | ||
beaconState = &state.BeaconStateCapellaMainnet{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Capella branch can be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else { | ||
executionPayloadScale, err := api.CapellaExecutionPayloadToScale(sszBlock.ExecutionPayloadCapella()) | ||
executionPayloadScale, err := api.CapellaExecutionPayloadToScale(beaconBlock.ExecutionPayloadCapella()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can just remove the Capella branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, ac52035.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Changes
Testing
Resolves SNO-1140.
Companion: Snowfork/polkadot-sdk#178