OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
uhs/atomizer/atomizer/messages.hpp
Go to the documentation of this file.
1// Copyright (c) 2021 MIT Digital Currency Initiative,
2// Federal Reserve Bank of Boston
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#ifndef OPENCBDC_TX_SRC_ATOMIZER_MESSAGES_H_
7#define OPENCBDC_TX_SRC_ATOMIZER_MESSAGES_H_
8
9#include "block.hpp"
12
13namespace cbdc::atomizer {
22 auto operator==(const tx_notify_request& rhs) const -> bool;
23
28 std::unordered_set<uint64_t> m_attestations;
30 uint64_t m_block_height{};
31 };
32
52
58 auto operator==(const aggregate_tx_notify_request& rhs) const -> bool;
59
61 std::vector<aggregate_tx_notification> m_agg_txs;
62 };
63
66
70 uint64_t m_block_height{};
71 };
72
76 uint64_t m_block_height{};
77 };
78
80 using errors = std::vector<watchtower::tx_error>;
81
89
95
97 using request
98 = std::variant<tx_notify_request, prune_request, get_block_request>;
99}
100
101#endif
std::variant< tx_notify_request, prune_request, get_block_request > request
Atomizer RPC request.
std::vector< watchtower::tx_error > errors
List of watchtower errors returned by the atomizer state machine.
Transaction notification message with a full set of input attestations.
auto operator==(const aggregate_tx_notification &rhs) const -> bool
uint64_t m_oldest_attestation
Block height of the oldest input attestation used to build this aggregate notification.
transaction::compact_tx m_tx
Compact transaction associated with the notification.
Batch of aggregate transaction notifications.
std::vector< aggregate_tx_notification > m_agg_txs
Batch of aggregate transaction notifications.
auto operator==(const aggregate_tx_notify_request &rhs) const -> bool
Batch of compact transactions settled by the atomizer.
Definition block.hpp:19
uint64_t m_block_height
Block height to retrieve.
Atomizer state machine response from get block request.
Placeholder struct for a make block state machine request.
Response from atomizer state machine to a make block request.
errors m_errs
Watchtower errors resulting from block creation.
Prune blocks request for RPC and state machine.
uint64_t m_block_height
Block height below which to prune cached blocks.
std::unordered_set< uint64_t > m_attestations
Set of input indexes the shard is attesting are unspent at the given block height.
auto operator==(const tx_notify_request &rhs) const -> bool
transaction::compact_tx m_tx
Compact transaction associated with the notification.
uint64_t m_block_height
Block height at which the given input attestations are valid.
A condensed, hash-only transaction representation.
Messages atomizers and shards can use to transmit errors to the watchtower, and which the watchtower ...