Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ You can also read the technical papers:
- ["PoX: Proof of Transfer Mining with Bitcoin"](https://community.stacks.org/pox), May 2020
- ["Stacks 2.0: Apps and Smart Contracts for Bitcoin"](https://stacks.org/stacks), Dec 2020

## Contributing

We welcome contributions to the Stacks blockchain! Please see our [Contributing Guide](CONTRIBUTING.md) for detailed information on development workflows, coding standards, and how to submit pull requests.

For questions or discussions, join our [Discord community](https://stacks.chat).

## Copyright and License

The code and documentation copyright are attributed to stacks.org.
Expand Down
28 changes: 28 additions & 0 deletions stacks-node/src/nakamoto_node/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

//! # Nakamoto Relayer Module
//!
//! This module implements the relayer thread for the Nakamoto consensus protocol in the Stacks blockchain.
//! The relayer is responsible for coordinating between the network, chainstate, and mining components.
//!
//! ## Key Responsibilities
//!
//! - Processing network messages and relaying blocks/transactions
//! - Managing sortition processing and miner coordination
//! - Handling VRF key registration for mining
//! - Issuing block commits and tenure management
//! - Coordinating with the burnchain for consensus operations
//!
//! ## Architecture
//!
//! The relayer runs as a dedicated thread that communicates with other node components through
//! channels and shared state. It processes directives from the main node loop and manages
//! the lifecycle of mining operations in the Nakamoto epoch.
//!
//! ## Integration
//!
//! This module integrates with:
//! - `stacks-common` for shared types and utilities
//! - `stacks-chainstate` for blockchain state management
//! - `stacks-burnchains` for burnchain operations
//! - `stacks-node` for node configuration and networking
//! - Mining and consensus coordination modules
use core::fmt;
use std::io::Read;
use std::sync::atomic::{AtomicBool, Ordering};
Expand Down