Skip to content

Commit

Permalink
Merge branch 'main' into framing-sv2-doc-cmt-syntax-update
Browse files Browse the repository at this point in the history
  • Loading branch information
rrybarczyk committed Oct 10, 2024
2 parents a4586ed + 8367a26 commit e93c055
Show file tree
Hide file tree
Showing 63 changed files with 563 additions and 241 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/clippy-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

name: Clippy Lint

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ name: Test Coverage

on:
push:
branches: [ main, dev ]
branches:
- main
pull_request:
branches: [ main, dev ]
branches:
- main

jobs:
tarpaulin-test:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/fmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

name: Rustfmt

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lockfiles.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Lockfiles

# Trigger the workflow on push or pull request events for the dev and main branches
# Trigger the workflow on push or pull request events for the main branch
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main

jobs:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ name: MG Test

on:
push:
branches: [ main, dev ]
branches:
- main
pull_request:
branches: [ main, dev ]
branches:
- main

jobs:
bad-pool-config-test:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/rust-msrv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

name: MSRV 1.75 Check

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- "main"
- "dev"
pull_request:
branches:
- "main"
- "dev"

jobs:
semver-check:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sv2-header-check.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on:
push:
branches: [ main, dev ]
branches:
- main
pull_request:
branches: [ main, dev ]
branches:
- main

# Check sv2.h file is up to date with commit
name: sv2.h Header Check
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

name: Test, Prop Tests, Example Tests

Expand Down
2 changes: 1 addition & 1 deletion examples/interop-cpp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "interop-cpp"
version = "0.1.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/ping-pong-with-noise/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ping_pong_with_noise"
version = "0.1.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion examples/ping-pong-without-noise/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ping_pong_without_noise"
version = "0.1.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
publish = false

Expand Down
13 changes: 0 additions & 13 deletions protocols/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
name = "stratum_v2_protocols"
version = "1.0.0"
authors = ["The Stratum v2 Developers"]
edition = "2021"
description = "The Stratum protocol defines how miners, proxies, and pools communicate to contribute hashrate to the Bitcoin network. Stratum v2 is a robust set of primitives which anyone can use to expand the protocol or implement a role."
documentation = "https://github.com/stratum-mining/stratum"
readme = "README.md"
homepage = "https://stratumprotocol.org"
repository = "https://github.com/stratum-mining/stratum"
license = "MIT + Apache-2.0"
license-file = "LICENSE.md"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

[workspace]

resolver="2"
Expand Down
5 changes: 5 additions & 0 deletions protocols/fuzz-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ version = "1.0.0"
edition = "2021"
authors = ["Automatically generated"]
publish = false
documentation = "https://github.com/stratum-mining/stratum"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

[package.metadata]
cargo-fuzz = true
Expand Down
8 changes: 6 additions & 2 deletions protocols/v1/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "sv1_api"
version = "1.0.1"
authors = ["user"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
description = "API for bridging SV1 miners to SV2 pools"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/sv1_api"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
8 changes: 6 additions & 2 deletions protocols/v2/binary-sv2/binary-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "binary_sv2"
version = "1.2.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
description = "Sv2 data format"
license = "MIT"
documentation = "https://docs.rs/binary_sv2"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
8 changes: 6 additions & 2 deletions protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "binary_codec_sv2"
version = "1.2.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
description = "Sv2 data format"
license = "MIT"
documentation = "https://docs.rs/binary_codec_sv2"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
8 changes: 6 additions & 2 deletions protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "derive_codec_sv2"
version = "1.1.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
description = "Derive macro for Sv2 binary format serializer and deserializer"
license = "MIT"
documentation = "https://docs.rs/derive_codec_sv2"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
8 changes: 6 additions & 2 deletions protocols/v2/binary-sv2/serde-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "serde_sv2"
version = "1.0.1"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
description = "Serlializer and Deserializer for Stratum V2 data format"
license = "MIT"
documentation = "https://docs.rs/serde_sv2"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
8 changes: 6 additions & 2 deletions protocols/v2/codec-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "codec_sv2"
version = "1.2.1"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
description = "Sv2 data format"
license = "MIT"
documentation = "https://docs.rs/codec_sv2"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

[dependencies]
serde = { version = "1.0.89", default-features = false, optional = true }
Expand Down
10 changes: 7 additions & 3 deletions protocols/v2/const-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[package]
name = "const_sv2"
version = "2.0.0"
authors = ["fi3 <[email protected]>"]
authors = ["The Stratum V2 Developers"]
edition = "2018"
description = "Sv2 constatnts"
license = "MIT"
readme = "README.md"
description = "This crate holds all of the shared constants used across the different Stratum V2 protocols and roles crates"
documentation = "https://docs.rs/const_sv2"
license = "MIT + Apache-2.0"
repository = "https://github.com/stratum-mining/stratum"
homepage = "https://stratumprotocol.org"
keywords = ["stratum", "mining", "bitcoin", "protocol"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
22 changes: 22 additions & 0 deletions protocols/v2/const-sv2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# const_sv2

[![crates.io](https://img.shields.io/crates/v/const_sv2.svg)](https://crates.io/crates/const_sv2)
[![docs.rs](https://docs.rs/const_sv2/badge.svg)](https://docs.rs/const_sv2)
[![rustc+](https://img.shields.io/badge/rustc-1.75.0%2B-lightgrey.svg)](https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html)
[![license](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](https://github.com/stratum-mining/stratum/blob/main/LICENSE.md)

`const_sv2` is a Rust crate that provides essential constants for the Sv2 (Stratum V2) protocol. These constants are crucial for message framing, encryption, and protocol-specific identifiers across various Sv2 components, including Mining, Job Declaration, and Template Distribution protocols.

## Key Capabilities

- **Protocol Constants**: Define key protocol discriminants, message types, and sizes for the Sv2 binary protocol.
- **Encryption Support**: Includes constants for encryption using `ChaChaPoly` and `ElligatorSwift` encoding.
- **Channel Bits**: Defines whether specific messages are associated with a channel, simplifying protocol handling.
- **Modular**: Supports a `no_std` environment, enabling use in embedded systems or environments without a standard library.

## Usage

To include this crate in your project, run:

```sh
cargo add const_sv2
Loading

0 comments on commit e93c055

Please sign in to comment.