Struct template_distribution_sv2::RequestTransactionDataSuccess [−][src]
pub struct RequestTransactionDataSuccess<'decoder> { pub template_id: u64, pub excess_data: B064K<'decoder>, pub transaction_list: Seq064K<'decoder, B016M<'decoder>>, }
Expand description
RequestTransactionData.Success (Server->Client)
A response to RequestTransactionData
which contains the set of full transaction data and
excess data required for validation. For practical purposes, the excess data is usually the
SegWit commitment, however the Job Negotiator MUST NOT parse or interpret the excess data
in any way. Note that the transaction data MUST be treated as opaque blobs and MUST include
any SegWit or other data which the Pool may require to verify the transaction. For practical
purposes, the transaction data is likely the witness-encoded transaction today. However, to
ensure backward compatibility, the transaction data MAY be encoded in a way that is different
from the consensus serialization of Bitcoin transactions.
Ultimately, having some method of negotiating the specific format of transactions between the
Template Provider and the Pool’s Template verification node would be overly burdensome,
thus the following requirements are made explicit. The RequestTransactionData.Success
sender MUST ensure that the data is provided in a forwards- and backwards-compatible way to
ensure the end receiver of the data can interpret it, even in the face of new,
consensus-optional data. This allows significantly more flexibility on both the
RequestTransactionData.Success-generating and -interpreting sides during upgrades, at the
cost of breaking some potential optimizations which would require version negotiation to
provide support for previous versions. For practical purposes, and as a non-normative
suggested implementation for Bitcoin Core, this implies that additional consensus-optional
data be appended at the end of transaction data. It will simply be ignored by versions which do
not understand it.
To work around the limitation of not being able to negotiate e.g. a transaction compression
scheme, the format of the opaque data in RequestTransactionData.Success messages MAY be
changed in non-compatible ways at the time a fork activates, given sufficient time from
code-release to activation (as any sane fork would have to have) and there being some
in-Template Negotiation Protocol signaling of support for the new fork (e.g. for soft-forks
activated using [BIP 9](TODO link)).
Fields
template_id: u64
The template_id corresponding to a NewTemplate/RequestTransactionData message.
excess_data: B064K<'decoder>
Extra data which the Pool may require to validate the work.
transaction_list: Seq064K<'decoder, B016M<'decoder>>
The transaction data, serialized as a series of B0_16M byte arrays.
Trait Implementations
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>
fn from_reader(reader: &mut impl Read) -> Result<Self, Error>
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<'decoder> RefUnwindSafe for RequestTransactionDataSuccess<'decoder>
impl<'decoder> Send for RequestTransactionDataSuccess<'decoder>
impl<'decoder> Sync for RequestTransactionDataSuccess<'decoder>
impl<'decoder> Unpin for RequestTransactionDataSuccess<'decoder>
impl<'decoder> !UnwindSafe for RequestTransactionDataSuccess<'decoder>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,