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

merge-queue: embarking main (3b839b7) and [#4695 + #4693] together #4705

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
if: ${{ needs.changed-files.outputs.workflows == 'true' }}
steps:
- uses: actions/[email protected]
- uses: reviewdog/action-actionlint@v1.25.1
- uses: reviewdog/action-actionlint@v1.26.0
with:
level: warning
fail_on_error: false
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/serialization/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Errors for transaction serialization.
//! Errors for Zcash consensus-critical serialization.

use std::{array::TryFromSliceError, io, num::TryFromIntError, str::Utf8Error};

Expand Down
18 changes: 8 additions & 10 deletions zebra-chain/src/serialization/zcash_deserialize.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
use std::{
convert::{TryFrom, TryInto},
io,
net::Ipv6Addr,
sync::Arc,
};
//! Converting bytes into Zcash consensus-critical data structures.

use std::{io, net::Ipv6Addr, sync::Arc};

use super::{AtLeastOne, CompactSizeMessage, SerializationError, MAX_PROTOCOL_MESSAGE_LEN};

/// Consensus-critical serialization for Zcash.
/// Consensus-critical deserialization for Zcash.
///
/// This trait provides a generic deserialization for consensus-critical
/// formats, such as network messages, transactions, blocks, etc. It is intended
/// for use only in consensus-critical contexts; in other contexts, such as
/// internal storage, it would be preferable to use Serde.
/// formats, such as network messages, transactions, blocks, etc.
///
/// It is intended for use only for consensus-critical formats.
/// Internal deserialization can freely use `serde`, or any other format.
pub trait ZcashDeserialize: Sized {
/// Try to read `self` from the given `reader`.
///
Expand Down
11 changes: 7 additions & 4 deletions zebra-chain/src/serialization/zcash_serialize.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use std::{convert::TryInto, io, net::Ipv6Addr};
//! Converting Zcash consensus-critical data structures into bytes.

use std::{io, net::Ipv6Addr};

use super::{AtLeastOne, CompactSizeMessage};

Expand All @@ -10,9 +12,10 @@ pub const MAX_PROTOCOL_MESSAGE_LEN: usize = 2 * 1024 * 1024;
/// Consensus-critical serialization for Zcash.
///
/// This trait provides a generic serialization for consensus-critical
/// formats, such as network messages, transactions, blocks, etc. It is intended
/// for use only in consensus-critical contexts; in other contexts, such as
/// internal storage, it would be preferable to use Serde.
/// formats, such as network messages, transactions, blocks, etc.
///
/// It is intended for use only for consensus-critical formats.
/// Internal serialization can freely use `serde`, or any other format.
pub trait ZcashSerialize: Sized {
/// Write `self` to the given `writer` using the canonical format.
///
Expand Down