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

ZIP-239: implement mempool transaction v5 data structures and network messages #2449

Closed
4 tasks done
Tracked by #2309
jvff opened this issue Jul 6, 2021 · 0 comments · Fixed by #2638
Closed
4 tasks done
Tracked by #2309

ZIP-239: implement mempool transaction v5 data structures and network messages #2449

jvff opened this issue Jul 6, 2021 · 0 comments · Fixed by #2638
Assignees
Labels
A-network Area: Network protocol updates or fixes A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement NU-5 Network Upgrade: NU5 specific tasks

Comments

@jvff
Copy link
Contributor

jvff commented Jul 6, 2021

Motivation

When the mempool is implemented, Zebra must conform to ZIP-239 in order to properly relay transactions to the network.

This ticket focuses on parsing the data structures from ZIP-239, and sending the corresponding network messages.

Specifications

ZIP-239 describes the consensus rules for a new MSG_WTX inventory type, that MUST be used when relaying V5 transactions.

A new inv type MSG_WTX (0x00000005) is added, for use in both inv messages and getdata requests, indicating that the hash being referenced is the wtxid (i.e. the 64-byte value txid || auth_digest).

NOTE: #2446 added a Message::Wtx variant, but the txid and auth_digest were not specifically defined.

This inv type MUST be used when announcing v5 transactions. The txid and auth_digest are as defined in 4.

An inv or getdata message MUST NOT use the MSG_WTX inv type for v4 or earlier transactions

Designs

Zebra currently parses the wide transaction ID Inv type in zebra_network::protocol::external.

But we also need to:

Related Work

#2233 and #2446 added an initial Message::Wtx variant for ZIP-239, and implemented serialization and deserialization of it.

The transaction ID for V5 transactions (with the auth_digest) is defined in ZIP-244, and implemented in #2129.

@jvff jvff added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Jul 6, 2021
@teor2345 teor2345 changed the title Implement ZIP-239 consensus rules Implement ZIP-239 consensus rules for v5 mempool transactions Jul 7, 2021
@teor2345 teor2345 changed the title Implement ZIP-239 consensus rules for v5 mempool transactions ZIP-239: v5 mempool transaction data structures Jul 7, 2021
@teor2345 teor2345 added A-network Area: Network protocol updates or fixes A-rust Area: Updates to Rust code NU-5 Network Upgrade: NU5 specific tasks P-Medium labels Jul 7, 2021
@teor2345 teor2345 changed the title ZIP-239: v5 mempool transaction data structures ZIP-239: v5 mempool transaction data structures and messages Jul 7, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Jul 19, 2021
@mpguerra mpguerra mentioned this issue Aug 11, 2021
59 tasks
@teor2345 teor2345 changed the title ZIP-239: v5 mempool transaction data structures and messages ZIP-239: add mempool transaction v5 data structures and network messages Aug 11, 2021
@teor2345 teor2345 changed the title ZIP-239: add mempool transaction v5 data structures and network messages ZIP-239: implement mempool transaction v5 data structures and network messages Aug 11, 2021
@teor2345 teor2345 added this to the 2021 Sprint 16 milestone Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement NU-5 Network Upgrade: NU5 specific tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants