-
Notifications
You must be signed in to change notification settings - Fork 608
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
Statesync #444
Merged
Merged
Statesync #444
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9f5afdc
Workflow testing for state sync
faddat f31735e
Added state sync script
faddat 52c81fe
State sync script (WIP)
faddat 362d257
Update statesync.yml
faddat dd7a73e
Update statesync.yml
faddat 7e78238
Merge branch 'osmosis-labs:main' into statesync
faddat bf97971
Update statesync.sh
faddat 18b51b2
Update statesync.yml
faddat d4911e3
Update statesync.sh
faddat 0f045c7
Merge branch 'osmosis-labs:main' into statesync
faddat 4a2c994
Update statesync.sh
faddat ea93e7c
Update statesync.sh
faddat c937dfe
Update statesync.sh
faddat 690624f
Update statesync.sh
faddat bbde208
Update statesync.sh
faddat e28d832
Update statesync.sh
faddat ae3d6e7
Update statesync.sh
faddat c5d8cda
Update statesync.sh
faddat 1861c78
Update statesync.sh
faddat 0e0080f
Update statesync.sh
faddat 59dbb09
Update statesync.sh
faddat 1f550b5
Update .github/workflows/statesync.yml
ValarDragon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,19 @@ | ||
# This is a basic workflow that is manually triggered | ||
|
||
name: State Sync | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: [workflow_dispatch] | ||
|
||
# This workflow makes x86_64 binaries for mac, windows, and linux. | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: osmosis state sync | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: state sync | ||
run: bash scripts/statesync.sh |
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,37 @@ | ||
|
||
#!/bin/bash | ||
# microtick and bitcanna contributed significantly here. | ||
set -e | ||
|
||
export GOPATH=~/go | ||
export PATH=$PATH:~/go/bin | ||
go install ./... | ||
|
||
|
||
# MAKE HOME FOLDER AND GET GENESIS | ||
osmosisd init test | ||
wget -O ~/.osmosisd/config/genesis.json https://cloudflare-ipfs.com/ipfs/QmXRvBT3hgoXwwPqbK6a2sXUuArGM8wPyo1ybskyyUwUxs | ||
|
||
INTERVAL=1500 | ||
|
||
# GET TRUST HASH AND TRUST HEIGHT | ||
|
||
LATEST_HEIGHT=$(curl -s 162.55.132.230:2001/block | jq -r .result.block.header.height); | ||
BLOCK_HEIGHT=$(($LATEST_HEIGHT-$INTERVAL)) | ||
TRUST_HASH=$(curl -s "162.55.132.230:2001/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) | ||
|
||
|
||
# TELL USER WHAT WE ARE DOING | ||
echo "TRUST HEIGHT: $BLOCK_HEIGHT" | ||
echo "TRUST HASH: $TRUST_HASH" | ||
|
||
|
||
# export state sync vars | ||
export OSMOSISD_STATESYNC_ENABLE=true | ||
export OSMOSISD_STATESYNC_RPC_SERVERS="162.55.132.230:2001,162.55.132.230:2001" | ||
export OSMOSISD_STATESYNC_TRUST_HEIGHT=$BLOCK_HEIGHT | ||
export OSMOSISD_STATESYNC_TRUST_HASH=$TRUST_HASH | ||
export OSMOSISD_P2P_PERSISTENT_PEERS="[email protected]:2000" | ||
|
||
osmosisd unsafe-reset-all | ||
osmosisd start |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this trying to state sync against mainnet?
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.
Yep
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 way that I'm looking at this is we can use this as an indicator of changes that would cause differences in the app hash, and of changes that might break state sync itself.
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.
It will currently fail in the master branch but we can tag it with that one setting that causes it to continue on error.