-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: hash checksums + download urls for snapshot restore and create #201
base: master
Are you sure you want to change the base?
Conversation
1bac8ff
to
43ca345
Compare
17209f2
to
443cb30
Compare
d215762
to
28d5544
Compare
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.
Selected the wrong option on accident...see above feedback for changes needed.
Ran the
It also didnt clean up the file that was created, which it probably should. arguments: go run main.go restore-snapshot
--ethereum.rpc-url="https://winter-white-crater.ethereum-holesky.quiknode.pro/1b1d75c4ada73b7ad98e1488880649d4ea637733/" \
--chain="preprod" \
--database.host="localhost" \
--database.port="5432" \
--database.user="seanmcgary" \
--database.password="" \
--database.db_name="sidecar_test_restore" \
--ethereum.use_native_batch_call=false \
--snapshot.input=https://eigenlayer-sidecar.s3.us-east-1.amazonaws.com/snapshots/testnet-holesky/sidecar-testnet-holesky_v3.0.0-rc.1_public_20250122.dump \
--database.schema_name=public As a sidenote, when we encounter an error during execution, can we change it so that the usage message isnt printed? It adds a lot of noise and should really only be printed if the inputs are incorrect. |
Fixed to be clear it's the filesum the hash that doesn't exist. Try with the --snapshot.verify-input=false flag It should now give something like : {"level":"fatal","ts":"2025-02-03T12:53:34.148-0800","caller":"cmd/restoreSnapshot.go:44","msg":"failed to restore snapshot","error":"snapshot hash file not found at 'https://eigenlayer-sidecar.s3.us-east-1.amazonaws.com/snapshots/testnet-holesky/sidecar-testnet-holesky_v3.0.0-rc.1_public_20250122.dump.sha256sum'. Ensure the file exists or set --verify-input=false to skip verification","stacktrace":"github.com/Layr-Labs/sidecar/cmd.init.func4\n\t/Users/brendan/Documents/GitHub/sidecar/cmd/restoreSnapshot.go:44\ngithub.com/spf13/cobra.(*Command).execute\n\t/Users/brendan/go/pkg/mod/github.com/spf13/[email protected]/command.go:985\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/brendan/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/brendan/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041\ngithub.com/Layr-Labs/sidecar/cmd.Execute\n\t/Users/brendan/Documents/GitHub/sidecar/cmd/root.go:19\nmain.main\n\t/Users/brendan/Documents/GitHub/sidecar/main.go:8\nruntime.main\n\t/opt/homebrew/Cellar/go/1.23.4/libexec/src/runtime/proc.go:272"} |
f149b27
to
3929046
Compare
downloadFile is intended to be used to download an individual file, like you downloadFile(snapshot), then downloadFile(snapshotHash) |
04bf17c
to
0ed2257
Compare
pkg/snapshot/snapshot.go
Outdated
inputUrl := s.cfg.Input | ||
|
||
// Check if the input URL exists | ||
snapshotExists, err := urlExists(inputUrl) |
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.
Doesnt look like thats the case. Still calling urlExists
which executes a HEAD request
pkg/snapshot/snapshot.go
Outdated
if s.cfg.VerifyInput { | ||
hashUrl := getHashName(inputUrl) | ||
|
||
hashFileExists, err := urlExists(hashUrl) |
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.
Still making a HEAD request
d1af443
to
9c8c169
Compare
9c8c169
to
d2f477c
Compare
hash checksums + download urls for snapshot restore and create, also cleaned up/ logs/ readme/ docs