Skip to content

sunriselayer/sunrise

Repository files navigation

Sunrise

sunrise is a blockchain built using Cosmos SDK and CometBFT and created with Ignite CLI.

Toolchain

# install go
go version

# install ignite
ignite version
# v28.3.0

apt install -y protobuf-compiler
protoc --version
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar

Diagram

                ^  +-------------------------------+  ^
                |  |                               |  |
                |  |  State-machine = Application  |  |
                |  |                               |  |   sunrise (built with Cosmos SDK)
                |  |            ^      +           |  |
                |  +----------- | ABCI | ----------+  v
Sunrise         |  |            +      v           |  ^
validator or    |  |                               |  |
full consensus  |  |           Consensus           |  |
node            |  |                               |  |
                |  +-------------------------------+  |   sunrise-core (fork of CometBFT)
                |  |                               |  |
                |  |           Networking          |  |
                |  |                               |  |
                v  +-------------------------------+  v

Install

Source

  1. Install Go 1.22.2

  2. Install Ignite CLI v28.3.0

  3. Clone this repo

  4. Install the sunrise CLI

    ignite chain build

Prebuilt binary

If you'd rather not install from source, you can download a prebuilt binary from the releases page.

  1. Navigate to the latest release on https://github.com/SunriseLayer/sunrise/releases.

  2. Download the binary for your platform (e.g. sunrise_Linux_x86_64.tar.gz) from the Assets section. Tip: if you're not sure what platform you're on, you can run uname -a and look for the operating system (e.g. Linux, Darwin) and architecture (e.g. x86_64, arm64).

  3. Extract the archive

    tar -xvf sunrise_Linux_x86_64.tar.gz
  4. Verify the extracted binary works

    ./sunrised --help
  5. [Optional] verify the prebuilt binary checksum. Download checksums.txt and then verify the checksum:

    sha256sum --ignore-missing --check checksums.txt

    You should see output like this:

    sunrise_Linux_x86_64.tar.gz: OK

See https://docs.sunriselayer.io/node/build-node for more information.

Usage

# Print help
sunrised --help

Environment variables

Variable Explanation Default value Required
SUNRISE_HOME Home directory for the application User home dir. Ref. Optional

Create your own single node devnet

# Start a single node devnet
./scripts/single-node.sh

# Publish blob data to the local devnet
sunrised tx blob pay-for-blob 0x00010203040506070809 0x48656c6c6f2c20576f726c6421 \
	--chain-id private \
	--from validator \
	--keyring-backend test \
	--fees 21000urise \
	--yes

Note

The sunrised binary doesn't support signing with Ledger hardware wallets on Windows and OpenBSD.

Contributing

This repo attempts to conform to conventional commits so PR titles should ideally start with fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, or test: because this helps with semantic versioning and changelog generation. It is especially important to include an ! (e.g. feat!:) if the PR includes a breaking change.

Tools

  1. Install golangci-lint 1.57.0
  2. Install markdownlint 0.39.0
  3. Install hadolint
  4. Install yamllint
  5. Install markdown-link-check
  6. Install goreleaser

Helpful Commands

# Get more info on ignite commands.
ignite help

# Build and install the sunrised binary into the $GOPATH/bin directory.
ignite chain build

# Regenerate Protobuf files (this assumes Docker is running)
ignite generate proto-go

# Regenerate OpenAPI spec file (this assumes Docker is running)
ignite generate openapi

# Generate TypeScript frontend client files (this assumes Docker is running)
ignite generate ts-client

# Run tests
go test ./...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages