Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove binary sv2 serde #1459

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 0 additions & 8 deletions .github/workflows/coverage-protocols.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ jobs:
file: ./protocols/target/tarpaulin-reports/binary-sv2-coverage/cobertura.xml
flags: binary_sv2-coverage
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload binary_serde_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin-reports/serde-sv2-coverage
file: ./protocols/target/tarpaulin-reports/serde-sv2-coverage/cobertura.xml
flags: binary_serde_sv2-coverage
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload codec_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,16 @@ jobs:
cd utils/buffer
cargo doc

- name: Rust Docs crate no_serde_sv2_derive_codec
- name: Rust Docs crate binary_sv2 derive_codec
run: |
cd protocols/v2/binary-sv2/no-serde-sv2/derive_codec
cd protocols/v2/binary-sv2/derive_codec
cargo doc

- name: Rust Docs crate no_serde_sv2_codec
- name: Rust Docs crate binary_sv2 codec
run: |
cd protocols/v2/binary-sv2/no-serde-sv2/codec
cd protocols/v2/binary-sv2/codec
cargo doc --features with_buffer_pool

- name: Rust Docs crate serde_sv2
run: |
cd protocols/v2/binary-sv2/serde-sv2
cargo doc

- name: Rust Docs crate binary_sv2
run: |
cd protocols/v2/binary-sv2/binary-sv2
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/release-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ jobs:
run: |
./scripts/release-libs.sh utils/buffer

- name: Publish crate no_serde_sv2_derive_codec
- name: Publish crate binary_sv2 derive_codec
run: |
./scripts/release-libs.sh protocols/v2/binary-sv2/no-serde-sv2/derive_codec
./scripts/release-libs.sh protocols/v2/binary-sv2/derive_codec

- name: Publish crate no_serde_sv2_codec
- name: Publish crate binary_sv2 codec
run: |
./scripts/release-libs.sh protocols/v2/binary-sv2/no-serde-sv2/codec

- name: Publish crate serde_sv2
run: |
./scripts/release-libs.sh protocols/v2/binary-sv2/serde-sv2
./scripts/release-libs.sh protocols/v2/binary-sv2/codec

- name: Publish crate binary_sv2
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ jobs:
working-directory: utils/buffer
run: cargo semver-checks

- name: Run semver checks for protocols/v2/binary-sv2/no-serde-sv2/codec
working-directory: protocols/v2/binary-sv2/no-serde-sv2/codec
run: cargo semver-checks

- name: Run semver checks for protocols/v2/binary-sv2/serde-sv2
working-directory: protocols/v2/binary-sv2/serde-sv2
- name: Run semver checks for protocols/v2/binary-sv2/codec
working-directory: protocols/v2/binary-sv2/codec
run: cargo semver-checks

- name: Run semver checks for protocols/v2/binary-sv2/binary-sv2
Expand Down
6 changes: 3 additions & 3 deletions examples/interop-cpp-no-cargo/rust-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rustc \
rustc \
--crate-name binary_codec_sv2 \
--edition=2018 \
$ROOT/binary-sv2/no-serde-sv2/codec/src/lib.rs \
$ROOT/binary-sv2/codec/src/lib.rs \
--error-format=json \
--json=diagnostic-rendered-ansi \
--crate-type lib \
Expand All @@ -40,7 +40,7 @@ rustc \
rustc \
--crate-name binary_codec_sv2 \
--edition=2018 \
$ROOT/binary-sv2/no-serde-sv2/codec/src/lib.rs \
$ROOT/binary-sv2/codec/src/lib.rs \
--error-format=json \
--json=diagnostic-rendered-ansi,artifacts \
--crate-type lib \
Expand All @@ -66,7 +66,7 @@ rustc \
rustc \
--crate-name derive_codec_sv2 \
--edition=2018 \
$ROOT/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs \
$ROOT/binary-sv2/derive_codec/src/lib.rs \
--error-format=json \
--json=diagnostic-rendered-ansi \
--crate-type proc-macro \
Expand Down
5 changes: 2 additions & 3 deletions protocols/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ resolver="2"

members = [
"v1",
"v2/binary-sv2/serde-sv2",
"v2/binary-sv2/no-serde-sv2/codec",
"v2/binary-sv2/no-serde-sv2/derive_codec",
"v2/binary-sv2/codec",
"v2/binary-sv2/derive_codec",
"v2/binary-sv2/binary-sv2",
"v2/noise-sv2",
"v2/framing-sv2",
Expand Down
2 changes: 1 addition & 1 deletion protocols/fuzz-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cargo-fuzz = true
libfuzzer-sys = { version = "0.4.0", features = ["arbitrary-derive"] }
arbitrary = { version = "1", features = ["derive"] }
rand = "0.8.3"
binary_codec_sv2 = { path = "../v2/binary-sv2/no-serde-sv2/codec"}
binary_codec_sv2 = { path = "../v2/binary-sv2/codec"}
codec_sv2 = { path = "../v2/codec-sv2", features = ["noise_sv2"]}
roles_logic_sv2 = { path = "../v2/roles-logic-sv2"}
affinity = "0.1.1"
Expand Down
9 changes: 3 additions & 6 deletions protocols/v2/binary-sv2/binary-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "binary_sv2"
version = "1.2.1"
version = "2.0.0"
authors = ["The Stratum V2 Developers"]
edition = "2018"
readme = "README.md"
Expand All @@ -14,15 +14,12 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde_sv2 = { path = "../serde-sv2", optional = true }
serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true }
binary_codec_sv2 = { path = "../no-serde-sv2/codec", optional = true }
derive_codec_sv2 = { path = "../no-serde-sv2/derive_codec", optional = true }
binary_codec_sv2 = { path = "../codec", optional = true }
derive_codec_sv2 = { path = "../derive_codec", optional = true }

[features]
default = ["core"]
core = ["binary_codec_sv2", "derive_codec_sv2"]
with_serde = ["serde_sv2", "serde"]
prop_test = ["binary_codec_sv2/prop_test", "derive_codec_sv2"]
with_buffer_pool = ["binary_codec_sv2/with_buffer_pool", "derive_codec_sv2"]

Expand Down
1 change: 0 additions & 1 deletion protocols/v2/binary-sv2/binary-sv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

## Features

- **with_serde**: Enables `serde`-based encoding and decoding.
- **core**: Activates non-`serde` implementations via `binary_codec_sv2` and `derive_codec_sv2`.(default)
- **prop_test**: Adds property testing support.
- **with_buffer_pool**: Optimizes memory usage during encoding.
Expand Down
Loading
Loading