Git Product home page Git Product logo

stacks-core's Introduction

Stacks

Stacks Blockchain

Reference implementation of the Stacks blockchain in Rust.

Stacks is a layer-2 blockchain that uses Bitcoin as a base layer for security and enables decentralized apps and predictable smart contracts using the Clarity language. Stacks implements Proof of Transfer (PoX) mining that anchors to Bitcoin security. Leader election happens at the Bitcoin blockchain and Stacks (STX) miners write new blocks on the separate Stacks blockchain. With PoX there is no need to modify Bitcoin to enable smart contracts and decentralized apps.

License: GPL v3 Release Build Status Discord Chat

Building

1. Download and install Rust

For building on Windows, follow the rustup installer instructions at https://rustup.rs/.

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
$ rustup component add rustfmt
  • When building the master branch, ensure you are using the latest stable release:
$ rustup update

2. Clone the source repository:

$ git clone --depth=1 https://github.com/stacks-network/stacks-blockchain.git
$ cd stacks-blockchain

3. Build the project

$ cargo build

Testing

Run the tests:

$ cargo test testnet  -- --test-threads=1

Run all unit tests in parallel using nextest:

Warning, this typically takes a few minutes

$ cargo nextest run

Run the testnet

You can observe the state machine in action locally by running:

$ cd testnet/stacks-node
$ cargo run --bin stacks-node -- start --config ./conf/testnet-follower-conf.toml

On Windows, many tests will fail if the line endings aren't LF. Please ensure that you are have git's core.autocrlf set to input when you clone the repository to avoid any potential issues. This is due to the Clarity language currently being sensitive to line endings.

Additional testnet documentation is available here and here

Release Process

The release process for the stacks blockchain is defined here

Further Reading

You can learn more by visiting the Stacks Website and checking out the documentation:

You can also read the technical papers:

Copyright and License

The code and documentation copyright are attributed to stacks.org.

This code is released under the GPL v3 license, and the docs are released under the Creative Commons license.

stacks-core's People

Contributors

jcnelson avatar kantai avatar lgalabru avatar muneeb-ali avatar pavitthrap avatar gregorycoppola avatar shea256 avatar zone117x avatar obycode avatar wileyj avatar jackzampolin avatar reedrosenbluth avatar jferrant avatar psq avatar igorsyl avatar diwakergupta avatar pandu-rao avatar xoloki avatar guylepage3 avatar charliec3 avatar donpdonp avatar acaccia avatar ibrahimahmed443 avatar friedger avatar njordhov avatar larrysalibra avatar lacabra avatar jbencin avatar asjad99 avatar tippenein avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.