Monero
Loading...
Searching...
No Matches
cryptonote_basic.h
Go to the documentation of this file.
1// Copyright (c) 2014-2022, The Monero Project
2//
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without modification, are
6// permitted provided that the following conditions are met:
7//
8// 1. Redistributions of source code must retain the above copyright notice, this list of
9// conditions and the following disclaimer.
10//
11// 2. Redistributions in binary form must reproduce the above copyright notice, this list
12// of conditions and the following disclaimer in the documentation and/or other
13// materials provided with the distribution.
14//
15// 3. Neither the name of the copyright holder nor the names of its contributors may be
16// used to endorse or promote products derived from this software without specific
17// prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28//
29// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
30
31#pragma once
32
33#include <boost/variant.hpp>
34#include <boost/functional/hash/hash.hpp>
35#include <vector>
36#include <cstring> // memcmp
37#include <sstream>
38#include <atomic>
45#include "serialization/keyvalue_serialization.h" // eepe named serialization
46#include "cryptonote_config.h"
47#include "crypto/crypto.h"
48#include "crypto/hash.h"
49#include "misc_language.h"
50#include "ringct/rctTypes.h"
51#include "device/device.hpp"
53
54namespace cryptonote
55{
56 // These are guaranteed ceilings for the entire chain. Some fork rules may limit some further.
57 constexpr size_t COINBASE_VIN_COUNT = 1;
60 constexpr size_t MAX_COINBASE_VOUT_COUNT = /*LEVIN_DEFAULT_MAX_PACKET_SIZE=*/100000000 / sizeof(crypto::public_key);
62
63 /* outputs */
64
66 {
67 std::vector<crypto::public_key> keys;
68 std::vector<uint8_t> script;
69
71 FIELD(keys)
74 };
75
80
81 // outputs <= HF_VERSION_VIEW_TAGS
88
89 // outputs >= HF_VERSION_VIEW_TAGS
91 {
93 txout_to_tagged_key(const crypto::public_key &_key, const crypto::view_tag &_view_tag) : key(_key), view_tag(_view_tag) { }
95 crypto::view_tag view_tag; // optimization to reduce scanning time
96
98 FIELD(key)
101 };
102
103 /* inputs */
104
105 struct txin_gen
106 {
107 size_t height;
108
112 };
113
115 {
117 size_t prevout;
118 std::vector<uint8_t> sigset;
119
121 FIELD(prev)
125 };
126
141
154
155
157
159
160 //typedef std::pair<uint64_t, txout> out_t;
173
175 {
176
177 public:
178 // tx information
179 size_t version;
180 uint64_t unlock_time; //number of block (or time), used as a limitation like: spend this tx not early then block/time
181
182 std::vector<txin_v> vin;
183 std::vector<tx_out> vout;
184 //extra
185 std::vector<uint8_t> extra;
186
191 if (typename Archive<W>::is_saving())
192 {
193 // Serializing...
194 FIELD(vin)
195 FIELD(vout)
196 }
197 else
198 {
199 // De-serializing...
200 // vin
201 if (!this->deserialize_vin(ar))
202 {
203 ar.set_fail();
204 return false;
205 }
206
207 // vout
208 const size_t MAX_VOUT_COUNT = (this->is_coinbase() || vin.empty()) ? MAX_COINBASE_VOUT_COUNT : MAX_NON_COINBASE_VOUT_COUNT;
209 CONTAINER_FIELD_CAPPED(vout, MAX_VOUT_COUNT)
210 }
211 FIELD(extra)
213
214 //-----------------------------------------------------------------------
215 bool is_coinbase() const
216 {
217 if (vin.size() != COINBASE_VIN_COUNT)
218 return false;
219
220 if (vin.at(0).type() != typeid(txin_gen))
221 return false;
222
223 return true;
224 }
225 //-----------------------------------------------------------------------
226 private:
227 // Do some validation on vin before doing allocations and reading the archive:
228 // 1. Can't exceed MAX_VIN_COUNT.
229 // 2. If coinbase, only 1 txin_gen.
230 // 3. If not coinbase: type txin_to_key (see check_inputs_types_supported).
231 // 4. If not coinbase: key offsets don't exceed max allowed for whole tx.
232 // Note: can't enforce non-empty because wallets may store empty vin.
233 template<template <bool> class Archive>
234 bool deserialize_vin(Archive<false> &ar)
235 {
236 auto &v = vin;
237 size_t cnt = 0;
238 ar.begin_array(cnt);
239 if (!ar.good())
240 return false;
241 v.clear();
242
243 if (ar.remaining_bytes() < cnt)
244 return false;
245
246 // 1. Can't exceed MAX_VIN_COUNT.
247 if (cnt > MAX_VIN_COUNT)
248 return false;
249
251
252 size_t total_key_offsets = 0;
253 for (size_t i = 0; i < cnt; ++i) {
254 if (i > 0)
256 v.emplace_back();
258 return false;
259 if (!ar.good())
260 return false;
261
262 // 2. If coinbase, only 1 txin_gen.
263 const auto &in = v.back();
264 const bool coinbase = i == 0 && in.type() == typeid(txin_gen);
265 if (coinbase && cnt > COINBASE_VIN_COUNT)
266 return false;
267 if (coinbase)
268 break;
269
270 // 3. If not coinbase: type txin_to_key (see check_inputs_types_supported).
271 if (in.type() != typeid(txin_to_key))
272 return false;
273
274 // 4. If not coinbase: key offsets don't exceed max allowed for whole tx.
275 const std::size_t next_toal_key_offsets = total_key_offsets + boost::get<cryptonote::txin_to_key>(in).key_offsets.size();
276 if (next_toal_key_offsets < total_key_offsets)
277 return false; // overflow
278 if (next_toal_key_offsets >= MAX_TOTAL_KEY_OFFSETS)
279 return false;
280 total_key_offsets = next_toal_key_offsets;
281 }
282 ar.end_array();
283 v.shrink_to_fit();
284
285 return ar.good();
286 }
287
288 template<template <bool> class Archive>
289 bool deserialize_vin(Archive<true> &ar)
290 {
291 throw std::runtime_error("unexpected writer called deserialize_vin");
292 }
293
294 public:
296 void set_null()
297 {
298 version = 1;
299 unlock_time = 0;
300 vin.clear();
301 vout.clear();
302 extra.clear();
303 }
304 };
305
307 {
308 private:
309 // hash cash
310 mutable std::atomic<bool> hash_valid;
311 mutable std::atomic<bool> prunable_hash_valid;
312 mutable std::atomic<bool> blob_size_valid;
313
314 public:
315 std::vector<std::vector<crypto::signature> > signatures; //count signatures always the same as inputs count
317
318 // hash cash
321 mutable size_t blob_size;
322
323 bool pruned;
324
325 std::atomic<unsigned int> unprunable_size;
326 std::atomic<unsigned int> prefix_size;
327
328 transaction();
329 transaction(const transaction &t);
331 virtual ~transaction();
332 void set_null();
333 void invalidate_hashes();
334 bool is_hash_valid() const { return hash_valid.load(std::memory_order_acquire); }
335 void set_hash_valid(bool v) const { hash_valid.store(v,std::memory_order_release); }
336 bool is_prunable_hash_valid() const { return prunable_hash_valid.load(std::memory_order_acquire); }
337 void set_prunable_hash_valid(bool v) const { prunable_hash_valid.store(v,std::memory_order_release); }
338 bool is_blob_size_valid() const { return blob_size_valid.load(std::memory_order_acquire); }
339 void set_blob_size_valid(bool v) const { blob_size_valid.store(v,std::memory_order_release); }
340 void set_hash(const crypto::hash &h) const { hash = h; set_hash_valid(true); }
342 void set_blob_size(size_t sz) const { blob_size = sz; set_blob_size_valid(true); }
343
345 if (!typename Archive<W>::is_saving())
346 {
347 set_hash_valid(false);
349 set_blob_size_valid(false);
350 }
351
352 const auto start_pos = ar.getpos();
353
354 FIELDS(*static_cast<transaction_prefix *>(this))
355
356 if (std::is_same<Archive<W>, binary_archive<W>>())
357 prefix_size = ar.getpos() - start_pos;
358
359 if (version == 1)
360 {
361 if (std::is_same<Archive<W>, binary_archive<W>>())
363
364 ar.tag("signatures");
365 ar.begin_array();
367 bool signatures_not_expected = signatures.empty();
368 if (!signatures_not_expected && vin.size() != signatures.size())
369 return false;
370
371 if (!pruned) for (size_t i = 0; i < vin.size(); ++i)
372 {
373 size_t signature_size = get_signature_size(vin[i]);
374 if (signatures_not_expected)
375 {
376 if (0 == signature_size)
377 continue;
378 else
379 return false;
380 }
381
383 if (signature_size != signatures[i].size())
384 return false;
385
386 FIELDS(signatures[i]);
387
388 if (vin.size() - i > 1)
390 }
391 ar.end_array();
392 }
393 else
394 {
395 ar.tag("rct_signatures");
396 if (!vin.empty())
397 {
399 bool r = rct_signatures.serialize_rctsig_base(ar, vin.size(), vout.size());
400 if (!r || !ar.good()) return false;
401 ar.end_object();
402
403 if (std::is_same<Archive<W>, binary_archive<W>>())
405
407 {
408 ar.tag("rctsig_prunable");
411 vin.size() > 0 && vin[0].type() == typeid(txin_to_key) ? boost::get<txin_to_key>(vin[0]).key_offsets.size() - 1 : 0);
412 if (!r || !ar.good()) return false;
413 ar.end_object();
414 }
415 }
416 }
417 if (!typename Archive<W>::is_saving())
418 pruned = false;
420
421 template<bool W, template <bool> class Archive>
422 bool serialize_base(Archive<W> &ar)
423 {
424 FIELDS(*static_cast<transaction_prefix *>(this))
425
426 if (version == 1)
427 {
428 }
429 else
430 {
431 ar.tag("rct_signatures");
432 if (!vin.empty())
433 {
435 bool r = rct_signatures.serialize_rctsig_base(ar, vin.size(), vout.size());
436 if (!r || !ar.good()) return false;
437 ar.end_object();
438 }
439 }
440 if (!typename Archive<W>::is_saving())
441 pruned = true;
442 return ar.good();
443 }
444
445 private:
446 static size_t get_signature_size(const txin_v& tx_in);
447 };
448
456 pruned(t.pruned),
458 prefix_size(t.prefix_size.load())
459 {
460 if (t.is_hash_valid())
461 {
462 hash = t.hash;
463 set_hash_valid(true);
464 }
465 if (t.is_blob_size_valid())
466 {
467 blob_size = t.blob_size;
468 set_blob_size_valid(true);
469 }
470 if (t.is_prunable_hash_valid())
471 {
472 prunable_hash = t.prunable_hash;
473 set_prunable_hash_valid(true);
474 }
475 }
476
478 {
479 transaction_prefix::operator=(t);
480
481 set_hash_valid(false);
483 set_blob_size_valid(false);
484 signatures = t.signatures;
485 rct_signatures = t.rct_signatures;
486 if (t.is_hash_valid())
487 {
488 hash = t.hash;
489 set_hash_valid(true);
490 }
491 if (t.is_prunable_hash_valid())
492 {
493 prunable_hash = t.prunable_hash;
495 }
496 if (t.is_blob_size_valid())
497 {
498 blob_size = t.blob_size;
500 }
501 pruned = t.pruned;
502 unprunable_size = t.unprunable_size.load();
503 prefix_size = t.prefix_size.load();
504 return *this;
505 }
506
507 inline
509 {
510 set_null();
511 }
512
513 inline
517
518 inline
520 {
522 signatures.clear();
524 set_hash_valid(false);
526 set_blob_size_valid(false);
527 pruned = false;
528 unprunable_size = 0;
529 prefix_size = 0;
530 }
531
532 inline
534 {
535 set_hash_valid(false);
537 set_blob_size_valid(false);
538 }
539
540 inline
542 {
543 struct txin_signature_size_visitor : public boost::static_visitor<size_t>
544 {
545 size_t operator()(const txin_gen& txin) const{return 0;}
546 size_t operator()(const txin_to_script& txin) const{return 0;}
547 size_t operator()(const txin_to_scripthash& txin) const{return 0;}
548 size_t operator()(const txin_to_key& txin) const {return txin.key_offsets.size();}
549 };
550
551 return boost::apply_visitor(txin_signature_size_visitor(), tx_in);
552 }
553
554
555
556 /************************************************************************/
557 /* */
558 /************************************************************************/
560 {
562 uint8_t minor_version; // now used as a voting mechanism, rather than how this particular block is built
566
572 FIELD(nonce)
574 };
575
576 struct block: public block_header
577 {
578 private:
579 // hash cash
580 mutable std::atomic<bool> hash_valid;
581
582 public:
584 block(const block &b): block_header(b), hash_valid(false), miner_tx(b.miner_tx), tx_hashes(b.tx_hashes) { if (b.is_hash_valid()) { hash = b.hash; set_hash_valid(true); } }
585 block &operator=(const block &b) { block_header::operator=(b); hash_valid = false; miner_tx = b.miner_tx; tx_hashes = b.tx_hashes; if (b.is_hash_valid()) { hash = b.hash; set_hash_valid(true); } return *this; }
587 bool is_hash_valid() const { return hash_valid.load(std::memory_order_acquire); }
588 void set_hash_valid(bool v) const { hash_valid.store(v,std::memory_order_release); }
589 void set_hash(const crypto::hash &h) const { hash = h; set_hash_valid(true); }
590
592 std::vector<crypto::hash> tx_hashes;
593
594 // hash cash
596
598 if (!typename Archive<W>::is_saving())
600
601 FIELDS(*static_cast<block_header *>(this))
605 return false;
607 };
608
609
610 /************************************************************************/
611 /* */
612 /************************************************************************/
639
640 struct keypair
641 {
644
645 static inline keypair generate(hw::device &hwdev)
646 {
647 keypair k;
648 hwdev.generate_keys(k.pub, k.sec);
649 return k;
650 }
651 };
652 //---------------------------------------------------------------
653
654}
655
656namespace std {
657 template <>
658 struct hash<cryptonote::account_public_address>
659 {
660 std::size_t operator()(const cryptonote::account_public_address& addr) const
661 {
662 // https://stackoverflow.com/a/17017281
663 size_t res = 17;
664 res = res * 31 + hash<crypto::public_key>()(addr.m_spend_public_key);
665 res = res * 31 + hash<crypto::public_key>()(addr.m_view_public_key);
666 return res;
667 }
668 };
669}
670
673
684
695
cryptonote::block b
Definition block.cpp:40
std::vector< uint8_t > extra
Definition cryptonote_basic.h:185
bool is_coinbase() const
Definition cryptonote_basic.h:215
if(version==0||CURRENT_TRANSACTION_VERSION< version) return false
std::vector< txin_v > vin
Definition cryptonote_basic.h:182
size_t version
Definition cryptonote_basic.h:179
transaction_prefix()
Definition cryptonote_basic.h:295
bool deserialize_vin(Archive< false > &ar)
Definition cryptonote_basic.h:234
void set_null()
Definition cryptonote_basic.h:296
std::vector< tx_out > vout
Definition cryptonote_basic.h:183
bool deserialize_vin(Archive< true > &ar)
Definition cryptonote_basic.h:289
uint64_t unlock_time
Definition cryptonote_basic.h:180
Definition cryptonote_basic.h:307
const auto start_pos
Definition cryptonote_basic.h:352
bool is_hash_valid() const
Definition cryptonote_basic.h:334
bool is_prunable_hash_valid() const
Definition cryptonote_basic.h:336
rct::rctSig rct_signatures
Definition cryptonote_basic.h:316
std::atomic< bool > blob_size_valid
Definition cryptonote_basic.h:312
void set_null()
Definition cryptonote_basic.h:519
transaction()
Definition cryptonote_basic.h:508
void set_blob_size(size_t sz) const
Definition cryptonote_basic.h:342
std::atomic< unsigned int > unprunable_size
Definition cryptonote_basic.h:325
void set_prunable_hash(const crypto::hash &h) const
Definition cryptonote_basic.h:341
std::atomic< unsigned int > prefix_size
Definition cryptonote_basic.h:326
bool pruned
Definition cryptonote_basic.h:323
void set_hash(const crypto::hash &h) const
Definition cryptonote_basic.h:340
void set_hash_valid(bool v) const
Definition cryptonote_basic.h:335
bool serialize_base(Archive< W > &ar)
Definition cryptonote_basic.h:422
static size_t get_signature_size(const txin_v &tx_in)
Definition cryptonote_basic.h:541
if(!typename Archive< W >::is_saving())
Definition cryptonote_basic.h:345
void set_prunable_hash_valid(bool v) const
Definition cryptonote_basic.h:337
transaction & operator=(const transaction &t)
Definition cryptonote_basic.h:477
std::atomic< bool > prunable_hash_valid
Definition cryptonote_basic.h:311
crypto::hash prunable_hash
Definition cryptonote_basic.h:320
std::vector< std::vector< crypto::signature > > signatures
Definition cryptonote_basic.h:315
void invalidate_hashes()
Definition cryptonote_basic.h:533
virtual ~transaction()
Definition cryptonote_basic.h:514
size_t blob_size
Definition cryptonote_basic.h:321
void set_blob_size_valid(bool v) const
Definition cryptonote_basic.h:339
crypto::hash hash
Definition cryptonote_basic.h:319
bool is_blob_size_valid() const
Definition cryptonote_basic.h:338
std::atomic< bool > hash_valid
Definition cryptonote_basic.h:310
Definition device.hpp:87
virtual crypto::secret_key generate_keys(crypto::public_key &pub, crypto::secret_key &sec, const crypto::secret_key &recovery_key=crypto::secret_key(), bool recover=false)=0
binary_archive< false > ar
Definition cold-outputs.cpp:54
#define CRYPTONOTE_MAX_TX_PER_BLOCK
Definition cryptonote_config.h:42
#define CURRENT_TRANSACTION_VERSION
Definition cryptonote_config.h:45
#define CRYPTONOTE_MAX_TX_SIZE
Definition cryptonote_config.h:41
#define BEGIN_SERIALIZE()
#define BEGIN_SERIALIZE_OBJECT()
#define BLOB_SERIALIZER(T)
#define FIELD(f)
#define false
#define CONTAINER_FIELD_CAPPED(f, c)
#define FIELDS(f)
#define END_SERIALIZE()
#define VARIANT_TAG(Archive, Type, Tag)
#define VARINT_FIELD(f)
#define PREPARE_CUSTOM_VECTOR_SERIALIZATION(size, vec, min_wire)
JSON archive.
#define KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(varialble)
Definition keyvalue_serialization.h:123
#define END_KV_SERIALIZE_MAP()
Definition keyvalue_serialization.h:118
#define BEGIN_KV_SERIALIZE_MAP()
Definition keyvalue_serialization.h:43
Definition portable_binary_archive.hpp:29
POD_CLASS signature
Definition crypto.h:98
epee::mlocked< tools::scrubbed< ec_scalar > > secret_key
Definition crypto.h:72
POD_CLASS view_tag
Definition crypto.h:103
POD_CLASS public_key
Definition crypto.h:64
POD_CLASS key_image
Definition crypto.h:95
POD_CLASS hash
Definition hash.h:49
Holds cryptonote related classes and helpers.
Definition blockchain_db.cpp:45
constexpr size_t COINBASE_VIN_COUNT
Definition cryptonote_basic.h:57
boost::variant< txout_to_script, txout_to_scripthash, txout_to_key, txout_to_tagged_key > txout_target_v
Definition cryptonote_basic.h:158
constexpr size_t MAX_COINBASE_VOUT_COUNT
Definition cryptonote_basic.h:60
constexpr size_t MAX_TOTAL_KEY_OFFSETS
Definition cryptonote_basic.h:61
boost::variant< txin_gen, txin_to_script, txin_to_scripthash, txin_to_key > txin_v
Definition cryptonote_basic.h:156
constexpr size_t MAX_NON_COINBASE_VOUT_COUNT
Definition cryptonote_basic.h:59
constexpr size_t MAX_VIN_COUNT
Definition cryptonote_basic.h:58
@ RCTTypeNull
Definition rctTypes.h:299
void do_reserve(const C &...)
Reserve space for N elements if applicable for container.
Definition container.h:68
std::enable_if<!use_container_varint< T >(), bool >::type serialize_container_element(Archive &ar, T &e)
Definition container.h:49
Definition enums.h:68
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
unsigned __int64 uint64_t
Definition stdint.h:136
bool good() const noexcept
Definition binary_archive.h:99
void begin_array(size_t &s)
Definition binary_archive.h:153
void delimit_array()
Definition binary_archive.h:159
size_t remaining_bytes() const noexcept
Definition binary_archive.h:169
void end_array()
Definition binary_archive.h:160
std::size_t getpos() const noexcept
Definition binary_archive.h:104
void set_fail() noexcept
Definition binary_archive.h:100
void begin_object()
Definition binary_archive.h:72
void end_object()
Definition binary_archive.h:73
void tag(const char *)
Definition binary_archive.h:71
Definition binary_archive.h:89
Definition cryptonote_basic.h:614
crypto::public_key m_view_public_key
Definition cryptonote_basic.h:616
bool operator!=(const account_public_address &rhs) const
Definition cryptonote_basic.h:634
crypto::public_key m_spend_public_key
Definition cryptonote_basic.h:615
Definition cryptonote_basic.h:560
crypto::hash prev_id
Definition cryptonote_basic.h:564
uint64_t timestamp
Definition cryptonote_basic.h:563
uint8_t minor_version
Definition cryptonote_basic.h:562
uint8_t major_version
Definition cryptonote_basic.h:561
uint32_t nonce
Definition cryptonote_basic.h:565
Definition cryptonote_basic.h:577
transaction miner_tx
Definition cryptonote_basic.h:591
void set_hash(const crypto::hash &h) const
Definition cryptonote_basic.h:589
void invalidate_hashes()
Definition cryptonote_basic.h:586
block()
Definition cryptonote_basic.h:583
crypto::hash hash
Definition cryptonote_basic.h:595
block & operator=(const block &b)
Definition cryptonote_basic.h:585
bool is_hash_valid() const
Definition cryptonote_basic.h:587
void set_hash_valid(bool v) const
Definition cryptonote_basic.h:588
block(const block &b)
Definition cryptonote_basic.h:584
std::vector< crypto::hash > tx_hashes
Definition cryptonote_basic.h:592
if(!typename Archive< W >::is_saving()) set_hash_valid(false)
std::atomic< bool > hash_valid
Definition cryptonote_basic.h:580
Definition cryptonote_basic.h:641
crypto::secret_key sec
Definition cryptonote_basic.h:643
static keypair generate(hw::device &hwdev)
Definition cryptonote_basic.h:645
crypto::public_key pub
Definition cryptonote_basic.h:642
Definition cryptonote_basic.h:162
txout_target_v target
Definition cryptonote_basic.h:164
uint64_t amount
Definition cryptonote_basic.h:163
Definition cryptonote_basic.h:106
size_t height
Definition cryptonote_basic.h:107
Definition cryptonote_basic.h:143
crypto::key_image k_image
Definition cryptonote_basic.h:146
std::vector< uint64_t > key_offsets
Definition cryptonote_basic.h:145
uint64_t amount
Definition cryptonote_basic.h:144
Definition cryptonote_basic.h:115
crypto::hash prev
Definition cryptonote_basic.h:116
std::vector< uint8_t > sigset
Definition cryptonote_basic.h:118
size_t prevout
Definition cryptonote_basic.h:117
Definition cryptonote_basic.h:128
size_t prevout
Definition cryptonote_basic.h:130
std::vector< uint8_t > sigset
Definition cryptonote_basic.h:132
txout_to_script script
Definition cryptonote_basic.h:131
crypto::hash prev
Definition cryptonote_basic.h:129
Definition cryptonote_basic.h:83
crypto::public_key key
Definition cryptonote_basic.h:86
txout_to_key()
Definition cryptonote_basic.h:84
txout_to_key(const crypto::public_key &_key)
Definition cryptonote_basic.h:85
Definition cryptonote_basic.h:66
std::vector< crypto::public_key > keys
Definition cryptonote_basic.h:67
std::vector< uint8_t > script
Definition cryptonote_basic.h:68
Definition cryptonote_basic.h:77
crypto::hash hash
Definition cryptonote_basic.h:78
Definition cryptonote_basic.h:91
txout_to_tagged_key(const crypto::public_key &_key, const crypto::view_tag &_view_tag)
Definition cryptonote_basic.h:93
txout_to_tagged_key()
Definition cryptonote_basic.h:92
crypto::public_key key
Definition cryptonote_basic.h:94
crypto::view_tag view_tag
Definition cryptonote_basic.h:95
Definition debug_archive.h:37
a archive using the JSON standard
Definition json_archive.h:116
uint8_t type
Definition rctTypes.h:319
bool serialize_rctsig_base(Archive< W > &ar, size_t inputs, size_t outputs)
Definition rctTypes.h:333
bool serialize_rctsig_prunable(Archive< W > &ar, uint8_t type, size_t inputs, size_t outputs, size_t mixin)
Definition rctTypes.h:432
Definition rctTypes.h:625
rctSigPrunable p
Definition rctTypes.h:626
std::size_t operator()(const cryptonote::account_public_address &addr) const
Definition cryptonote_basic.h:660
for dealing with variants