Skip to content

sunriselayer/sunrise-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

sunrise-core

Go Reference GitHub Release Go Report Card Build Lint Tests

sunrise-core is a fork of cometbft/cometbft, an implementation of the Tendermint protocol, with the following changes:

  1. Modifications to how DataHash in the block header is determined. In CometBFT, DataHash is based on the transactions included in a block. In Sunrise, block data (including transactions) are erasure coded into a data square to enable data availability sampling. In order for the header to contain a commitment to this data square, DataHash was modified to be the Merkle root of the row and column roots of the erasure coded data square. See sunrise-app/pkg/da/data_availability_header.go for the implementation. Note on the implementation: sunrise-app computes the hash in prepare_proposal and adds it to txs via abci_prepare_proposal.go so it is taken from txs and applied to Data.Hash in sunrise-core.

Diagram

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

Install

See https://github.com/SunriseLayer/sunrise-app#install

Usage

See https://github.com/SunriseLayer/sunrise-app#usage

Contributing

This repo intends on preserving the minimal possible diff with cometbft/cometbft to make fetching upstream changes easy. If the proposed contribution is

  • specific to Sunrise: consider if sunrise-app is a better target
  • not specific to Sunrise: consider making the contribution upstream in CometBFT
  1. Install Go 1.22+
  2. Fork this repo
  3. Clone your fork
  4. Find an issue to work
  5. Work on a change in a branch on your fork
  6. When your change is ready, push your branch and create a PR that targets this repo

Helpful Commands

# Build a new CometBFT binary and output to build/comet
make build

# Install CometBFT binary
make install

# Run tests
make test

# If you modified any protobuf definitions in a `*.proto` file then
# you may need to lint, format, and generate updated `*.pb.go` files
make proto-lint
make proto-format
make proto-gen

Branches

The canonical branches in this repo are based on CometBFT releases. For example: v0.0.1-cmt-v0.38.2 is based on the CometBFT v0.38.2 release branch and contains Sunrise-specific changes.

Versioning

Releases are formatted: v<SUNRISE_CORE_VERSION>-tm-v<COMETBFT_VERSION> For example: v0.0.1-cmt-v0.38.2 is sunrise-core version 0.0.1 based on CometBFT 0.38.2. SUNRISE_CORE_VERSION strives to adhere to Semantic Versioning.

Careers

We are hiring Go engineers! Join us in building the future of blockchain scaling and interoperability. Apply here.

About

CometBFT (fork of Tendermint Core): A distributed, Byzantine fault-tolerant, deterministic state machine replication engine

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 84.9%
  • TeX 7.7%
  • TLA 5.6%
  • Python 0.6%
  • Shell 0.5%
  • Makefile 0.4%
  • Other 0.3%