Skip to content

Commit

Permalink
Merge branch 'main' into jay/fix-lint-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jim380 authored Jan 26, 2024
2 parents ddf97e8 + d804528 commit fb940ee
Show file tree
Hide file tree
Showing 19 changed files with 1,194 additions and 347 deletions.
7 changes: 4 additions & 3 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Docker is used to help make release and static builds locally.
We use Golang as the language to develop `seda-chaind` as it has the [CosmosSDK](https://v1.cosmos.network/sdk).

- [Golang](https://go.dev/dl/): you can download it from the linked page or:
- Linux: Use your distribution's packagae manager.
- Linux: Use your distribution's package manager.
- Mac: Use `macports` or `brew`.
- Ensure that `$GOPATH` and `$PATH` have been set properly. On a Mac that uses the Z shell, you may have to run the following:

Expand Down Expand Up @@ -133,11 +133,12 @@ BIN=./build/seda-chaind

$BIN tendermint unsafe-reset-all
rm -rf ~/.seda-chain
$BIN init node0 --default-denom aseda

$BIN init node0 --default-denom aseda --chain-id seda-1-local

$BIN keys add satoshi --keyring-backend test
$BIN add-genesis-account $($BIN keys show satoshi --keyring-backend test -a) 10000000000000000seda
$BIN gentx satoshi 10000000000000000seda --keyring-backend test
$BIN gentx satoshi 10000000000000000seda --keyring-backend test --chain-id seda-1-local
$BIN collect-gentxs
$BIN start
```
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Set Env Vars ##
###############################################################################
export CGO_ENABLED=1
export VERSION := $(shell echo $(shell git describe --tags --always --match "v*") | sed 's/^v//')
export VERSION := $(shell echo $(shell git describe --tags --always --match "v*"))
export COMMIT := $(shell git log -1 --format='%H')

###############################################################################
Expand Down
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ This section is for those linking to an external node, so if you want to run com

When connecting externally, choose a trustworthy node operator. Unscrupulous operators might tamper with query outcomes or block transactions. The SEDA team currently supports these RPC endpoints:

- Testnet-seda-node-1: `http://3.10.185.200:26657`
- Testnet-seda-node-2: `http://35.179.10.147:26657`
- Testnet-seda-node-1: `http://18.171.36.35:26657`
- Testnet-seda-node-2: `http://13.41.125.154:26657`

### Running the Node Yourself

Expand Down Expand Up @@ -150,6 +150,43 @@ That’s it now you can find your validator operator address using the following
./seda-chaind-${ARCH} keys show <wallet-name> --bech val -a
```

### Running the Node with Cosmovisor

Run the node as a subprocess of Cosmovisor if you want automatic upgrading, which only requires you to place a new binary in the right location before an upgrade height.

Install Cosmovisor.

```
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
```

Then, add these lines to your profile (maybe `.profile`, `.zprofile`, or something else) to set up environment variables:

```
echo "# Cosmovisor Setup" >> ~/.profile
echo "export DAEMON_NAME=seda-chaind" >> ~/.profile
echo "export DAEMON_HOME=$HOME/.seda-chain" >> ~/.profile
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=false" >> ~/.profile
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.profile
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.profile
source ~/.profile
```

Initialize Cosmovisor with the chain binary and start the node.

```
cosmovisor init seda-chaind-${ARCH}
cosmovisor run start
```

Note that for an upgrade, simply run the following command to prepare Cosmovisor with the upgrade binary before the chain reaches the upgrade height.

```
cosmovisor add-upgrade <upgrade-name> <upgrade-binary-file>
```

## License

Contents of this repository are open source under [GNU General Public License v3.0](LICENSE).
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) {

// Register grpc-gateway routes for all modules.
app.bmm.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// register app's OpenAPI routes.
docs.RegisterOpenAPIService(Name, apiSvr.Router)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
cosmossdk.io/x/tx v0.13.0
cosmossdk.io/x/upgrade v0.1.0
github.com/CosmWasm/wasmd v0.50.0
github.com/cometbft/cometbft v0.38.4
github.com/cometbft/cometbft v0.38.5
github.com/cosmos/cosmos-db v1.0.0
github.com/cosmos/cosmos-proto v1.0.0-beta.3
github.com/cosmos/cosmos-sdk v0.50.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/cometbft/cometbft v0.38.4 h1:XlqIgU+RKRf8Buajt9cLP8Jhg2FnRu6pBsGZ040D32M=
github.com/cometbft/cometbft v0.38.4/go.mod h1:kyyCNpl66hAJkiKHJzCYCwrCnZuTWqYDqhP5JPHT4FM=
github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU=
github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg=
github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M=
github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
Expand Down
Loading

0 comments on commit fb940ee

Please sign in to comment.