Skip to content

Commit

Permalink
Merge pull request #122 from White-Whale-Defi-Platform/mac-compatible
Browse files Browse the repository at this point in the history
Make the state sync script compatible with mac
  • Loading branch information
faddat authored Mar 18, 2023
2 parents b29b978 + b489104 commit bc5e754
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func TestGetEnabledProposals(t *testing.T) {
}
}

func SetupGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, opts []wasm.Option, app *MigalooApp, balances ...banktypes.Balance) GenesisState {
func SetupGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, _ []wasm.Option, app *MigalooApp, balances ...banktypes.Balance) GenesisState {
genesisState := NewDefaultGenesisState()
// set genesis accounts
authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs)
Expand Down
2 changes: 1 addition & 1 deletion app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey) {
type EmptyBaseAppOptions struct{}

// Get implements AppOptions
func (ao EmptyBaseAppOptions) Get(o string) interface{} {
func (ao EmptyBaseAppOptions) Get(_ string) interface{} {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ replace (
// the following version across all dependencies.
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// use mev-tendermint v0.34.25
github.com/tendermint/tendermint => github.com/skip-mev/mev-tendermint v0.34.25-mev.15
// use mev-tendermint v0.34.26
github.com/tendermint/tendermint => github.com/skip-mev/mev-tendermint v0.34.26-mev.16
// tmdb enforcement
github.com/tendermint/tm-db => github.com/tendermint/tm-db v0.6.8-0.20221109095132-774cdfe7e6b0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/skip-mev/mev-tendermint v0.34.25-mev.15 h1:zIsAQjX4SjiOaAOUVJ8D5lAepp0SQ9sZJfUmiT9tOK8=
github.com/skip-mev/mev-tendermint v0.34.25-mev.15/go.mod h1:GJ5BRPwN8iO7m4F06CScEwyYas2L5hIU1273T0GURKo=
github.com/skip-mev/mev-tendermint v0.34.26-mev.16 h1:ziFoF6MA8vbxLWNnitUSLzBjtNY1VOuXZIkyFqZLhSE=
github.com/skip-mev/mev-tendermint v0.34.26-mev.16/go.mod h1:AtuyIGbqSSYFBJc2GsZ6wO537bJVtyWUj/oGT2f1Kd8=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
Expand Down
7 changes: 2 additions & 5 deletions scripts/statesync.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ else
fi


# Set minimum gas price.
# ADD SPACE IF RUN ON MAC
sed -i'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uwhale"/' "$HOME/.migalood/config/app.toml"

# Get "trust_hash" and "trust_height".
INTERVAL=1000
Expand All @@ -50,7 +47,7 @@ echo "trust_hash: $TRUST_HASH"
export MIGALOOD_STATESYNC_ENABLE=true
export MIGALOOD_P2P_MAX_NUM_OUTBOUND_PEERS=200
# replace the url below with a working one, get it from chain registry
export MIGALOOD_STATESYNC_RPC_SERVERS="https://whitewhale-mainnet-rpc.autostake.net:443,https://rpc-whitewhale.goldenratiostaking.net,https://whitewhale-rpc.lavenderfive.com,https://rpc-whitewhale.carbonzero.zone:443,https://rpc-whitewhale.whispernode.com:443,https://migaloo-rpc.kleomedes.network:443"
export MIGALOOD_STATESYNC_RPC_SERVERS="https://whitewhale-mainnet-rpc.autostake.net:443,https://rpc-whitewhale.goldenratiostaking.net:443,https://whitewhale-rpc.lavenderfive.com:443,https://rpc-whitewhale.carbonzero.zone:443,https://rpc-whitewhale.whispernode.com:443,https://migaloo-rpc.kleomedes.network:443"
export MIGALOOD_STATESYNC_TRUST_HEIGHT=$BLOCK_HEIGHT
export MIGALOOD_STATESYNC_TRUST_HASH=$TRUST_HASH

Expand All @@ -60,4 +57,4 @@ export MIGALOOD_P2P_SEEDS


# Start chain.
migalood start --x-crisis-skip-assert-invariants --minimum-gas-prices 0.00001uwhale
migalood start --x-crisis-skip-assert-invariants --minimum-gas-prices 0.00001uwhale

0 comments on commit bc5e754

Please sign in to comment.