Monero
core_rpc_server_commands_defs.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2020, 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 "string_tools.h"
34 
38 #include "crypto/hash.h"
39 #include "rpc/rpc_handler.h"
40 #include "common/varint.h"
41 #include "common/perf_timer.h"
42 
43 namespace
44 {
45  template<typename T>
46  std::string compress_integer_array(const std::vector<T> &v)
47  {
48  std::string s;
49  s.resize(v.size() * (sizeof(T) * 8 / 7 + 1));
50  char *ptr = (char*)s.data();
51  for (const T &t: v)
52  tools::write_varint(ptr, t);
53  s.resize(ptr - s.data());
54  return s;
55  }
56 
57  template<typename T>
58  std::vector<T> decompress_integer_array(const std::string &s)
59  {
60  std::vector<T> v;
61  v.reserve(s.size());
62  int read = 0;
63  const std::string::const_iterator end = s.end();
64  for (std::string::const_iterator i = s.begin(); i != end; std::advance(i, read))
65  {
66  T t;
67  read = tools::read_varint(std::string::const_iterator(i), s.end(), t);
68  CHECK_AND_ASSERT_THROW_MES(read > 0 && read <= 256, "Error decompressing data");
69  v.push_back(t);
70  }
71  return v;
72  }
73 }
74 
75 namespace cryptonote
76 {
77  //-----------------------------------------------
78 #define CORE_RPC_STATUS_OK "OK"
79 #define CORE_RPC_STATUS_BUSY "BUSY"
80 #define CORE_RPC_STATUS_NOT_MINING "NOT MINING"
81 #define CORE_RPC_STATUS_PAYMENT_REQUIRED "PAYMENT REQUIRED"
82 
83 // When making *any* change here, bump minor
84 // If the change is incompatible, then bump major and set minor to 0
85 // This ensures CORE_RPC_VERSION always increases, that every change
86 // has its own version, and that clients can just test major to see
87 // whether they can talk to a given daemon without having to know in
88 // advance which version they will stop working with
89 // Don't go over 32767 for any of these
90 #define CORE_RPC_VERSION_MAJOR 3
91 #define CORE_RPC_VERSION_MINOR 2
92 #define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
93 #define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
94 
96  {
97  BEGIN_KV_SERIALIZE_MAP()
98  END_KV_SERIALIZE_MAP()
99  };
100 
102  {
103  std::string status;
104  bool untrusted;
105 
107 
108  BEGIN_KV_SERIALIZE_MAP()
109  KV_SERIALIZE(status)
110  KV_SERIALIZE(untrusted)
111  END_KV_SERIALIZE_MAP()
112  };
113 
115  {
116  std::string client;
117 
118  BEGIN_KV_SERIALIZE_MAP()
119  KV_SERIALIZE_PARENT(rpc_request_base)
120  KV_SERIALIZE(client)
121  END_KV_SERIALIZE_MAP()
122  };
123 
125  {
126  uint64_t credits;
127  std::string top_hash;
128 
129  rpc_access_response_base(): credits(0) {}
130 
131  BEGIN_KV_SERIALIZE_MAP()
132  KV_SERIALIZE_PARENT(rpc_response_base)
133  KV_SERIALIZE(credits)
134  KV_SERIALIZE(top_hash)
135  END_KV_SERIALIZE_MAP()
136  };
137 
139  {
141  {
142  BEGIN_KV_SERIALIZE_MAP()
143  KV_SERIALIZE_PARENT(rpc_request_base)
144  END_KV_SERIALIZE_MAP()
145  };
146  typedef epee::misc_utils::struct_init<request_t> request;
147 
149  {
150  uint64_t height;
151  std::string hash;
152 
153  BEGIN_KV_SERIALIZE_MAP()
154  KV_SERIALIZE_PARENT(rpc_response_base)
155  KV_SERIALIZE(height)
156  KV_SERIALIZE(hash)
157  END_KV_SERIALIZE_MAP()
158  };
159  typedef epee::misc_utils::struct_init<response_t> response;
160  };
161 
163  {
164 
166  {
167  std::list<crypto::hash> block_ids; //*first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */
168  uint64_t start_height;
169  bool prune;
171  BEGIN_KV_SERIALIZE_MAP()
172  KV_SERIALIZE_PARENT(rpc_access_request_base)
173  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids)
174  KV_SERIALIZE(start_height)
175  KV_SERIALIZE(prune)
176  KV_SERIALIZE_OPT(no_miner_tx, false)
177  END_KV_SERIALIZE_MAP()
178  };
179  typedef epee::misc_utils::struct_init<request_t> request;
180 
182  {
183  std::vector<uint64_t> indices;
184 
185  BEGIN_KV_SERIALIZE_MAP()
186  KV_SERIALIZE(indices)
187  END_KV_SERIALIZE_MAP()
188  };
189 
191  {
192  std::vector<tx_output_indices> indices;
193 
194  BEGIN_KV_SERIALIZE_MAP()
195  KV_SERIALIZE(indices)
196  END_KV_SERIALIZE_MAP()
197  };
198 
200  {
201  std::vector<block_complete_entry> blocks;
202  uint64_t start_height;
203  uint64_t current_height;
204  std::vector<block_output_indices> output_indices;
205 
206  BEGIN_KV_SERIALIZE_MAP()
207  KV_SERIALIZE_PARENT(rpc_access_response_base)
208  KV_SERIALIZE(blocks)
209  KV_SERIALIZE(start_height)
210  KV_SERIALIZE(current_height)
211  KV_SERIALIZE(output_indices)
212  END_KV_SERIALIZE_MAP()
213  };
214  typedef epee::misc_utils::struct_init<response_t> response;
215  };
216 
218  {
220  {
221  std::vector<uint64_t> heights;
222  BEGIN_KV_SERIALIZE_MAP()
223  KV_SERIALIZE_PARENT(rpc_access_request_base)
224  KV_SERIALIZE(heights)
225  END_KV_SERIALIZE_MAP()
226  };
227  typedef epee::misc_utils::struct_init<request_t> request;
228 
230  {
231  std::vector<block_complete_entry> blocks;
232 
233  BEGIN_KV_SERIALIZE_MAP()
234  KV_SERIALIZE_PARENT(rpc_access_response_base)
235  KV_SERIALIZE(blocks)
236  END_KV_SERIALIZE_MAP()
237  };
238  typedef epee::misc_utils::struct_init<response_t> response;
239  };
240 
242  {
244  {
245  BEGIN_KV_SERIALIZE_MAP()
246  KV_SERIALIZE_PARENT(rpc_access_request_base)
247  END_KV_SERIALIZE_MAP()
248  };
249  typedef epee::misc_utils::struct_init<request_t> request;
250 
252  {
253  std::vector<std::string> blks_hashes;
254 
255  BEGIN_KV_SERIALIZE_MAP()
256  KV_SERIALIZE_PARENT(rpc_access_response_base)
257  KV_SERIALIZE(blks_hashes)
258  END_KV_SERIALIZE_MAP()
259  };
260  typedef epee::misc_utils::struct_init<response_t> response;
261  };
263  {
264 
266  {
267  std::list<crypto::hash> block_ids; //*first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */
268  uint64_t start_height;
269  BEGIN_KV_SERIALIZE_MAP()
270  KV_SERIALIZE_PARENT(rpc_access_request_base)
271  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids)
272  KV_SERIALIZE(start_height)
273  END_KV_SERIALIZE_MAP()
274  };
275  typedef epee::misc_utils::struct_init<request_t> request;
276 
278  {
279  std::vector<crypto::hash> m_block_ids;
280  uint64_t start_height;
281  uint64_t current_height;
282 
283  BEGIN_KV_SERIALIZE_MAP()
284  KV_SERIALIZE_PARENT(rpc_access_response_base)
285  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(m_block_ids)
286  KV_SERIALIZE(start_height)
287  KV_SERIALIZE(current_height)
288  END_KV_SERIALIZE_MAP()
289  };
290  typedef epee::misc_utils::struct_init<response_t> response;
291  };
292  //-----------------------------------------------
294  {
295  struct request_t
296  {
297  std::string address;
298  std::string view_key;
299  std::string tx;
300 
301  BEGIN_KV_SERIALIZE_MAP()
302  KV_SERIALIZE(address)
303  KV_SERIALIZE(view_key)
304  KV_SERIALIZE(tx)
305  END_KV_SERIALIZE_MAP()
306  };
307  typedef epee::misc_utils::struct_init<request_t> request;
308 
309 
310  struct response_t
311  {
312  std::string status;
313  std::string error;
314 
315  BEGIN_KV_SERIALIZE_MAP()
316  KV_SERIALIZE(status)
317  KV_SERIALIZE(error)
318  END_KV_SERIALIZE_MAP()
319  };
320  typedef epee::misc_utils::struct_init<response_t> response;
321  };
322  //-----------------------------------------------
324  {
326  {
327  std::vector<std::string> txs_hashes;
329  bool prune;
330  bool split;
331 
332  BEGIN_KV_SERIALIZE_MAP()
333  KV_SERIALIZE_PARENT(rpc_access_request_base)
334  KV_SERIALIZE(txs_hashes)
335  KV_SERIALIZE(decode_as_json)
336  KV_SERIALIZE_OPT(prune, false)
337  KV_SERIALIZE_OPT(split, false)
338  END_KV_SERIALIZE_MAP()
339  };
340  typedef epee::misc_utils::struct_init<request_t> request;
341 
342  struct entry
343  {
344  std::string tx_hash;
345  std::string as_hex;
346  std::string pruned_as_hex;
347  std::string prunable_as_hex;
348  std::string prunable_hash;
349  std::string as_json;
350  bool in_pool;
352  uint64_t block_height;
353  uint64_t block_timestamp;
355  std::vector<uint64_t> output_indices;
356  bool relayed;
357 
358  BEGIN_KV_SERIALIZE_MAP()
359  KV_SERIALIZE(tx_hash)
360  KV_SERIALIZE(as_hex)
361  KV_SERIALIZE(pruned_as_hex)
362  KV_SERIALIZE(prunable_as_hex)
363  KV_SERIALIZE(prunable_hash)
364  KV_SERIALIZE(as_json)
365  KV_SERIALIZE(in_pool)
366  KV_SERIALIZE(double_spend_seen)
367  if (!this_ref.in_pool)
368  {
369  KV_SERIALIZE(block_height)
370  KV_SERIALIZE(block_timestamp)
371  KV_SERIALIZE(output_indices)
372  }
373  else
374  {
375  KV_SERIALIZE(relayed)
376  KV_SERIALIZE(received_timestamp)
377  }
378  END_KV_SERIALIZE_MAP()
379  };
380 
382  {
383  // older compatibility stuff
384  std::vector<std::string> txs_as_hex; //transactions blobs as hex (old compat)
385  std::vector<std::string> txs_as_json; //transactions decoded as json (old compat)
386 
387  // in both old and new
388  std::vector<std::string> missed_tx; //not found transactions
389 
390  // new style
391  std::vector<entry> txs;
392 
393  BEGIN_KV_SERIALIZE_MAP()
394  KV_SERIALIZE_PARENT(rpc_access_response_base)
395  KV_SERIALIZE(txs_as_hex)
396  KV_SERIALIZE(txs_as_json)
397  KV_SERIALIZE(txs)
398  KV_SERIALIZE(missed_tx)
399  END_KV_SERIALIZE_MAP()
400  };
401  typedef epee::misc_utils::struct_init<response_t> response;
402  };
403 
404  //-----------------------------------------------
406  {
407  enum STATUS {
408  UNSPENT = 0,
411  };
412 
414  {
415  std::vector<std::string> key_images;
416 
417  BEGIN_KV_SERIALIZE_MAP()
418  KV_SERIALIZE_PARENT(rpc_access_request_base)
419  KV_SERIALIZE(key_images)
420  END_KV_SERIALIZE_MAP()
421  };
422  typedef epee::misc_utils::struct_init<request_t> request;
423 
424 
426  {
427  std::vector<int> spent_status;
428 
429  BEGIN_KV_SERIALIZE_MAP()
430  KV_SERIALIZE_PARENT(rpc_access_response_base)
431  KV_SERIALIZE(spent_status)
432  END_KV_SERIALIZE_MAP()
433  };
434  typedef epee::misc_utils::struct_init<response_t> response;
435  };
436 
437  //-----------------------------------------------
439  {
441  {
443  BEGIN_KV_SERIALIZE_MAP()
444  KV_SERIALIZE_PARENT(rpc_access_request_base)
445  KV_SERIALIZE_VAL_POD_AS_BLOB(txid)
446  END_KV_SERIALIZE_MAP()
447  };
448  typedef epee::misc_utils::struct_init<request_t> request;
449 
450 
452  {
453  std::vector<uint64_t> o_indexes;
454 
455  BEGIN_KV_SERIALIZE_MAP()
456  KV_SERIALIZE_PARENT(rpc_access_response_base)
457  KV_SERIALIZE(o_indexes)
458  END_KV_SERIALIZE_MAP()
459  };
460  typedef epee::misc_utils::struct_init<response_t> response;
461  };
462  //-----------------------------------------------
464  {
465  uint64_t amount;
466  uint64_t index;
467 
468  BEGIN_KV_SERIALIZE_MAP()
469  KV_SERIALIZE(amount)
470  KV_SERIALIZE(index)
471  END_KV_SERIALIZE_MAP()
472  };
473 
475  {
477  {
478  std::vector<get_outputs_out> outputs;
479  bool get_txid;
480 
481  BEGIN_KV_SERIALIZE_MAP()
482  KV_SERIALIZE_PARENT(rpc_access_request_base)
483  KV_SERIALIZE(outputs)
484  KV_SERIALIZE_OPT(get_txid, true)
485  END_KV_SERIALIZE_MAP()
486  };
487  typedef epee::misc_utils::struct_init<request_t> request;
488 
489  struct outkey
490  {
493  bool unlocked;
494  uint64_t height;
496 
497  BEGIN_KV_SERIALIZE_MAP()
498  KV_SERIALIZE_VAL_POD_AS_BLOB(key)
499  KV_SERIALIZE_VAL_POD_AS_BLOB(mask)
500  KV_SERIALIZE(unlocked)
501  KV_SERIALIZE(height)
502  KV_SERIALIZE_VAL_POD_AS_BLOB(txid)
503  END_KV_SERIALIZE_MAP()
504  };
505 
507  {
508  std::vector<outkey> outs;
509 
510  BEGIN_KV_SERIALIZE_MAP()
511  KV_SERIALIZE_PARENT(rpc_access_response_base)
512  KV_SERIALIZE(outs)
513  END_KV_SERIALIZE_MAP()
514  };
515  typedef epee::misc_utils::struct_init<response_t> response;
516  };
517  //-----------------------------------------------
519  {
521  {
522  std::vector<get_outputs_out> outputs;
523  bool get_txid;
524 
525  BEGIN_KV_SERIALIZE_MAP()
526  KV_SERIALIZE_PARENT(rpc_access_request_base)
527  KV_SERIALIZE(outputs)
528  KV_SERIALIZE(get_txid)
529  END_KV_SERIALIZE_MAP()
530  };
531  typedef epee::misc_utils::struct_init<request_t> request;
532 
533  struct outkey
534  {
535  std::string key;
536  std::string mask;
537  bool unlocked;
538  uint64_t height;
539  std::string txid;
540 
541  BEGIN_KV_SERIALIZE_MAP()
542  KV_SERIALIZE(key)
543  KV_SERIALIZE(mask)
544  KV_SERIALIZE(unlocked)
545  KV_SERIALIZE(height)
546  KV_SERIALIZE(txid)
547  END_KV_SERIALIZE_MAP()
548  };
549 
551  {
552  std::vector<outkey> outs;
553 
554  BEGIN_KV_SERIALIZE_MAP()
555  KV_SERIALIZE_PARENT(rpc_access_response_base)
556  KV_SERIALIZE(outs)
557  END_KV_SERIALIZE_MAP()
558  };
559  typedef epee::misc_utils::struct_init<response_t> response;
560  };
561  //-----------------------------------------------
563  {
565  {
566  std::string tx_as_hex;
569 
570  BEGIN_KV_SERIALIZE_MAP()
571  KV_SERIALIZE_PARENT(rpc_access_request_base);
572  KV_SERIALIZE(tx_as_hex)
573  KV_SERIALIZE_OPT(do_not_relay, false)
574  KV_SERIALIZE_OPT(do_sanity_checks, true)
575  END_KV_SERIALIZE_MAP()
576  };
577  typedef epee::misc_utils::struct_init<request_t> request;
578 
579 
581  {
582  std::string reason;
584  bool low_mixin;
588  bool too_big;
589  bool overspend;
593 
594  BEGIN_KV_SERIALIZE_MAP()
595  KV_SERIALIZE_PARENT(rpc_access_response_base)
596  KV_SERIALIZE(reason)
597  KV_SERIALIZE(not_relayed)
598  KV_SERIALIZE(low_mixin)
599  KV_SERIALIZE(double_spend)
600  KV_SERIALIZE(invalid_input)
601  KV_SERIALIZE(invalid_output)
602  KV_SERIALIZE(too_big)
603  KV_SERIALIZE(overspend)
604  KV_SERIALIZE(fee_too_low)
605  KV_SERIALIZE(too_few_outputs)
606  KV_SERIALIZE(sanity_check_failed)
607  END_KV_SERIALIZE_MAP()
608  };
609  typedef epee::misc_utils::struct_init<response_t> response;
610  };
611  //-----------------------------------------------
613  {
615  {
616  std::string miner_address;
617  uint64_t threads_count;
620 
621  BEGIN_KV_SERIALIZE_MAP()
622  KV_SERIALIZE_PARENT(rpc_request_base)
623  KV_SERIALIZE(miner_address)
624  KV_SERIALIZE(threads_count)
625  KV_SERIALIZE(do_background_mining)
626  KV_SERIALIZE(ignore_battery)
627  END_KV_SERIALIZE_MAP()
628  };
629  typedef epee::misc_utils::struct_init<request_t> request;
630 
632  {
633  BEGIN_KV_SERIALIZE_MAP()
634  KV_SERIALIZE_PARENT(rpc_response_base)
635  END_KV_SERIALIZE_MAP()
636  };
637  typedef epee::misc_utils::struct_init<response_t> response;
638  };
639  //-----------------------------------------------
641  {
643  {
644  BEGIN_KV_SERIALIZE_MAP()
645  KV_SERIALIZE_PARENT(rpc_access_request_base);
646  END_KV_SERIALIZE_MAP()
647  };
648  typedef epee::misc_utils::struct_init<request_t> request;
649 
651  {
652  uint64_t height;
653  uint64_t target_height;
654  uint64_t difficulty;
655  std::string wide_difficulty;
657  uint64_t target;
658  uint64_t tx_count;
659  uint64_t tx_pool_size;
666  bool mainnet;
667  bool testnet;
668  bool stagenet;
669  std::string nettype;
670  std::string top_block_hash;
678  uint64_t adjusted_time;
679  uint64_t start_time;
680  uint64_t free_space;
681  bool offline;
685  uint64_t database_size;
687  std::string version;
688 
689  BEGIN_KV_SERIALIZE_MAP()
690  KV_SERIALIZE_PARENT(rpc_access_response_base)
691  KV_SERIALIZE(height)
692  KV_SERIALIZE(target_height)
693  KV_SERIALIZE(difficulty)
694  KV_SERIALIZE(wide_difficulty)
695  KV_SERIALIZE(difficulty_top64)
696  KV_SERIALIZE(target)
697  KV_SERIALIZE(tx_count)
698  KV_SERIALIZE(tx_pool_size)
699  KV_SERIALIZE(alt_blocks_count)
700  KV_SERIALIZE(outgoing_connections_count)
701  KV_SERIALIZE(incoming_connections_count)
702  KV_SERIALIZE(rpc_connections_count)
703  KV_SERIALIZE(white_peerlist_size)
704  KV_SERIALIZE(grey_peerlist_size)
705  KV_SERIALIZE(mainnet)
706  KV_SERIALIZE(testnet)
707  KV_SERIALIZE(stagenet)
708  KV_SERIALIZE(nettype)
709  KV_SERIALIZE(top_block_hash)
710  KV_SERIALIZE(cumulative_difficulty)
711  KV_SERIALIZE(wide_cumulative_difficulty)
712  KV_SERIALIZE(cumulative_difficulty_top64)
713  KV_SERIALIZE(block_size_limit)
714  KV_SERIALIZE_OPT(block_weight_limit, (uint64_t)0)
715  KV_SERIALIZE(block_size_median)
716  KV_SERIALIZE_OPT(block_weight_median, (uint64_t)0)
717  KV_SERIALIZE(adjusted_time)
718  KV_SERIALIZE(start_time)
719  KV_SERIALIZE(free_space)
720  KV_SERIALIZE(offline)
721  KV_SERIALIZE(bootstrap_daemon_address)
722  KV_SERIALIZE(height_without_bootstrap)
723  KV_SERIALIZE(was_bootstrap_ever_used)
724  KV_SERIALIZE(database_size)
725  KV_SERIALIZE(update_available)
726  KV_SERIALIZE(version)
727  END_KV_SERIALIZE_MAP()
728  };
729  typedef epee::misc_utils::struct_init<response_t> response;
730  };
731 
732 
733  //-----------------------------------------------
735  {
737  {
738  BEGIN_KV_SERIALIZE_MAP()
739  KV_SERIALIZE_PARENT(rpc_request_base)
740  END_KV_SERIALIZE_MAP()
741  };
742  typedef epee::misc_utils::struct_init<request_t> request;
743 
744 
746  {
747  uint64_t start_time;
749  uint64_t total_bytes_in;
751  uint64_t total_bytes_out;
752 
753  BEGIN_KV_SERIALIZE_MAP()
754  KV_SERIALIZE_PARENT(rpc_response_base)
755  KV_SERIALIZE(start_time)
756  KV_SERIALIZE(total_packets_in)
757  KV_SERIALIZE(total_bytes_in)
758  KV_SERIALIZE(total_packets_out)
759  KV_SERIALIZE(total_bytes_out)
760  END_KV_SERIALIZE_MAP()
761  };
762  typedef epee::misc_utils::struct_init<response_t> response;
763  };
764 
765  //-----------------------------------------------
767  {
769  {
770  BEGIN_KV_SERIALIZE_MAP()
771  KV_SERIALIZE_PARENT(rpc_request_base)
772  END_KV_SERIALIZE_MAP()
773  };
774  typedef epee::misc_utils::struct_init<request_t> request;
775 
776 
778  {
779  BEGIN_KV_SERIALIZE_MAP()
780  KV_SERIALIZE_PARENT(rpc_response_base)
781  END_KV_SERIALIZE_MAP()
782  };
783  typedef epee::misc_utils::struct_init<response_t> response;
784  };
785 
786  //-----------------------------------------------
788  {
790  {
791  BEGIN_KV_SERIALIZE_MAP()
792  KV_SERIALIZE_PARENT(rpc_request_base)
793  END_KV_SERIALIZE_MAP()
794  };
795  typedef epee::misc_utils::struct_init<request_t> request;
796 
797 
799  {
800  bool active;
801  uint64_t speed;
802  uint32_t threads_count;
803  std::string address;
804  std::string pow_algorithm;
809  uint8_t bg_target;
810  uint32_t block_target;
811  uint64_t block_reward;
812  uint64_t difficulty;
813  std::string wide_difficulty;
815 
816  BEGIN_KV_SERIALIZE_MAP()
817  KV_SERIALIZE_PARENT(rpc_response_base)
818  KV_SERIALIZE(active)
819  KV_SERIALIZE(speed)
820  KV_SERIALIZE(threads_count)
821  KV_SERIALIZE(address)
822  KV_SERIALIZE(pow_algorithm)
823  KV_SERIALIZE(is_background_mining_enabled)
824  KV_SERIALIZE(bg_idle_threshold)
825  KV_SERIALIZE(bg_min_idle_seconds)
826  KV_SERIALIZE(bg_ignore_battery)
827  KV_SERIALIZE(bg_target)
828  KV_SERIALIZE(block_target)
829  KV_SERIALIZE(block_reward)
830  KV_SERIALIZE(difficulty)
831  KV_SERIALIZE(wide_difficulty)
832  KV_SERIALIZE(difficulty_top64)
833  END_KV_SERIALIZE_MAP()
834  };
835  typedef epee::misc_utils::struct_init<response_t> response;
836  };
837 
838  //-----------------------------------------------
840  {
842  {
843  BEGIN_KV_SERIALIZE_MAP()
844  KV_SERIALIZE_PARENT(rpc_request_base)
845  END_KV_SERIALIZE_MAP()
846  };
847  typedef epee::misc_utils::struct_init<request_t> request;
848 
849 
851  {
852  BEGIN_KV_SERIALIZE_MAP()
853  KV_SERIALIZE_PARENT(rpc_response_base)
854  END_KV_SERIALIZE_MAP()
855  };
856  typedef epee::misc_utils::struct_init<response_t> response;
857  };
858 
859  //
861  {
862  typedef std::list<std::string> request;
863 
865  {
866  uint64_t count;
867 
868  BEGIN_KV_SERIALIZE_MAP()
869  KV_SERIALIZE_PARENT(rpc_response_base)
870  KV_SERIALIZE(count)
871  END_KV_SERIALIZE_MAP()
872  };
873  typedef epee::misc_utils::struct_init<response_t> response;
874  };
875 
877  {
878  typedef std::vector<uint64_t> request;
879 
880  typedef std::string response;
881  };
882 
883 
885  {
887  {
888  uint64_t reserve_size; //max 255 bytes
889  std::string wallet_address;
890  std::string prev_block;
891  std::string extra_nonce;
892 
893  BEGIN_KV_SERIALIZE_MAP()
894  KV_SERIALIZE_PARENT(rpc_request_base)
895  KV_SERIALIZE(reserve_size)
896  KV_SERIALIZE(wallet_address)
897  KV_SERIALIZE(prev_block)
898  KV_SERIALIZE(extra_nonce)
899  END_KV_SERIALIZE_MAP()
900  };
901  typedef epee::misc_utils::struct_init<request_t> request;
902 
904  {
905  uint64_t difficulty;
906  std::string wide_difficulty;
908  uint64_t height;
909  uint64_t reserved_offset;
910  uint64_t expected_reward;
911  std::string prev_hash;
912  uint64_t seed_height;
913  std::string seed_hash;
914  std::string next_seed_hash;
917 
918  BEGIN_KV_SERIALIZE_MAP()
919  KV_SERIALIZE_PARENT(rpc_response_base)
920  KV_SERIALIZE(difficulty)
921  KV_SERIALIZE(wide_difficulty)
922  KV_SERIALIZE(difficulty_top64)
923  KV_SERIALIZE(height)
924  KV_SERIALIZE(reserved_offset)
925  KV_SERIALIZE(expected_reward)
926  KV_SERIALIZE(prev_hash)
927  KV_SERIALIZE(seed_height)
928  KV_SERIALIZE(blocktemplate_blob)
929  KV_SERIALIZE(blockhashing_blob)
930  KV_SERIALIZE(seed_hash)
931  KV_SERIALIZE(next_seed_hash)
932  END_KV_SERIALIZE_MAP()
933  };
934  typedef epee::misc_utils::struct_init<response_t> response;
935  };
936 
938  {
939  typedef std::vector<std::string> request;
940 
942  {
943  BEGIN_KV_SERIALIZE_MAP()
944  KV_SERIALIZE_PARENT(rpc_response_base)
945  END_KV_SERIALIZE_MAP()
946  };
947  typedef epee::misc_utils::struct_init<response_t> response;
948  };
949 
951  {
953  {
955  std::string wallet_address;
956  std::string prev_block;
957  uint32_t starting_nonce;
958 
959  BEGIN_KV_SERIALIZE_MAP()
960  KV_SERIALIZE_PARENT(rpc_request_base)
961  KV_SERIALIZE(amount_of_blocks)
962  KV_SERIALIZE(wallet_address)
963  KV_SERIALIZE(prev_block)
964  KV_SERIALIZE_OPT(starting_nonce, (uint32_t)0)
965  END_KV_SERIALIZE_MAP()
966  };
967  typedef epee::misc_utils::struct_init<request_t> request;
968 
970  {
971  uint64_t height;
972  std::vector<std::string> blocks;
973 
974  BEGIN_KV_SERIALIZE_MAP()
975  KV_SERIALIZE_PARENT(rpc_response_base)
976  KV_SERIALIZE(height)
977  KV_SERIALIZE(blocks)
978  END_KV_SERIALIZE_MAP()
979  };
980  typedef epee::misc_utils::struct_init<response_t> response;
981  };
982 
984  {
985  uint8_t major_version;
986  uint8_t minor_version;
987  uint64_t timestamp;
988  std::string prev_hash;
989  uint32_t nonce;
991  uint64_t height;
992  uint64_t depth;
993  std::string hash;
994  uint64_t difficulty;
995  std::string wide_difficulty;
1000  uint64_t reward;
1001  uint64_t block_size;
1002  uint64_t block_weight;
1003  uint64_t num_txes;
1004  std::string pow_hash;
1006  std::string miner_tx_hash;
1007 
1008  BEGIN_KV_SERIALIZE_MAP()
1009  KV_SERIALIZE(major_version)
1010  KV_SERIALIZE(minor_version)
1011  KV_SERIALIZE(timestamp)
1012  KV_SERIALIZE(prev_hash)
1013  KV_SERIALIZE(nonce)
1014  KV_SERIALIZE(orphan_status)
1015  KV_SERIALIZE(height)
1016  KV_SERIALIZE(depth)
1017  KV_SERIALIZE(hash)
1018  KV_SERIALIZE(difficulty)
1019  KV_SERIALIZE(wide_difficulty)
1020  KV_SERIALIZE(difficulty_top64)
1021  KV_SERIALIZE(cumulative_difficulty)
1022  KV_SERIALIZE(wide_cumulative_difficulty)
1023  KV_SERIALIZE(cumulative_difficulty_top64)
1024  KV_SERIALIZE(reward)
1025  KV_SERIALIZE(block_size)
1026  KV_SERIALIZE_OPT(block_weight, (uint64_t)0)
1027  KV_SERIALIZE(num_txes)
1028  KV_SERIALIZE(pow_hash)
1029  KV_SERIALIZE_OPT(long_term_weight, (uint64_t)0)
1030  KV_SERIALIZE(miner_tx_hash)
1031  END_KV_SERIALIZE_MAP()
1032  };
1033 
1035  {
1037  {
1039 
1040  BEGIN_KV_SERIALIZE_MAP()
1041  KV_SERIALIZE_PARENT(rpc_access_request_base)
1042  KV_SERIALIZE_OPT(fill_pow_hash, false);
1043  END_KV_SERIALIZE_MAP()
1044  };
1045  typedef epee::misc_utils::struct_init<request_t> request;
1046 
1048  {
1050 
1051  BEGIN_KV_SERIALIZE_MAP()
1052  KV_SERIALIZE_PARENT(rpc_access_response_base)
1053  KV_SERIALIZE(block_header)
1054  END_KV_SERIALIZE_MAP()
1055  };
1056  typedef epee::misc_utils::struct_init<response_t> response;
1057 
1058  };
1059 
1061  {
1063  {
1064  std::string hash;
1065  std::vector<std::string> hashes;
1067 
1068  BEGIN_KV_SERIALIZE_MAP()
1069  KV_SERIALIZE_PARENT(rpc_access_request_base)
1070  KV_SERIALIZE(hash)
1071  KV_SERIALIZE(hashes)
1072  KV_SERIALIZE_OPT(fill_pow_hash, false);
1073  END_KV_SERIALIZE_MAP()
1074  };
1075  typedef epee::misc_utils::struct_init<request_t> request;
1076 
1078  {
1080  std::vector<block_header_response> block_headers;
1081 
1082  BEGIN_KV_SERIALIZE_MAP()
1083  KV_SERIALIZE_PARENT(rpc_access_response_base)
1084  KV_SERIALIZE(block_header)
1085  KV_SERIALIZE(block_headers)
1086  END_KV_SERIALIZE_MAP()
1087  };
1088  typedef epee::misc_utils::struct_init<response_t> response;
1089  };
1090 
1092  {
1094  {
1095  uint64_t height;
1097 
1098  BEGIN_KV_SERIALIZE_MAP()
1099  KV_SERIALIZE_PARENT(rpc_access_request_base)
1100  KV_SERIALIZE(height)
1101  KV_SERIALIZE_OPT(fill_pow_hash, false);
1102  END_KV_SERIALIZE_MAP()
1103  };
1104  typedef epee::misc_utils::struct_init<request_t> request;
1105 
1107  {
1109 
1110  BEGIN_KV_SERIALIZE_MAP()
1111  KV_SERIALIZE_PARENT(rpc_access_response_base)
1112  KV_SERIALIZE(block_header)
1113  END_KV_SERIALIZE_MAP()
1114  };
1115  typedef epee::misc_utils::struct_init<response_t> response;
1116  };
1117 
1119  {
1121  {
1122  std::string hash;
1123  uint64_t height;
1125 
1126  BEGIN_KV_SERIALIZE_MAP()
1127  KV_SERIALIZE_PARENT(rpc_access_request_base)
1128  KV_SERIALIZE(hash)
1129  KV_SERIALIZE(height)
1130  KV_SERIALIZE_OPT(fill_pow_hash, false);
1131  END_KV_SERIALIZE_MAP()
1132  };
1133  typedef epee::misc_utils::struct_init<request_t> request;
1134 
1136  {
1138  std::string miner_tx_hash;
1139  std::vector<std::string> tx_hashes;
1140  std::string blob;
1141  std::string json;
1142 
1143  BEGIN_KV_SERIALIZE_MAP()
1144  KV_SERIALIZE_PARENT(rpc_access_response_base)
1145  KV_SERIALIZE(block_header)
1146  KV_SERIALIZE(miner_tx_hash)
1147  KV_SERIALIZE(tx_hashes)
1148  KV_SERIALIZE(blob)
1149  KV_SERIALIZE(json)
1150  END_KV_SERIALIZE_MAP()
1151  };
1152  typedef epee::misc_utils::struct_init<response_t> response;
1153  };
1154 
1155  struct peer {
1156  uint64_t id;
1157  std::string host;
1158  uint32_t ip;
1159  uint16_t port;
1160  uint16_t rpc_port;
1162  uint64_t last_seen;
1163  uint32_t pruning_seed;
1164 
1165  peer() = default;
1166 
1167  peer(uint64_t id, const std::string &host, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port, uint32_t rpc_credits_per_hash)
1168  : id(id), host(host), ip(0), port(0), rpc_port(rpc_port), rpc_credits_per_hash(rpc_credits_per_hash), last_seen(last_seen), pruning_seed(pruning_seed)
1169  {}
1170  peer(uint64_t id, const std::string &host, uint16_t port, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port, uint32_t rpc_credits_per_hash)
1171  : id(id), host(host), ip(0), port(port), rpc_port(rpc_port), rpc_credits_per_hash(rpc_credits_per_hash), last_seen(last_seen), pruning_seed(pruning_seed)
1172  {}
1173  peer(uint64_t id, uint32_t ip, uint16_t port, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port, uint32_t rpc_credits_per_hash)
1174  : id(id), host(epee::string_tools::get_ip_string_from_int32(ip)), ip(ip), port(port), rpc_port(rpc_port), rpc_credits_per_hash(rpc_credits_per_hash), last_seen(last_seen), pruning_seed(pruning_seed)
1175  {}
1176 
1177  BEGIN_KV_SERIALIZE_MAP()
1178  KV_SERIALIZE(id)
1179  KV_SERIALIZE(host)
1180  KV_SERIALIZE(ip)
1181  KV_SERIALIZE(port)
1182  KV_SERIALIZE_OPT(rpc_port, (uint16_t)0)
1183  KV_SERIALIZE_OPT(rpc_credits_per_hash, (uint32_t)0)
1184  KV_SERIALIZE(last_seen)
1185  KV_SERIALIZE_OPT(pruning_seed, (uint32_t)0)
1186  END_KV_SERIALIZE_MAP()
1187  };
1188 
1190  {
1192  {
1194 
1195  BEGIN_KV_SERIALIZE_MAP()
1196  KV_SERIALIZE_PARENT(rpc_request_base)
1197  KV_SERIALIZE_OPT(public_only, true)
1198  END_KV_SERIALIZE_MAP()
1199  };
1200  typedef epee::misc_utils::struct_init<request_t> request;
1201 
1203  {
1204  std::vector<peer> white_list;
1205  std::vector<peer> gray_list;
1206 
1207  BEGIN_KV_SERIALIZE_MAP()
1208  KV_SERIALIZE_PARENT(rpc_response_base)
1209  KV_SERIALIZE(white_list)
1210  KV_SERIALIZE(gray_list)
1211  END_KV_SERIALIZE_MAP()
1212  };
1213  typedef epee::misc_utils::struct_init<response_t> response;
1214  };
1215 
1217  {
1218  std::string host;
1219  uint64_t last_seen;
1220  uint16_t rpc_port;
1222 
1223  public_node(): last_seen(0), rpc_port(0), rpc_credits_per_hash(0) {}
1224 
1226  : host(peer.host), last_seen(peer.last_seen), rpc_port(peer.rpc_port), rpc_credits_per_hash(peer.rpc_credits_per_hash)
1227  {}
1228 
1229  BEGIN_KV_SERIALIZE_MAP()
1230  KV_SERIALIZE(host)
1231  KV_SERIALIZE(last_seen)
1232  KV_SERIALIZE(rpc_port)
1233  KV_SERIALIZE(rpc_credits_per_hash)
1234  END_KV_SERIALIZE_MAP()
1235  };
1236 
1238  {
1240  {
1241  bool gray;
1242  bool white;
1243 
1244  BEGIN_KV_SERIALIZE_MAP()
1245  KV_SERIALIZE_PARENT(rpc_request_base)
1246  KV_SERIALIZE_OPT(gray, false)
1247  KV_SERIALIZE_OPT(white, true)
1248  END_KV_SERIALIZE_MAP()
1249  };
1250  typedef epee::misc_utils::struct_init<request_t> request;
1251 
1253  {
1254  std::vector<public_node> gray;
1255  std::vector<public_node> white;
1256 
1257  BEGIN_KV_SERIALIZE_MAP()
1258  KV_SERIALIZE_PARENT(rpc_response_base)
1259  KV_SERIALIZE(gray)
1260  KV_SERIALIZE(white)
1261  END_KV_SERIALIZE_MAP()
1262  };
1263  typedef epee::misc_utils::struct_init<response_t> response;
1264  };
1265 
1267  {
1269  {
1270  bool visible;
1271 
1272  BEGIN_KV_SERIALIZE_MAP()
1273  KV_SERIALIZE_PARENT(rpc_request_base)
1274  KV_SERIALIZE(visible)
1275  END_KV_SERIALIZE_MAP()
1276  };
1277  typedef epee::misc_utils::struct_init<request_t> request;
1278 
1280  {
1281  BEGIN_KV_SERIALIZE_MAP()
1282  KV_SERIALIZE_PARENT(rpc_response_base)
1283  END_KV_SERIALIZE_MAP()
1284  };
1285  typedef epee::misc_utils::struct_init<response_t> response;
1286  };
1287 
1289  {
1291  {
1292  int8_t level;
1293 
1294  BEGIN_KV_SERIALIZE_MAP()
1295  KV_SERIALIZE_PARENT(rpc_request_base)
1296  KV_SERIALIZE(level)
1297  END_KV_SERIALIZE_MAP()
1298  };
1299  typedef epee::misc_utils::struct_init<request_t> request;
1300 
1302  {
1303  BEGIN_KV_SERIALIZE_MAP()
1304  KV_SERIALIZE_PARENT(rpc_response_base)
1305  END_KV_SERIALIZE_MAP()
1306  };
1307  typedef epee::misc_utils::struct_init<response_t> response;
1308  };
1309 
1311  {
1313  {
1314  std::string categories;
1315 
1316  BEGIN_KV_SERIALIZE_MAP()
1317  KV_SERIALIZE_PARENT(rpc_request_base)
1318  KV_SERIALIZE(categories)
1319  END_KV_SERIALIZE_MAP()
1320  };
1321  typedef epee::misc_utils::struct_init<request_t> request;
1322 
1324  {
1325  std::string categories;
1326 
1327  BEGIN_KV_SERIALIZE_MAP()
1328  KV_SERIALIZE_PARENT(rpc_response_base)
1329  KV_SERIALIZE(categories)
1330  END_KV_SERIALIZE_MAP()
1331  };
1332  typedef epee::misc_utils::struct_init<response_t> response;
1333  };
1334 
1335  struct tx_info
1336  {
1337  std::string id_hash;
1338  std::string tx_json; // TODO - expose this data directly
1339  uint64_t blob_size;
1340  uint64_t weight;
1341  uint64_t fee;
1346  std::string last_failed_id_hash;
1347  uint64_t receive_time;
1348  bool relayed;
1352  std::string tx_blob;
1353 
1354  BEGIN_KV_SERIALIZE_MAP()
1355  KV_SERIALIZE(id_hash)
1356  KV_SERIALIZE(tx_json)
1357  KV_SERIALIZE(blob_size)
1358  KV_SERIALIZE_OPT(weight, (uint64_t)0)
1359  KV_SERIALIZE(fee)
1360  KV_SERIALIZE(max_used_block_id_hash)
1361  KV_SERIALIZE(max_used_block_height)
1362  KV_SERIALIZE(kept_by_block)
1363  KV_SERIALIZE(last_failed_height)
1364  KV_SERIALIZE(last_failed_id_hash)
1365  KV_SERIALIZE(receive_time)
1366  KV_SERIALIZE(relayed)
1367  KV_SERIALIZE(last_relayed_time)
1368  KV_SERIALIZE(do_not_relay)
1369  KV_SERIALIZE(double_spend_seen)
1370  KV_SERIALIZE(tx_blob)
1371  END_KV_SERIALIZE_MAP()
1372  };
1373 
1375  {
1376  std::string id_hash;
1377  std::vector<std::string> txs_hashes;
1378 
1379  BEGIN_KV_SERIALIZE_MAP()
1380  KV_SERIALIZE(id_hash)
1381  KV_SERIALIZE(txs_hashes)
1382  END_KV_SERIALIZE_MAP()
1383  };
1384 
1386  {
1388  {
1389  BEGIN_KV_SERIALIZE_MAP()
1390  KV_SERIALIZE_PARENT(rpc_access_request_base)
1391  END_KV_SERIALIZE_MAP()
1392  };
1393  typedef epee::misc_utils::struct_init<request_t> request;
1394 
1396  {
1397  std::vector<tx_info> transactions;
1398  std::vector<spent_key_image_info> spent_key_images;
1399 
1400  BEGIN_KV_SERIALIZE_MAP()
1401  KV_SERIALIZE_PARENT(rpc_access_response_base)
1402  KV_SERIALIZE(transactions)
1403  KV_SERIALIZE(spent_key_images)
1404  END_KV_SERIALIZE_MAP()
1405  };
1406  typedef epee::misc_utils::struct_init<response_t> response;
1407  };
1408 
1410  {
1412  {
1413  BEGIN_KV_SERIALIZE_MAP()
1414  KV_SERIALIZE_PARENT(rpc_access_request_base)
1415  END_KV_SERIALIZE_MAP()
1416  };
1417  typedef epee::misc_utils::struct_init<request_t> request;
1418 
1420  {
1421  std::vector<crypto::hash> tx_hashes;
1422 
1423  BEGIN_KV_SERIALIZE_MAP()
1424  KV_SERIALIZE_PARENT(rpc_access_response_base)
1425  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(tx_hashes)
1426  END_KV_SERIALIZE_MAP()
1427  };
1428  typedef epee::misc_utils::struct_init<response_t> response;
1429  };
1430 
1432  {
1434  {
1435  BEGIN_KV_SERIALIZE_MAP()
1436  KV_SERIALIZE_PARENT(rpc_access_request_base)
1437  END_KV_SERIALIZE_MAP()
1438  };
1439  typedef epee::misc_utils::struct_init<request_t> request;
1440 
1442  {
1443  std::vector<std::string> tx_hashes;
1444 
1445  BEGIN_KV_SERIALIZE_MAP()
1446  KV_SERIALIZE_PARENT(rpc_access_response_base)
1447  KV_SERIALIZE(tx_hashes)
1448  END_KV_SERIALIZE_MAP()
1449  };
1450  typedef epee::misc_utils::struct_init<response_t> response;
1451  };
1452 
1454  {
1455  uint64_t weight;
1456  uint64_t fee;
1457  uint64_t time_in_pool;
1458  };
1459 
1461  {
1463  {
1464  BEGIN_KV_SERIALIZE_MAP()
1465  KV_SERIALIZE_PARENT(rpc_access_request_base)
1466  END_KV_SERIALIZE_MAP()
1467  };
1468  typedef epee::misc_utils::struct_init<request_t> request;
1469 
1471  {
1472  std::vector<tx_backlog_entry> backlog;
1473 
1474  BEGIN_KV_SERIALIZE_MAP()
1475  KV_SERIALIZE_PARENT(rpc_access_response_base)
1476  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(backlog)
1477  END_KV_SERIALIZE_MAP()
1478  };
1479  typedef epee::misc_utils::struct_init<response_t> response;
1480  };
1481 
1483  {
1484  uint32_t txs;
1485  uint64_t bytes;
1486 
1487  BEGIN_KV_SERIALIZE_MAP()
1488  KV_SERIALIZE(txs)
1489  KV_SERIALIZE(bytes)
1490  END_KV_SERIALIZE_MAP()
1491  };
1492 
1494  {
1495  uint64_t bytes_total;
1496  uint32_t bytes_min;
1497  uint32_t bytes_max;
1498  uint32_t bytes_med;
1499  uint64_t fee_total;
1500  uint64_t oldest;
1501  uint32_t txs_total;
1502  uint32_t num_failing;
1503  uint32_t num_10m;
1505  uint64_t histo_98pc;
1506  std::vector<txpool_histo> histo;
1508 
1509  txpool_stats(): bytes_total(0), bytes_min(0), bytes_max(0), bytes_med(0), fee_total(0), oldest(0), txs_total(0), num_failing(0), num_10m(0), num_not_relayed(0), histo_98pc(0), num_double_spends(0) {}
1510 
1511  BEGIN_KV_SERIALIZE_MAP()
1512  KV_SERIALIZE(bytes_total)
1513  KV_SERIALIZE(bytes_min)
1514  KV_SERIALIZE(bytes_max)
1515  KV_SERIALIZE(bytes_med)
1516  KV_SERIALIZE(fee_total)
1517  KV_SERIALIZE(oldest)
1518  KV_SERIALIZE(txs_total)
1519  KV_SERIALIZE(num_failing)
1520  KV_SERIALIZE(num_10m)
1521  KV_SERIALIZE(num_not_relayed)
1522  KV_SERIALIZE(histo_98pc)
1523  KV_SERIALIZE(histo)
1524  KV_SERIALIZE(num_double_spends)
1525  END_KV_SERIALIZE_MAP()
1526  };
1527 
1529  {
1531  {
1532  BEGIN_KV_SERIALIZE_MAP()
1533  KV_SERIALIZE_PARENT(rpc_access_request_base)
1534  END_KV_SERIALIZE_MAP()
1535  };
1536  typedef epee::misc_utils::struct_init<request_t> request;
1537 
1539  {
1541 
1542  BEGIN_KV_SERIALIZE_MAP()
1543  KV_SERIALIZE_PARENT(rpc_access_response_base)
1544  KV_SERIALIZE(pool_stats)
1545  END_KV_SERIALIZE_MAP()
1546  };
1547  typedef epee::misc_utils::struct_init<response_t> response;
1548  };
1549 
1551  {
1553  {
1554  BEGIN_KV_SERIALIZE_MAP()
1555  KV_SERIALIZE_PARENT(rpc_request_base)
1556  END_KV_SERIALIZE_MAP()
1557  };
1558  typedef epee::misc_utils::struct_init<request_t> request;
1559 
1561  {
1562  std::list<connection_info> connections;
1563 
1564  BEGIN_KV_SERIALIZE_MAP()
1565  KV_SERIALIZE_PARENT(rpc_response_base)
1566  KV_SERIALIZE(connections)
1567  END_KV_SERIALIZE_MAP()
1568  };
1569  typedef epee::misc_utils::struct_init<response_t> response;
1570  };
1571 
1573  {
1575  {
1576  uint64_t start_height;
1577  uint64_t end_height;
1579 
1580  BEGIN_KV_SERIALIZE_MAP()
1581  KV_SERIALIZE_PARENT(rpc_access_request_base)
1582  KV_SERIALIZE(start_height)
1583  KV_SERIALIZE(end_height)
1584  KV_SERIALIZE_OPT(fill_pow_hash, false);
1585  END_KV_SERIALIZE_MAP()
1586  };
1587  typedef epee::misc_utils::struct_init<request_t> request;
1588 
1590  {
1591  std::vector<block_header_response> headers;
1592 
1593  BEGIN_KV_SERIALIZE_MAP()
1594  KV_SERIALIZE_PARENT(rpc_access_response_base)
1595  KV_SERIALIZE(headers)
1596  END_KV_SERIALIZE_MAP()
1597  };
1598  typedef epee::misc_utils::struct_init<response_t> response;
1599  };
1600 
1602  {
1603  struct request_t
1604  {
1605  std::string address;
1606  std::string username;
1607  std::string password;
1608 
1609  BEGIN_KV_SERIALIZE_MAP()
1610  KV_SERIALIZE(address)
1611  KV_SERIALIZE(username)
1612  KV_SERIALIZE(password)
1613  END_KV_SERIALIZE_MAP()
1614  };
1615  typedef epee::misc_utils::struct_init<request_t> request;
1616 
1617  struct response_t
1618  {
1619  std::string status;
1620 
1621  BEGIN_KV_SERIALIZE_MAP()
1622  KV_SERIALIZE(status)
1623  END_KV_SERIALIZE_MAP()
1624  };
1625  typedef epee::misc_utils::struct_init<response_t> response;
1626  };
1627 
1629  {
1631  {
1632  BEGIN_KV_SERIALIZE_MAP()
1633  KV_SERIALIZE_PARENT(rpc_request_base)
1634  END_KV_SERIALIZE_MAP()
1635  };
1636  typedef epee::misc_utils::struct_init<request_t> request;
1637 
1639  {
1640  BEGIN_KV_SERIALIZE_MAP()
1641  KV_SERIALIZE_PARENT(rpc_response_base)
1642  END_KV_SERIALIZE_MAP()
1643  };
1644  typedef epee::misc_utils::struct_init<response_t> response;
1645  };
1646 
1648  {
1650  {
1651  BEGIN_KV_SERIALIZE_MAP()
1652  KV_SERIALIZE_PARENT(rpc_request_base)
1653  END_KV_SERIALIZE_MAP()
1654  };
1655  typedef epee::misc_utils::struct_init<request_t> request;
1656 
1658  {
1659  BEGIN_KV_SERIALIZE_MAP()
1660  KV_SERIALIZE_PARENT(rpc_response_base)
1661  END_KV_SERIALIZE_MAP()
1662  };
1663  typedef epee::misc_utils::struct_init<response_t> response;
1664  };
1665 
1667  {
1669  {
1670  BEGIN_KV_SERIALIZE_MAP()
1671  KV_SERIALIZE_PARENT(rpc_request_base)
1672  END_KV_SERIALIZE_MAP()
1673  };
1674  typedef epee::misc_utils::struct_init<request_t> request;
1675 
1677  {
1678  uint64_t limit_up;
1679  uint64_t limit_down;
1680 
1681  BEGIN_KV_SERIALIZE_MAP()
1682  KV_SERIALIZE_PARENT(rpc_response_base)
1683  KV_SERIALIZE(limit_up)
1684  KV_SERIALIZE(limit_down)
1685  END_KV_SERIALIZE_MAP()
1686  };
1687  typedef epee::misc_utils::struct_init<response_t> response;
1688  };
1689 
1691  {
1693  {
1694  int64_t limit_down; // all limits (for get and set) are kB/s
1695  int64_t limit_up;
1696 
1697  BEGIN_KV_SERIALIZE_MAP()
1698  KV_SERIALIZE_PARENT(rpc_request_base)
1699  KV_SERIALIZE(limit_down)
1700  KV_SERIALIZE(limit_up)
1701  END_KV_SERIALIZE_MAP()
1702  };
1703  typedef epee::misc_utils::struct_init<request_t> request;
1704 
1706  {
1707  int64_t limit_up;
1708  int64_t limit_down;
1709 
1710  BEGIN_KV_SERIALIZE_MAP()
1711  KV_SERIALIZE_PARENT(rpc_response_base)
1712  KV_SERIALIZE(limit_up)
1713  KV_SERIALIZE(limit_down)
1714  END_KV_SERIALIZE_MAP()
1715  };
1716  typedef epee::misc_utils::struct_init<response_t> response;
1717  };
1718 
1720  {
1722  {
1723  bool set;
1724  uint32_t out_peers;
1725 
1726  BEGIN_KV_SERIALIZE_MAP()
1727  KV_SERIALIZE_PARENT(rpc_request_base)
1728  KV_SERIALIZE_OPT(set, true)
1729  KV_SERIALIZE(out_peers)
1730  END_KV_SERIALIZE_MAP()
1731  };
1732  typedef epee::misc_utils::struct_init<request_t> request;
1733 
1735  {
1736  uint32_t out_peers;
1737 
1738  BEGIN_KV_SERIALIZE_MAP()
1739  KV_SERIALIZE_PARENT(rpc_response_base)
1740  KV_SERIALIZE(out_peers)
1741  END_KV_SERIALIZE_MAP()
1742  };
1743  typedef epee::misc_utils::struct_init<response_t> response;
1744  };
1745 
1747  {
1749  {
1750  bool set;
1751  uint32_t in_peers;
1752  BEGIN_KV_SERIALIZE_MAP()
1753  KV_SERIALIZE_PARENT(rpc_request_base)
1754  KV_SERIALIZE_OPT(set, true)
1755  KV_SERIALIZE(in_peers)
1756  END_KV_SERIALIZE_MAP()
1757  };
1758  typedef epee::misc_utils::struct_init<request_t> request;
1759 
1761  {
1762  uint32_t in_peers;
1763 
1764  BEGIN_KV_SERIALIZE_MAP()
1765  KV_SERIALIZE_PARENT(rpc_response_base)
1766  KV_SERIALIZE(in_peers)
1767  END_KV_SERIALIZE_MAP()
1768  };
1769  typedef epee::misc_utils::struct_init<response_t> response;
1770  };
1771 
1773  {
1775  {
1776  uint8_t version;
1777 
1778  BEGIN_KV_SERIALIZE_MAP()
1779  KV_SERIALIZE_PARENT(rpc_access_request_base)
1780  KV_SERIALIZE(version)
1781  END_KV_SERIALIZE_MAP()
1782  };
1783  typedef epee::misc_utils::struct_init<request_t> request;
1784 
1786  {
1787  uint8_t version;
1788  bool enabled;
1789  uint32_t window;
1790  uint32_t votes;
1791  uint32_t threshold;
1792  uint8_t voting;
1793  uint32_t state;
1795 
1796  BEGIN_KV_SERIALIZE_MAP()
1797  KV_SERIALIZE_PARENT(rpc_access_response_base)
1798  KV_SERIALIZE(version)
1799  KV_SERIALIZE(enabled)
1800  KV_SERIALIZE(window)
1801  KV_SERIALIZE(votes)
1802  KV_SERIALIZE(threshold)
1803  KV_SERIALIZE(voting)
1804  KV_SERIALIZE(state)
1805  KV_SERIALIZE(earliest_height)
1806  END_KV_SERIALIZE_MAP()
1807  };
1808  typedef epee::misc_utils::struct_init<response_t> response;
1809  };
1810 
1812  {
1813  struct ban
1814  {
1815  std::string host;
1816  uint32_t ip;
1817  uint32_t seconds;
1818 
1819  BEGIN_KV_SERIALIZE_MAP()
1820  KV_SERIALIZE(host)
1821  KV_SERIALIZE(ip)
1822  KV_SERIALIZE(seconds)
1823  END_KV_SERIALIZE_MAP()
1824  };
1825 
1827  {
1828  BEGIN_KV_SERIALIZE_MAP()
1829  KV_SERIALIZE_PARENT(rpc_request_base)
1830  END_KV_SERIALIZE_MAP()
1831  };
1832  typedef epee::misc_utils::struct_init<request_t> request;
1833 
1835  {
1836  std::vector<ban> bans;
1837 
1838  BEGIN_KV_SERIALIZE_MAP()
1839  KV_SERIALIZE_PARENT(rpc_response_base)
1840  KV_SERIALIZE(bans)
1841  END_KV_SERIALIZE_MAP()
1842  };
1843  typedef epee::misc_utils::struct_init<response_t> response;
1844  };
1845 
1847  {
1848  struct ban
1849  {
1850  std::string host;
1851  uint32_t ip;
1852  bool ban;
1853  uint32_t seconds;
1854 
1855  BEGIN_KV_SERIALIZE_MAP()
1856  KV_SERIALIZE(host)
1857  KV_SERIALIZE(ip)
1858  KV_SERIALIZE(ban)
1859  KV_SERIALIZE(seconds)
1860  END_KV_SERIALIZE_MAP()
1861  };
1862 
1864  {
1865  std::vector<ban> bans;
1866 
1867  BEGIN_KV_SERIALIZE_MAP()
1868  KV_SERIALIZE_PARENT(rpc_request_base)
1869  KV_SERIALIZE(bans)
1870  END_KV_SERIALIZE_MAP()
1871  };
1872  typedef epee::misc_utils::struct_init<request_t> request;
1873 
1875  {
1876  BEGIN_KV_SERIALIZE_MAP()
1877  KV_SERIALIZE_PARENT(rpc_response_base)
1878  END_KV_SERIALIZE_MAP()
1879  };
1880  typedef epee::misc_utils::struct_init<response_t> response;
1881  };
1882 
1884  {
1885  struct request_t
1886  {
1887  std::string address;
1888 
1889  BEGIN_KV_SERIALIZE_MAP()
1890  KV_SERIALIZE(address)
1891  END_KV_SERIALIZE_MAP()
1892  };
1893  typedef epee::misc_utils::struct_init<request_t> request;
1894 
1895  struct response_t
1896  {
1897  std::string status;
1898  bool banned;
1899  uint32_t seconds;
1900 
1901  BEGIN_KV_SERIALIZE_MAP()
1902  KV_SERIALIZE(status)
1903  KV_SERIALIZE(banned)
1904  KV_SERIALIZE(seconds)
1905  END_KV_SERIALIZE_MAP()
1906  };
1907  typedef epee::misc_utils::struct_init<response_t> response;
1908  };
1909 
1911  {
1913  {
1914  std::vector<std::string> txids;
1915 
1916  BEGIN_KV_SERIALIZE_MAP()
1917  KV_SERIALIZE_PARENT(rpc_request_base)
1918  KV_SERIALIZE(txids)
1919  END_KV_SERIALIZE_MAP()
1920  };
1921  typedef epee::misc_utils::struct_init<request_t> request;
1922 
1924  {
1925  BEGIN_KV_SERIALIZE_MAP()
1926  KV_SERIALIZE_PARENT(rpc_response_base)
1927  END_KV_SERIALIZE_MAP()
1928  };
1929  typedef epee::misc_utils::struct_init<response_t> response;
1930  };
1931 
1933  {
1935  {
1936  std::vector<uint64_t> amounts;
1937  uint64_t min_count;
1938  uint64_t max_count;
1939  bool unlocked;
1940  uint64_t recent_cutoff;
1941 
1942  BEGIN_KV_SERIALIZE_MAP()
1943  KV_SERIALIZE_PARENT(rpc_access_request_base);
1944  KV_SERIALIZE(amounts);
1945  KV_SERIALIZE(min_count);
1946  KV_SERIALIZE(max_count);
1947  KV_SERIALIZE(unlocked);
1948  KV_SERIALIZE(recent_cutoff);
1949  END_KV_SERIALIZE_MAP()
1950  };
1951  typedef epee::misc_utils::struct_init<request_t> request;
1952 
1953  struct entry
1954  {
1955  uint64_t amount;
1959 
1960  BEGIN_KV_SERIALIZE_MAP()
1961  KV_SERIALIZE(amount);
1962  KV_SERIALIZE(total_instances);
1963  KV_SERIALIZE(unlocked_instances);
1964  KV_SERIALIZE(recent_instances);
1965  END_KV_SERIALIZE_MAP()
1966 
1967  entry(uint64_t amount, uint64_t total_instances, uint64_t unlocked_instances, uint64_t recent_instances):
1968  amount(amount), total_instances(total_instances), unlocked_instances(unlocked_instances), recent_instances(recent_instances) {}
1969  entry() {}
1970  };
1971 
1973  {
1974  std::vector<entry> histogram;
1975 
1976  BEGIN_KV_SERIALIZE_MAP()
1977  KV_SERIALIZE_PARENT(rpc_access_response_base)
1978  KV_SERIALIZE(histogram)
1979  END_KV_SERIALIZE_MAP()
1980  };
1981  typedef epee::misc_utils::struct_init<response_t> response;
1982  };
1983 
1985  {
1987  {
1988  BEGIN_KV_SERIALIZE_MAP()
1989  KV_SERIALIZE_PARENT(rpc_request_base)
1990  END_KV_SERIALIZE_MAP()
1991  };
1992  typedef epee::misc_utils::struct_init<request_t> request;
1993 
1995  {
1996  uint32_t version;
1997  bool release;
1998 
1999  BEGIN_KV_SERIALIZE_MAP()
2000  KV_SERIALIZE_PARENT(rpc_response_base)
2001  KV_SERIALIZE(version)
2002  KV_SERIALIZE(release)
2003  END_KV_SERIALIZE_MAP()
2004  };
2005  typedef epee::misc_utils::struct_init<response_t> response;
2006  };
2007 
2009  {
2011  {
2012  uint64_t height;
2013  uint64_t count;
2014 
2015  BEGIN_KV_SERIALIZE_MAP()
2016  KV_SERIALIZE_PARENT(rpc_access_request_base);
2017  KV_SERIALIZE(height);
2018  KV_SERIALIZE(count);
2019  END_KV_SERIALIZE_MAP()
2020  };
2021  typedef epee::misc_utils::struct_init<request_t> request;
2022 
2024  {
2028  uint64_t fee_amount;
2029  std::string wide_fee_amount;
2031 
2032  BEGIN_KV_SERIALIZE_MAP()
2033  KV_SERIALIZE_PARENT(rpc_access_response_base)
2034  KV_SERIALIZE(emission_amount)
2035  KV_SERIALIZE(wide_emission_amount)
2036  KV_SERIALIZE(emission_amount_top64)
2037  KV_SERIALIZE(fee_amount)
2038  KV_SERIALIZE(wide_fee_amount)
2039  KV_SERIALIZE(fee_amount_top64)
2040  END_KV_SERIALIZE_MAP()
2041  };
2042  typedef epee::misc_utils::struct_init<response_t> response;
2043  };
2044 
2046  {
2048  {
2049  uint64_t grace_blocks;
2050 
2051  BEGIN_KV_SERIALIZE_MAP()
2052  KV_SERIALIZE_PARENT(rpc_access_request_base)
2053  KV_SERIALIZE(grace_blocks)
2054  END_KV_SERIALIZE_MAP()
2055  };
2056  typedef epee::misc_utils::struct_init<request_t> request;
2057 
2059  {
2060  uint64_t fee;
2062 
2063  BEGIN_KV_SERIALIZE_MAP()
2064  KV_SERIALIZE_PARENT(rpc_access_response_base)
2065  KV_SERIALIZE(fee)
2066  KV_SERIALIZE_OPT(quantization_mask, (uint64_t)1)
2067  END_KV_SERIALIZE_MAP()
2068  };
2069  typedef epee::misc_utils::struct_init<response_t> response;
2070  };
2071 
2073  {
2075  {
2076  BEGIN_KV_SERIALIZE_MAP()
2077  KV_SERIALIZE_PARENT(rpc_request_base)
2078  END_KV_SERIALIZE_MAP()
2079  };
2080  typedef epee::misc_utils::struct_init<request_t> request;
2081 
2082  struct chain_info
2083  {
2084  std::string block_hash;
2085  uint64_t height;
2086  uint64_t length;
2087  uint64_t difficulty;
2088  std::string wide_difficulty;
2090  std::vector<std::string> block_hashes;
2092 
2093  BEGIN_KV_SERIALIZE_MAP()
2094  KV_SERIALIZE(block_hash)
2095  KV_SERIALIZE(height)
2096  KV_SERIALIZE(length)
2097  KV_SERIALIZE(difficulty)
2098  KV_SERIALIZE(wide_difficulty)
2099  KV_SERIALIZE(difficulty_top64)
2100  KV_SERIALIZE(block_hashes)
2101  KV_SERIALIZE(main_chain_parent_block)
2102  END_KV_SERIALIZE_MAP()
2103  };
2104 
2106  {
2107  std::vector<chain_info> chains;
2108 
2109  BEGIN_KV_SERIALIZE_MAP()
2110  KV_SERIALIZE_PARENT(rpc_response_base)
2111  KV_SERIALIZE(chains)
2112  END_KV_SERIALIZE_MAP()
2113  };
2114  typedef epee::misc_utils::struct_init<response_t> response;
2115  };
2116 
2118  {
2120  {
2121  std::string command;
2122  std::string path;
2123 
2124  BEGIN_KV_SERIALIZE_MAP()
2125  KV_SERIALIZE_PARENT(rpc_request_base)
2126  KV_SERIALIZE(command)
2127  KV_SERIALIZE(path)
2128  END_KV_SERIALIZE_MAP()
2129  };
2130  typedef epee::misc_utils::struct_init<request_t> request;
2131 
2133  {
2134  bool update;
2135  std::string version;
2136  std::string user_uri;
2137  std::string auto_uri;
2138  std::string hash;
2139  std::string path;
2140 
2141  BEGIN_KV_SERIALIZE_MAP()
2142  KV_SERIALIZE_PARENT(rpc_response_base)
2143  KV_SERIALIZE(update)
2144  KV_SERIALIZE(version)
2145  KV_SERIALIZE(user_uri)
2146  KV_SERIALIZE(auto_uri)
2147  KV_SERIALIZE(hash)
2148  KV_SERIALIZE(path)
2149  END_KV_SERIALIZE_MAP()
2150  };
2151  typedef epee::misc_utils::struct_init<response_t> response;
2152  };
2153 
2155  {
2157  {
2158  std::vector<std::string> txids;
2159 
2160  BEGIN_KV_SERIALIZE_MAP()
2161  KV_SERIALIZE_PARENT(rpc_access_request_base)
2162  KV_SERIALIZE(txids)
2163  END_KV_SERIALIZE_MAP()
2164  };
2165  typedef epee::misc_utils::struct_init<request_t> request;
2166 
2168  {
2169  BEGIN_KV_SERIALIZE_MAP()
2170  KV_SERIALIZE_PARENT(rpc_access_response_base)
2171  END_KV_SERIALIZE_MAP()
2172  };
2173  typedef epee::misc_utils::struct_init<response_t> response;
2174  };
2175 
2177  {
2179  {
2180  BEGIN_KV_SERIALIZE_MAP()
2181  KV_SERIALIZE_PARENT(rpc_access_request_base)
2182  END_KV_SERIALIZE_MAP()
2183  };
2184  typedef epee::misc_utils::struct_init<request_t> request;
2185 
2186  struct peer
2187  {
2189 
2190  BEGIN_KV_SERIALIZE_MAP()
2191  KV_SERIALIZE(info)
2192  END_KV_SERIALIZE_MAP()
2193  };
2194 
2195  struct span
2196  {
2198  uint64_t nblocks;
2199  std::string connection_id;
2200  uint32_t rate;
2201  uint32_t speed;
2202  uint64_t size;
2203  std::string remote_address;
2204 
2205  BEGIN_KV_SERIALIZE_MAP()
2206  KV_SERIALIZE(start_block_height)
2207  KV_SERIALIZE(nblocks)
2208  KV_SERIALIZE(connection_id)
2209  KV_SERIALIZE(rate)
2210  KV_SERIALIZE(speed)
2211  KV_SERIALIZE(size)
2212  KV_SERIALIZE(remote_address)
2213  END_KV_SERIALIZE_MAP()
2214  };
2215 
2217  {
2218  uint64_t height;
2219  uint64_t target_height;
2221  std::list<peer> peers;
2222  std::list<span> spans;
2223  std::string overview;
2224 
2225  BEGIN_KV_SERIALIZE_MAP()
2226  KV_SERIALIZE_PARENT(rpc_access_response_base)
2227  KV_SERIALIZE(height)
2228  KV_SERIALIZE(target_height)
2229  KV_SERIALIZE(next_needed_pruning_seed)
2230  KV_SERIALIZE(peers)
2231  KV_SERIALIZE(spans)
2232  KV_SERIALIZE(overview)
2233  END_KV_SERIALIZE_MAP()
2234  };
2235  typedef epee::misc_utils::struct_init<response_t> response;
2236  };
2237 
2239  {
2241  {
2242  std::vector<uint64_t> amounts;
2243  uint64_t from_height;
2244  uint64_t to_height;
2246  bool binary;
2247  bool compress;
2248 
2249  BEGIN_KV_SERIALIZE_MAP()
2250  KV_SERIALIZE_PARENT(rpc_access_request_base)
2251  KV_SERIALIZE(amounts)
2252  KV_SERIALIZE_OPT(from_height, (uint64_t)0)
2253  KV_SERIALIZE_OPT(to_height, (uint64_t)0)
2254  KV_SERIALIZE_OPT(cumulative, false)
2255  KV_SERIALIZE_OPT(binary, true)
2256  KV_SERIALIZE_OPT(compress, false)
2257  END_KV_SERIALIZE_MAP()
2258  };
2259  typedef epee::misc_utils::struct_init<request_t> request;
2260 
2262  {
2264  uint64_t amount;
2265  std::string compressed_data;
2266  bool binary;
2267  bool compress;
2268 
2269  BEGIN_KV_SERIALIZE_MAP()
2270  KV_SERIALIZE(amount)
2271  KV_SERIALIZE_N(data.start_height, "start_height")
2272  KV_SERIALIZE(binary)
2273  KV_SERIALIZE(compress)
2274  if (this_ref.binary)
2275  {
2276  if (is_store)
2277  {
2278  if (this_ref.compress)
2279  {
2280  const_cast<std::string&>(this_ref.compressed_data) = compress_integer_array(this_ref.data.distribution);
2281  KV_SERIALIZE(compressed_data)
2282  }
2283  else
2284  KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(data.distribution, "distribution")
2285  }
2286  else
2287  {
2288  if (this_ref.compress)
2289  {
2290  KV_SERIALIZE(compressed_data)
2291  const_cast<std::vector<uint64_t>&>(this_ref.data.distribution) = decompress_integer_array<uint64_t>(this_ref.compressed_data);
2292  }
2293  else
2294  KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(data.distribution, "distribution")
2295  }
2296  }
2297  else
2298  KV_SERIALIZE_N(data.distribution, "distribution")
2299  KV_SERIALIZE_N(data.base, "base")
2300  END_KV_SERIALIZE_MAP()
2301  };
2302 
2304  {
2305  std::vector<distribution> distributions;
2306 
2307  BEGIN_KV_SERIALIZE_MAP()
2308  KV_SERIALIZE_PARENT(rpc_access_response_base)
2309  KV_SERIALIZE(distributions)
2310  END_KV_SERIALIZE_MAP()
2311  };
2312  typedef epee::misc_utils::struct_init<response_t> response;
2313  };
2314 
2316  {
2318  {
2319  BEGIN_KV_SERIALIZE_MAP()
2320  KV_SERIALIZE_PARENT(rpc_access_request_base)
2321  END_KV_SERIALIZE_MAP()
2322  };
2323  typedef epee::misc_utils::struct_init<request_t> request;
2324 
2326  {
2327  std::string hashing_blob;
2328  uint64_t seed_height;
2329  std::string seed_hash;
2330  std::string next_seed_hash;
2331  uint32_t cookie;
2332  uint64_t diff;
2334  uint64_t height;
2335 
2336  BEGIN_KV_SERIALIZE_MAP()
2337  KV_SERIALIZE_PARENT(rpc_access_response_base)
2338  KV_SERIALIZE(hashing_blob)
2339  KV_SERIALIZE(seed_height)
2340  KV_SERIALIZE(seed_hash)
2341  KV_SERIALIZE(next_seed_hash)
2342  KV_SERIALIZE(cookie)
2343  KV_SERIALIZE(diff)
2344  KV_SERIALIZE(credits_per_hash_found)
2345  KV_SERIALIZE(height)
2346  END_KV_SERIALIZE_MAP()
2347  };
2348  typedef epee::misc_utils::struct_init<response_t> response;
2349  };
2350 
2352  {
2354  {
2355  uint32_t nonce;
2356  uint32_t cookie;
2357 
2358  BEGIN_KV_SERIALIZE_MAP()
2359  KV_SERIALIZE_PARENT(rpc_access_request_base)
2360  KV_SERIALIZE(nonce)
2361  KV_SERIALIZE(cookie)
2362  END_KV_SERIALIZE_MAP()
2363  };
2364  typedef epee::misc_utils::struct_init<request_t> request;
2365 
2367  {
2368  BEGIN_KV_SERIALIZE_MAP()
2369  KV_SERIALIZE_PARENT(rpc_access_response_base)
2370  END_KV_SERIALIZE_MAP()
2371  };
2372  typedef epee::misc_utils::struct_init<response_t> response;
2373  };
2374 
2376  {
2378  {
2379  std::string paying_for;
2380  uint64_t payment;
2381 
2382  BEGIN_KV_SERIALIZE_MAP()
2383  KV_SERIALIZE_PARENT(rpc_access_request_base)
2384  KV_SERIALIZE(paying_for)
2385  KV_SERIALIZE(payment)
2386  END_KV_SERIALIZE_MAP()
2387  };
2388  typedef epee::misc_utils::struct_init<request_t> request;
2389 
2391  {
2392  BEGIN_KV_SERIALIZE_MAP()
2393  KV_SERIALIZE_PARENT(rpc_access_response_base)
2394  END_KV_SERIALIZE_MAP()
2395  };
2396  typedef epee::misc_utils::struct_init<response_t> response;
2397  };
2398 
2400  {
2402  {
2403  bool clear;
2404 
2405  BEGIN_KV_SERIALIZE_MAP()
2406  KV_SERIALIZE_PARENT(rpc_request_base)
2407  KV_SERIALIZE(clear)
2408  END_KV_SERIALIZE_MAP()
2409  };
2410  typedef epee::misc_utils::struct_init<request_t> request;
2411 
2412  struct entry
2413  {
2414  std::string rpc;
2415  uint64_t count;
2416  uint64_t time;
2417  uint64_t credits;
2418 
2419  BEGIN_KV_SERIALIZE_MAP()
2420  KV_SERIALIZE(rpc)
2421  KV_SERIALIZE(count)
2422  KV_SERIALIZE(time)
2423  KV_SERIALIZE(credits)
2424  END_KV_SERIALIZE_MAP()
2425  };
2426 
2428  {
2429  std::vector<entry> data;
2430 
2431  BEGIN_KV_SERIALIZE_MAP()
2432  KV_SERIALIZE_PARENT(rpc_response_base)
2433  KV_SERIALIZE(data)
2434  END_KV_SERIALIZE_MAP()
2435  };
2436  typedef epee::misc_utils::struct_init<response_t> response;
2437  };
2438 
2440  {
2442  {
2443  BEGIN_KV_SERIALIZE_MAP()
2444  KV_SERIALIZE_PARENT(rpc_request_base)
2445  END_KV_SERIALIZE_MAP()
2446  };
2447  typedef epee::misc_utils::struct_init<request_t> request;
2448 
2449  struct entry
2450  {
2451  std::string client;
2452  uint64_t balance;
2454  uint64_t credits_total;
2455  uint64_t credits_used;
2456  uint64_t nonces_good;
2457  uint64_t nonces_stale;
2458  uint64_t nonces_bad;
2459  uint64_t nonces_dupe;
2460 
2461  BEGIN_KV_SERIALIZE_MAP()
2462  KV_SERIALIZE(client)
2463  KV_SERIALIZE(balance)
2464  KV_SERIALIZE(last_update_time)
2465  KV_SERIALIZE(credits_total)
2466  KV_SERIALIZE(credits_used)
2467  KV_SERIALIZE(nonces_good)
2468  KV_SERIALIZE(nonces_stale)
2469  KV_SERIALIZE(nonces_bad)
2470  KV_SERIALIZE(nonces_dupe)
2471  END_KV_SERIALIZE_MAP()
2472  };
2473 
2475  {
2476  std::list<entry> entries;
2477  uint32_t hashrate;
2478 
2479  BEGIN_KV_SERIALIZE_MAP()
2480  KV_SERIALIZE_PARENT(rpc_response_base)
2481  KV_SERIALIZE(entries)
2482  KV_SERIALIZE(hashrate)
2483  END_KV_SERIALIZE_MAP()
2484  };
2485  typedef epee::misc_utils::struct_init<response_t> response;
2486  };
2487 
2489  {
2491  {
2492  std::string client;
2493  int64_t delta_balance;
2494 
2495  BEGIN_KV_SERIALIZE_MAP()
2496  KV_SERIALIZE_PARENT(rpc_request_base)
2497  KV_SERIALIZE(client)
2498  KV_SERIALIZE_OPT(delta_balance, (int64_t)0)
2499  END_KV_SERIALIZE_MAP()
2500  };
2501  typedef epee::misc_utils::struct_init<request_t> request;
2502 
2504  {
2505  uint64_t credits;
2506 
2507  BEGIN_KV_SERIALIZE_MAP()
2508  KV_SERIALIZE_PARENT(rpc_response_base)
2509  KV_SERIALIZE(credits)
2510  END_KV_SERIALIZE_MAP()
2511  };
2512  typedef epee::misc_utils::struct_init<response_t> response;
2513  };
2514 
2516  {
2518  {
2519  uint64_t nblocks;
2520 
2521  BEGIN_KV_SERIALIZE_MAP()
2522  KV_SERIALIZE_PARENT(rpc_request_base)
2523  KV_SERIALIZE(nblocks)
2524  END_KV_SERIALIZE_MAP()
2525  };
2526  typedef epee::misc_utils::struct_init<request_t> request;
2527 
2529  {
2530  uint64_t height;
2531 
2532  BEGIN_KV_SERIALIZE_MAP()
2533  KV_SERIALIZE_PARENT(rpc_response_base)
2534  KV_SERIALIZE(height)
2535  END_KV_SERIALIZE_MAP()
2536  };
2537  typedef epee::misc_utils::struct_init<response_t> response;
2538  };
2539 
2541  {
2543  {
2544  bool check;
2545 
2546  BEGIN_KV_SERIALIZE_MAP()
2547  KV_SERIALIZE_PARENT(rpc_request_base)
2548  KV_SERIALIZE_OPT(check, false)
2549  END_KV_SERIALIZE_MAP()
2550  };
2551  typedef epee::misc_utils::struct_init<request_t> request;
2552 
2554  {
2555  bool pruned;
2556  uint32_t pruning_seed;
2557 
2558  BEGIN_KV_SERIALIZE_MAP()
2559  KV_SERIALIZE_PARENT(rpc_response_base)
2560  KV_SERIALIZE(pruned)
2561  KV_SERIALIZE(pruning_seed)
2562  END_KV_SERIALIZE_MAP()
2563  };
2564  typedef epee::misc_utils::struct_init<response_t> response;
2565  };
2566 
2568  {
2570  {
2571  bool bad_txs;
2573 
2574  BEGIN_KV_SERIALIZE_MAP()
2575  KV_SERIALIZE_PARENT(rpc_request_base)
2576  KV_SERIALIZE_OPT(bad_txs, false)
2577  KV_SERIALIZE_OPT(bad_blocks, false)
2578  END_KV_SERIALIZE_MAP()
2579  };
2580  typedef epee::misc_utils::struct_init<request_t> request;
2581 
2583  {
2584  BEGIN_KV_SERIALIZE_MAP()
2585  KV_SERIALIZE_PARENT(rpc_response_base)
2586  END_KV_SERIALIZE_MAP()
2587  };
2588  typedef epee::misc_utils::struct_init<response_t> response;
2589  };
2590 
2591 }
uint64_t height_without_bootstrap
Definition: core_rpc_server_commands_defs.h:683
std::string password
Definition: core_rpc_server_commands_defs.h:1607
uint64_t alt_blocks_count
Definition: core_rpc_server_commands_defs.h:660
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:762
std::vector< get_outputs_out > outputs
Definition: core_rpc_server_commands_defs.h:478
peer(uint64_t id, uint32_t ip, uint16_t port, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port, uint32_t rpc_credits_per_hash)
Definition: core_rpc_server_commands_defs.h:1173
std::string remote_address
Definition: core_rpc_server_commands_defs.h:2203
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:637
Definition: core_rpc_server_commands_defs.h:1155
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:856
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1200
STATUS
Definition: core_rpc_server_commands_defs.h:407
Definition: core_rpc_server_commands_defs.h:777
bool testnet
Definition: core_rpc_server_commands_defs.h:667
std::vector< uint64_t > request
Definition: core_rpc_server_commands_defs.h:878
std::string tx
Definition: core_rpc_server_commands_defs.h:299
bool white
Definition: core_rpc_server_commands_defs.h:1242
Definition: core_rpc_server_commands_defs.h:277
uint16_t port
Definition: core_rpc_server_commands_defs.h:1159
Definition: core_rpc_server_commands_defs.h:95
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:813
bool not_relayed
Definition: core_rpc_server_commands_defs.h:583
uint64_t reward
Definition: core_rpc_server_commands_defs.h:1000
Definition: core_rpc_server_commands_defs.h:1603
uint64_t credits
Definition: core_rpc_server_commands_defs.h:126
uint32_t ip
Definition: core_rpc_server_commands_defs.h:1851
Definition: core_rpc_server_commands_defs.h:1202
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1479
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1406
uint64_t emission_amount
Definition: core_rpc_server_commands_defs.h:2025
const uint32_t T[512]
Definition: groestl_tables.h:36
uint8_t version
Definition: core_rpc_server_commands_defs.h:1787
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1907
Definition: core_rpc_server_commands_defs.h:162
Definition: core_rpc_server_commands_defs.h:2119
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1615
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:994
std::vector< uint64_t > o_indexes
Definition: core_rpc_server_commands_defs.h:453
Definition: core_rpc_server_commands_defs.h:1923
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1843
uint64_t height
Definition: core_rpc_server_commands_defs.h:652
uint64_t tx_count
Definition: core_rpc_server_commands_defs.h:658
uint64_t nblocks
Definition: core_rpc_server_commands_defs.h:2198
Definition: core_rpc_server_commands_defs.h:736
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2348
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1079
uint64_t quantization_mask
Definition: core_rpc_server_commands_defs.h:2061
std::string address
Definition: core_rpc_server_commands_defs.h:803
peer(uint64_t id, const std::string &host, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port, uint32_t rpc_credits_per_hash)
Definition: core_rpc_server_commands_defs.h:1167
Definition: core_rpc_server_commands_defs.h:295
uint64_t credits_used
Definition: core_rpc_server_commands_defs.h:2455
bool update
Definition: core_rpc_server_commands_defs.h:2134
Definition: core_rpc_server_commands_defs.h:550
std::string wide_cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:672
Definition: core_rpc_server_commands_defs.h:2390
uint32_t num_double_spends
Definition: core_rpc_server_commands_defs.h:1507
std::vector< std::string > txs_as_json
Definition: core_rpc_server_commands_defs.h:385
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2165
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1321
Definition: core_rpc_server_commands_defs.h:2528
std::vector< std::string > txids
Definition: core_rpc_server_commands_defs.h:2158
Definition: core_rpc_server_commands_defs.h:745
std::string as_json
Definition: core_rpc_server_commands_defs.h:349
std::list< peer > peers
Definition: core_rpc_server_commands_defs.h:2221
Definition: core_rpc_server_commands_defs.h:1062
bool low_mixin
Definition: core_rpc_server_commands_defs.h:584
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2501
std::string block_hash
Definition: core_rpc_server_commands_defs.h:2084
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:980
Definition: core_rpc_server_commands_defs.h:1883
Definition: core_rpc_server_commands_defs.h:1813
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2184
Definition: core_rpc_server_commands_defs.h:124
uint64_t count
Definition: core_rpc_server_commands_defs.h:866
uint64_t receive_time
Definition: core_rpc_server_commands_defs.h:1347
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:609
std::vector< std::uint64_t > distribution
Definition: rpc_handler.h:47
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:290
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:238
uint64_t height
Definition: core_rpc_server_commands_defs.h:538
Definition: core_rpc_server_commands_defs.h:1077
Definition: core_rpc_server_commands_defs.h:2072
bool public_only
Definition: core_rpc_server_commands_defs.h:1193
Definition: core_rpc_server_commands_defs.h:1657
std::string hash
Definition: core_rpc_server_commands_defs.h:151
std::string id_hash
Definition: core_rpc_server_commands_defs.h:1337
bool no_miner_tx
Definition: core_rpc_server_commands_defs.h:170
Definition: core_rpc_server_commands_defs.h:1323
uint64_t fee_amount
Definition: core_rpc_server_commands_defs.h:2028
uint32_t state
Definition: core_rpc_server_commands_defs.h:1793
Definition: rpc_handler.h:45
uint64_t white_peerlist_size
Definition: core_rpc_server_commands_defs.h:664
Definition: core_rpc_server_commands_defs.h:1552
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2396
uint64_t credits_per_hash_found
Definition: core_rpc_server_commands_defs.h:2333
bool orphan_status
Definition: core_rpc_server_commands_defs.h:990
std::string seed_hash
Definition: core_rpc_server_commands_defs.h:2329
uint32_t num_10m
Definition: core_rpc_server_commands_defs.h:1503
bool update_available
Definition: core_rpc_server_commands_defs.h:686
std::vector< std::string > request
Definition: core_rpc_server_commands_defs.h:939
std::string hash
Definition: core_rpc_server_commands_defs.h:2138
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:531
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:401
std::vector< std::string > blks_hashes
Definition: core_rpc_server_commands_defs.h:253
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:159
bool check
Definition: core_rpc_server_commands_defs.h:2544
std::vector< block_complete_entry > blocks
Definition: core_rpc_server_commands_defs.h:201
Definition: core_rpc_server_commands_defs.h:1441
std::string username
Definition: core_rpc_server_commands_defs.h:1606
std::string status
Definition: core_rpc_server_commands_defs.h:1619
bool do_not_relay
Definition: core_rpc_server_commands_defs.h:567
std::string overview
Definition: core_rpc_server_commands_defs.h:2223
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:515
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1108
Definition: core_rpc_server_commands_defs.h:969
uint32_t ip
Definition: core_rpc_server_commands_defs.h:1816
uint64_t index
Definition: core_rpc_server_commands_defs.h:466
Definition: core_rpc_server_commands_defs.h:952
std::vector< chain_info > chains
Definition: core_rpc_server_commands_defs.h:2107
Definition: core_rpc_server_commands_defs.h:1874
std::string hash
Definition: core_rpc_server_commands_defs.h:1064
Definition: core_rpc_server_commands_defs.h:1310
Definition: core_rpc_server_commands_defs.h:1895
crypto::public_key key
Definition: core_rpc_server_commands_defs.h:491
bool cumulative
Definition: core_rpc_server_commands_defs.h:2245
Definition: core_rpc_server_commands_defs.h:1630
connection_info info
Definition: core_rpc_server_commands_defs.h:2188
Definition: core_rpc_server_commands_defs.h:864
Definition: core_rpc_server_commands_defs.h:2325
std::string blob
Definition: core_rpc_server_commands_defs.h:1140
std::string path
Definition: core_rpc_server_commands_defs.h:2122
bool banned
Definition: core_rpc_server_commands_defs.h:1898
uint64_t fee_total
Definition: core_rpc_server_commands_defs.h:1499
Definition: cryptonote_basic.h:446
std::vector< block_header_response > headers
Definition: core_rpc_server_commands_defs.h:1591
Definition: core_rpc_server_commands_defs.h:1034
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:275
Definition: core_rpc_server_commands_defs.h:217
Definition: core_rpc_server_commands_defs.h:2261
uint64_t credits
Definition: core_rpc_server_commands_defs.h:2417
Definition: core_rpc_server_commands_defs.h:564
Definition: core_rpc_server_commands_defs.h:2375
bool too_few_outputs
Definition: core_rpc_server_commands_defs.h:591
uint64_t total_packets_out
Definition: core_rpc_server_commands_defs.h:750
Definition: core_rpc_server_commands_defs.h:1312
Definition: core_rpc_server_commands_defs.h:941
Definition: core_rpc_server_commands_defs.h:768
std::string path
Definition: core_rpc_server_commands_defs.h:2139
Definition: core_rpc_server_commands_defs.h:1910
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2323
std::string response
Definition: core_rpc_server_commands_defs.h:880
uint64_t depth
Definition: core_rpc_server_commands_defs.h:992
std::string wallet_address
Definition: core_rpc_server_commands_defs.h:955
Definition: core_rpc_server_commands_defs.h:1530
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1769
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:656
Definition: core_rpc_server_commands_defs.h:1106
Definition: core_rpc_server_commands_defs.h:506
uint64_t block_weight_limit
Definition: core_rpc_server_commands_defs.h:675
bool relayed
Definition: core_rpc_server_commands_defs.h:356
uint64_t credits_total
Definition: core_rpc_server_commands_defs.h:2454
Definition: core_rpc_server_commands_defs.h:1772
std::string host
Definition: core_rpc_server_commands_defs.h:1218
Definition: core_rpc_server_commands_defs.h:850
Definition: core_rpc_server_commands_defs.h:1617
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1687
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1213
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:214
bool bg_ignore_battery
Definition: core_rpc_server_commands_defs.h:808
Definition: core_rpc_server_commands_defs.h:1470
int8_t level
Definition: core_rpc_server_commands_defs.h:1292
uint64_t block_timestamp
Definition: core_rpc_server_commands_defs.h:353
provides the implementation of varint&#39;s
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1450
Definition: core_rpc_server_commands_defs.h:2488
std::string address
Definition: core_rpc_server_commands_defs.h:1605
crypto::hash txid
Definition: core_rpc_server_commands_defs.h:442
std::vector< public_node > white
Definition: core_rpc_server_commands_defs.h:1255
std::vector< uint64_t > amounts
Definition: core_rpc_server_commands_defs.h:1936
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1152
std::string json
Definition: core_rpc_server_commands_defs.h:1141
uint32_t next_needed_pruning_seed
Definition: core_rpc_server_commands_defs.h:2220
bool active
Definition: core_rpc_server_commands_defs.h:800
Definition: core_rpc_server_commands_defs.h:1279
public_node(const peer &peer)
Definition: core_rpc_server_commands_defs.h:1225
uint64_t count
Definition: core_rpc_server_commands_defs.h:2013
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2372
Definition: core_rpc_server_commands_defs.h:1748
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1732
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:774
Definition: core_rpc_server_commands_defs.h:1647
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2173
std::vector< get_outputs_out > outputs
Definition: core_rpc_server_commands_defs.h:522
std::string status
Definition: core_rpc_server_commands_defs.h:103
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:268
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2312
bool prune
Definition: core_rpc_server_commands_defs.h:169
Definition: core_rpc_server_commands_defs.h:1301
Definition: core_rpc_server_commands_defs.h:1734
std::vector< peer > white_list
Definition: core_rpc_server_commands_defs.h:1204
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1743
Definition: cryptonote_protocol_defs.h:47
Definition: core_rpc_server_commands_defs.h:789
Definition: core_rpc_server_commands_defs.h:440
std::string next_seed_hash
Definition: core_rpc_server_commands_defs.h:2330
Definition: core_rpc_server_commands_defs.h:614
uint32_t in_peers
Definition: core_rpc_server_commands_defs.h:1762
Definition: core_rpc_server_commands_defs.h:2317
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:2089
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2588
uint64_t timestamp
Definition: core_rpc_server_commands_defs.h:987
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1277
std::vector< public_node > gray
Definition: core_rpc_server_commands_defs.h:1254
Definition: core_rpc_server_commands_defs.h:1431
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1674
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1598
bool compress
Definition: core_rpc_server_commands_defs.h:2267
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:577
Definition: core_rpc_server_commands_defs.h:262
bool gray
Definition: core_rpc_server_commands_defs.h:1241
Definition: core_rpc_server_commands_defs.h:405
Definition: daemon_messages.h:132
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:227
std::list< crypto::hash > block_ids
Definition: core_rpc_server_commands_defs.h:267
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1439
Definition: core_rpc_server_commands_defs.h:642
bool fee_too_low
Definition: core_rpc_server_commands_defs.h:590
Definition: core_rpc_server_commands_defs.h:903
Definition: core_rpc_server_commands_defs.h:2047
uint64_t speed
Definition: core_rpc_server_commands_defs.h:801
Definition: blocks.cpp:12
bool sanity_check_failed
Definition: core_rpc_server_commands_defs.h:592
rpc_response_base()
Definition: core_rpc_server_commands_defs.h:106
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:648
bool in_pool
Definition: core_rpc_server_commands_defs.h:350
std::vector< std::string > txs_as_hex
Definition: core_rpc_server_commands_defs.h:384
bool unlocked
Definition: core_rpc_server_commands_defs.h:537
public_node()
Definition: core_rpc_server_commands_defs.h:1223
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2388
uint64_t total_bytes_in
Definition: core_rpc_server_commands_defs.h:749
uint32_t version
Definition: core_rpc_server_commands_defs.h:1996
uint64_t oldest
Definition: core_rpc_server_commands_defs.h:1500
uint64_t fee
Definition: core_rpc_server_commands_defs.h:1456
Definition: core_rpc_server_commands_defs.h:451
bool untrusted
Definition: core_rpc_server_commands_defs.h:104
Definition: core_rpc_server_commands_defs.h:2105
Definition: core_rpc_server_commands_defs.h:2154
Definition: core_rpc_server_commands_defs.h:1848
Definition: core_rpc_server_commands_defs.h:1419
Definition: core_rpc_server_commands_defs.h:2353
std::string nettype
Definition: core_rpc_server_commands_defs.h:669
Definition: core_rpc_server_commands_defs.h:325
Definition: core_rpc_server_commands_defs.h:1601
Definition: core_rpc_server_commands_defs.h:1239
uint8_t minor_version
Definition: core_rpc_server_commands_defs.h:986
Definition: core_rpc_server_commands_defs.h:533
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1625
Definition: daemon_messages.h:134
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1115
Definition: core_rpc_server_commands_defs.h:1574
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1417
Definition: core_rpc_server_commands_defs.h:1288
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:2088
std::vector< uint64_t > output_indices
Definition: core_rpc_server_commands_defs.h:355
uint8_t major_version
Definition: core_rpc_server_commands_defs.h:985
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2580
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1263
Definition: core_rpc_server_commands_defs.h:1374
uint64_t free_space
Definition: core_rpc_server_commands_defs.h:680
Definition: core_rpc_server_commands_defs.h:937
Definition: core_rpc_server_commands_defs.h:1932
Definition: core_rpc_server_commands_defs.h:463
std::vector< tx_output_indices > indices
Definition: core_rpc_server_commands_defs.h:192
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1783
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:947
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1703
std::list< std::string > request
Definition: core_rpc_server_commands_defs.h:862
std::string address
Definition: core_rpc_server_commands_defs.h:297
uint32_t ip
Definition: core_rpc_server_commands_defs.h:1158
uint64_t height
Definition: core_rpc_server_commands_defs.h:2530
std::vector< outkey > outs
Definition: core_rpc_server_commands_defs.h:552
uint64_t emission_amount_top64
Definition: core_rpc_server_commands_defs.h:2027
uint64_t current_height
Definition: core_rpc_server_commands_defs.h:281
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1307
uint64_t bytes
Definition: core_rpc_server_commands_defs.h:1485
uint64_t nblocks
Definition: core_rpc_server_commands_defs.h:2519
bool offline
Definition: core_rpc_server_commands_defs.h:681
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1133
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1880
uint32_t nonce
Definition: core_rpc_server_commands_defs.h:2355
Definition: core_rpc_server_commands_defs.h:293
Definition: core_rpc_server_commands_defs.h:876
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1124
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:835
bool do_background_mining
Definition: core_rpc_server_commands_defs.h:618
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:460
bool decode_as_json
Definition: core_rpc_server_commands_defs.h:328
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1038
uint8_t bg_target
Definition: core_rpc_server_commands_defs.h:809
Definition: daemon_messages.h:133
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1049
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2021
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2056
crypto::hash txid
Definition: core_rpc_server_commands_defs.h:495
Definition: core_rpc_server_commands_defs.h:2540
int64_t limit_up
Definition: core_rpc_server_commands_defs.h:1695
uint64_t database_size
Definition: core_rpc_server_commands_defs.h:685
uint64_t height
Definition: core_rpc_server_commands_defs.h:2218
Definition: core_rpc_server_commands_defs.h:425
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1096
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:906
Definition: core_rpc_server_commands_defs.h:2553
std::string top_block_hash
Definition: core_rpc_server_commands_defs.h:670
uint64_t cumulative_difficulty_top64
Definition: core_rpc_server_commands_defs.h:999
std::vector< spent_key_image_info > spent_key_images
Definition: core_rpc_server_commands_defs.h:1398
bool visible
Definition: core_rpc_server_commands_defs.h:1270
uint64_t max_used_block_height
Definition: core_rpc_server_commands_defs.h:1343
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1951
uint64_t current_height
Definition: core_rpc_server_commands_defs.h:203
rct::key mask
Definition: core_rpc_server_commands_defs.h:492
uint64_t time
Definition: core_rpc_server_commands_defs.h:2416
bool ban
Definition: core_rpc_server_commands_defs.h:1852
Definition: core_rpc_server_commands_defs.h:1482
std::string wide_emission_amount
Definition: core_rpc_server_commands_defs.h:2026
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1758
uint64_t end_height
Definition: core_rpc_server_commands_defs.h:1577
uint64_t block_reward
Definition: core_rpc_server_commands_defs.h:811
std::vector< crypto::hash > m_block_ids
Definition: core_rpc_server_commands_defs.h:279
uint64_t last_failed_height
Definition: core_rpc_server_commands_defs.h:1345
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:280
std::string prunable_hash
Definition: core_rpc_server_commands_defs.h:348
Definition: core_rpc_server_commands_defs.h:1460
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2564
std::string categories
Definition: core_rpc_server_commands_defs.h:1325
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:249
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2130
uint64_t unlocked_instances
Definition: core_rpc_server_commands_defs.h:1957
uint64_t min_count
Definition: core_rpc_server_commands_defs.h:1937
std::vector< std::string > txids
Definition: core_rpc_server_commands_defs.h:1914
bool ignore_battery
Definition: core_rpc_server_commands_defs.h:619
bool pruned
Definition: core_rpc_server_commands_defs.h:2555
uint8_t voting
Definition: core_rpc_server_commands_defs.h:1792
std::string tx_hash
Definition: core_rpc_server_commands_defs.h:344
Holds cryptonote related classes and helpers.
Definition: blockchain_db.cpp:44
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2114
uint64_t block_size
Definition: core_rpc_server_commands_defs.h:1001
uint64_t total_instances
Definition: core_rpc_server_commands_defs.h:1956
Definition: core_rpc_server_commands_defs.h:650
Definition: core_rpc_server_commands_defs.h:787
Definition: core_rpc_server_commands_defs.h:1953
uint32_t out_peers
Definition: core_rpc_server_commands_defs.h:1736
std::string connection_id
Definition: core_rpc_server_commands_defs.h:2199
static __thread int depth
Definition: threadpool.cpp:34
uint32_t block_target
Definition: core_rpc_server_commands_defs.h:810
Definition: core_rpc_server_commands_defs.h:1934
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:967
uint16_t rpc_port
Definition: core_rpc_server_commands_defs.h:1160
std::vector< std::string > tx_hashes
Definition: core_rpc_server_commands_defs.h:1139
Definition: core_rpc_server_commands_defs.h:1972
std::string prev_block
Definition: core_rpc_server_commands_defs.h:890
uint32_t seconds
Definition: core_rpc_server_commands_defs.h:1853
Definition: core_rpc_server_commands_defs.h:2399
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1104
Definition: core_rpc_server_commands_defs.h:1191
uint64_t height
Definition: core_rpc_server_commands_defs.h:150
Definition: core_rpc_server_commands_defs.h:265
std::vector< txpool_histo > histo
Definition: core_rpc_server_commands_defs.h:1506
std::vector< crypto::hash > tx_hashes
Definition: core_rpc_server_commands_defs.h:1421
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:260
uint32_t num_failing
Definition: core_rpc_server_commands_defs.h:1502
Definition: core_rpc_server_commands_defs.h:474
uint64_t grey_peerlist_size
Definition: core_rpc_server_commands_defs.h:665
Definition: core_rpc_server_commands_defs.h:342
mdb_size_t count(MDB_cursor *cur)
Definition: value_stream.cpp:39
std::vector< block_output_indices > output_indices
Definition: core_rpc_server_commands_defs.h:204
Definition: core_rpc_server_commands_defs.h:476
Definition: core_rpc_server_commands_defs.h:2503
std::vector< std::string > tx_hashes
Definition: core_rpc_server_commands_defs.h:1443
Definition: core_rpc_server_commands_defs.h:2569
std::string reason
Definition: core_rpc_server_commands_defs.h:582
uint64_t bytes_total
Definition: core_rpc_server_commands_defs.h:1495
Definition: core_rpc_server_commands_defs.h:1047
bool clear
Definition: core_rpc_server_commands_defs.h:2403
std::string wide_cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:998
uint32_t cookie
Definition: core_rpc_server_commands_defs.h:2356
Definition: core_rpc_server_commands_defs.h:1984
std::vector< int > spent_status
Definition: core_rpc_server_commands_defs.h:427
std::string status
Definition: core_rpc_server_commands_defs.h:312
Definition: core_rpc_server_commands_defs.h:2010
std::vector< uint64_t > heights
Definition: core_rpc_server_commands_defs.h:221
Definition: core_rpc_server_commands_defs.h:2156
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2447
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:2087
uint64_t payment
Definition: core_rpc_server_commands_defs.h:2380
uint64_t block_height
Definition: core_rpc_server_commands_defs.h:352
std::string version
Definition: core_rpc_server_commands_defs.h:2135
uint64_t reserved_offset
Definition: core_rpc_server_commands_defs.h:909
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:202
Definition: core_rpc_server_commands_defs.h:2176
uint64_t weight
Definition: core_rpc_server_commands_defs.h:1340
uint32_t txs
Definition: core_rpc_server_commands_defs.h:1484
std::vector< entry > txs
Definition: core_rpc_server_commands_defs.h:391
uint32_t bytes_min
Definition: core_rpc_server_commands_defs.h:1496
uint32_t window
Definition: core_rpc_server_commands_defs.h:1789
bool double_spend_seen
Definition: core_rpc_server_commands_defs.h:1351
epee::levin::async_protocol_handler_config< detail::p2p_context > connections
Definition: levin_notify.h:66
uint64_t target_height
Definition: core_rpc_server_commands_defs.h:653
std::vector< std::string > txs_hashes
Definition: core_rpc_server_commands_defs.h:327
Definition: core_rpc_server_commands_defs.h:199
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1468
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1992
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1663
uint64_t blob_size
Definition: core_rpc_server_commands_defs.h:1339
Definition: core_rpc_server_commands_defs.h:734
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2259
bool invalid_output
Definition: core_rpc_server_commands_defs.h:587
Definition: core_rpc_server_commands_defs.h:612
bool release
Definition: core_rpc_server_commands_defs.h:1997
Definition: core_rpc_server_commands_defs.h:2401
std::vector< distribution > distributions
Definition: core_rpc_server_commands_defs.h:2305
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1066
uint32_t pruning_seed
Definition: core_rpc_server_commands_defs.h:1163
uint8_t version
Definition: core_rpc_server_commands_defs.h:1776
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2512
Definition: core_rpc_server_commands_defs.h:1774
uint64_t expected_reward
Definition: core_rpc_server_commands_defs.h:910
uint64_t received_timestamp
Definition: core_rpc_server_commands_defs.h:354
bool unlocked
Definition: core_rpc_server_commands_defs.h:493
Definition: core_rpc_server_commands_defs.h:219
std::string hash
Definition: core_rpc_server_commands_defs.h:1122
uint64_t recent_cutoff
Definition: core_rpc_server_commands_defs.h:1940
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1578
Definition: core_rpc_server_commands_defs.h:2582
Definition: core_rpc_server_commands_defs.h:1785
Definition: core_rpc_server_commands_defs.h:1266
std::vector< peer > gray_list
Definition: core_rpc_server_commands_defs.h:1205
std::string miner_tx_hash
Definition: core_rpc_server_commands_defs.h:1006
uint64_t cumulative_difficulty_top64
Definition: core_rpc_server_commands_defs.h:673
std::vector< std::string > hashes
Definition: core_rpc_server_commands_defs.h:1065
Definition: core_rpc_server_commands_defs.h:1091
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1644
std::vector< std::string > block_hashes
Definition: core_rpc_server_commands_defs.h:2090
uint64_t histo_98pc
Definition: core_rpc_server_commands_defs.h:1505
Definition: core_rpc_server_commands_defs.h:2517
Definition: core_rpc_server_commands_defs.h:1826
std::string status
Definition: core_rpc_server_commands_defs.h:1897
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:996
Definition: core_rpc_server_commands_defs.h:165
uint32_t starting_nonce
Definition: core_rpc_server_commands_defs.h:957
bool double_spend
Definition: core_rpc_server_commands_defs.h:585
uint64_t amount
Definition: core_rpc_server_commands_defs.h:2264
bool bad_blocks
Definition: core_rpc_server_commands_defs.h:2572
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:487
uint32_t in_peers
Definition: core_rpc_server_commands_defs.h:1751
Definition: core_rpc_server_commands_defs.h:243
std::vector< std::string > txs_hashes
Definition: core_rpc_server_commands_defs.h:1377
Definition: core_rpc_server_commands_defs.h:1120
Definition: rctTypes.h:79
Definition: core_rpc_server_commands_defs.h:1994
Definition: core_rpc_server_commands_defs.h:1863
Definition: core_rpc_server_commands_defs.h:2186
Definition: core_rpc_server_commands_defs.h:413
uint64_t threads_count
Definition: core_rpc_server_commands_defs.h:617
Definition: core_rpc_server_commands_defs.h:1411
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1921
Definition: core_rpc_server_commands_defs.h:841
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1045
uint64_t balance
Definition: core_rpc_server_commands_defs.h:2452
Definition: core_rpc_server_commands_defs.h:1550
uint64_t incoming_connections_count
Definition: core_rpc_server_commands_defs.h:662
Definition: core_rpc_server_commands_defs.h:2474
std::string next_seed_hash
Definition: core_rpc_server_commands_defs.h:914
Definition: core_rpc_server_commands_defs.h:1385
int64_t limit_down
Definition: core_rpc_server_commands_defs.h:1694
std::string miner_tx_hash
Definition: core_rpc_server_commands_defs.h:1138
Definition: core_rpc_server_commands_defs.h:1690
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2042
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:901
std::string pruned_as_hex
Definition: core_rpc_server_commands_defs.h:346
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:795
uint64_t long_term_weight
Definition: core_rpc_server_commands_defs.h:1005
std::string prunable_as_hex
Definition: core_rpc_server_commands_defs.h:347
Definition: core_rpc_server_commands_defs.h:1216
uint64_t height
Definition: core_rpc_server_commands_defs.h:2012
Definition: core_rpc_server_commands_defs.h:1705
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1716
Definition: core_rpc_server_commands_defs.h:1538
rpc_access_response_base()
Definition: core_rpc_server_commands_defs.h:129
Definition: core_rpc_server_commands_defs.h:1628
Definition: core_rpc_server_commands_defs.h:1433
int64_t limit_up
Definition: core_rpc_server_commands_defs.h:1707
Definition: core_rpc_server_commands_defs.h:839
uint64_t block_size_limit
Definition: core_rpc_server_commands_defs.h:674
uint64_t last_seen
Definition: core_rpc_server_commands_defs.h:1219
uint64_t rpc_connections_count
Definition: core_rpc_server_commands_defs.h:663
Definition: core_rpc_server_commands_defs.h:489
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1832
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1299
Definition: core_rpc_server_commands_defs.h:438
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:905
Definition: core_rpc_server_commands_defs.h:2058
Definition: core_rpc_server_commands_defs.h:381
Definition: core_rpc_server_commands_defs.h:2441
std::string tx_as_hex
Definition: core_rpc_server_commands_defs.h:566
#define false
Definition: stdbool.h:37
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2069
Definition: core_rpc_server_commands_defs.h:1649
Definition: core_rpc_server_commands_defs.h:181
std::string hashing_blob
Definition: core_rpc_server_commands_defs.h:2327
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1929
Definition: core_rpc_server_commands_defs.h:1060
Definition: core_rpc_server_commands_defs.h:2377
std::string version
Definition: core_rpc_server_commands_defs.h:687
Definition: core_rpc_server_commands_defs.h:2238
std::string mask
Definition: core_rpc_server_commands_defs.h:536
Definition: core_rpc_server_commands_defs.h:860
Definition: core_rpc_server_commands_defs.h:2216
std::list< entry > entries
Definition: core_rpc_server_commands_defs.h:2476
uint64_t tx_pool_size
Definition: core_rpc_server_commands_defs.h:659
uint64_t recent_instances
Definition: core_rpc_server_commands_defs.h:1958
uint64_t from_height
Definition: core_rpc_server_commands_defs.h:2243
Definition: core_rpc_server_commands_defs.h:520
Definition: core_rpc_server_commands_defs.h:884
bool double_spend_seen
Definition: core_rpc_server_commands_defs.h:351
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:179
bool stagenet
Definition: core_rpc_server_commands_defs.h:668
uint64_t count
Definition: core_rpc_server_commands_defs.h:2415
uint64_t cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:997
POD_CLASS public_key
Definition: crypto.h:61
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1547
std::string hash
Definition: core_rpc_server_commands_defs.h:993
std::string compress_integer_array(const std::vector< T > &v)
Definition: core_rpc_server_commands_defs.h:46
uint64_t start_block_height
Definition: core_rpc_server_commands_defs.h:2197
std::vector< ban > bans
Definition: core_rpc_server_commands_defs.h:1865
version
Supported socks variants.
Definition: socks.h:57
Definition: core_rpc_server_commands_defs.h:241
Definition: core_rpc_server_commands_defs.h:1036
Definition: core_rpc_server_commands_defs.h:1189
std::string max_used_block_id_hash
Definition: core_rpc_server_commands_defs.h:1342
uint64_t reserve_size
Definition: core_rpc_server_commands_defs.h:888
Definition: core_rpc_server_commands_defs.h:2439
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1428
std::string error
Definition: core_rpc_server_commands_defs.h:313
uint64_t amount_of_blocks
Definition: core_rpc_server_commands_defs.h:954
std::string miner_address
Definition: core_rpc_server_commands_defs.h:616
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1636
std::string prev_hash
Definition: core_rpc_server_commands_defs.h:911
uint64_t nonces_bad
Definition: core_rpc_server_commands_defs.h:2458
std::list< span > spans
Definition: core_rpc_server_commands_defs.h:2222
std::vector< ban > bans
Definition: core_rpc_server_commands_defs.h:1836
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:729
uint32_t rpc_credits_per_hash
Definition: core_rpc_server_commands_defs.h:1161
std::string user_uri
Definition: core_rpc_server_commands_defs.h:2136
Definition: core_rpc_server_commands_defs.h:2303
uint64_t nonces_stale
Definition: core_rpc_server_commands_defs.h:2457
Definition: core_rpc_server_commands_defs.h:1760
std::string wallet_address
Definition: core_rpc_server_commands_defs.h:889
std::string address
Definition: core_rpc_server_commands_defs.h:1887
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:146
Definition: core_rpc_server_commands_defs.h:766
Definition: core_rpc_server_commands_defs.h:2074
uint64_t height
Definition: core_rpc_server_commands_defs.h:971
uint64_t height
Definition: core_rpc_server_commands_defs.h:908
Definition: core_rpc_server_commands_defs.h:2449
Definition: core_rpc_server_commands_defs.h:1528
std::string blobdata
Definition: blobdatatype.h:39
Definition: core_rpc_server_commands_defs.h:1118
CXA_THROW_INFO_T * info
Definition: stack_trace.cpp:90
uint32_t nonce
Definition: core_rpc_server_commands_defs.h:989
uint64_t target
Definition: core_rpc_server_commands_defs.h:657
std::string id_hash
Definition: core_rpc_server_commands_defs.h:1376
uint32_t threshold
Definition: core_rpc_server_commands_defs.h:1791
Definition: base.py:1
uint32_t rpc_credits_per_hash
Definition: core_rpc_server_commands_defs.h:1221
bool unlocked
Definition: core_rpc_server_commands_defs.h:1939
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:907
std::string paying_for
Definition: core_rpc_server_commands_defs.h:2379
uint64_t weight
Definition: core_rpc_server_commands_defs.h:1455
bool split
Definition: core_rpc_server_commands_defs.h:330
Definition: core_rpc_server_commands_defs.h:580
Definition: core_rpc_server_commands_defs.h:2351
Definition: core_rpc_server_commands_defs.h:1493
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1893
std::vector< std::string > key_images
Definition: core_rpc_server_commands_defs.h:415
uint32_t cookie
Definition: core_rpc_server_commands_defs.h:2331
uint64_t block_weight_median
Definition: core_rpc_server_commands_defs.h:677
Definition: core_rpc_server_commands_defs.h:1135
uint64_t grace_blocks
Definition: core_rpc_server_commands_defs.h:2049
Definition: core_rpc_server_commands_defs.h:1986
Definition: cryptonote_format_utils.h:43
uint32_t seconds
Definition: core_rpc_server_commands_defs.h:1817
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2526
uint32_t seconds
Definition: core_rpc_server_commands_defs.h:1899
Definition: core_rpc_server_commands_defs.h:950
std::string compressed_data
Definition: core_rpc_server_commands_defs.h:2265
Definition: core_rpc_server_commands_defs.h:2315
uint64_t size
Definition: core_rpc_server_commands_defs.h:2202
Definition: core_rpc_server_commands_defs.h:1335
std::vector< tx_backlog_entry > backlog
Definition: core_rpc_server_commands_defs.h:1472
uint64_t limit_down
Definition: core_rpc_server_commands_defs.h:1679
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1569
uint64_t fee_amount_top64
Definition: core_rpc_server_commands_defs.h:2030
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:1576
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:655
std::string rpc
Definition: core_rpc_server_commands_defs.h:2414
std::string prev_block
Definition: core_rpc_server_commands_defs.h:956
std::string host
Definition: core_rpc_server_commands_defs.h:1850
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:340
uint64_t height
Definition: core_rpc_server_commands_defs.h:1095
std::vector< block_complete_entry > blocks
Definition: core_rpc_server_commands_defs.h:231
entry()
Definition: core_rpc_server_commands_defs.h:1969
Definition: core_rpc_server_commands_defs.h:1746
uint64_t adjusted_time
Definition: core_rpc_server_commands_defs.h:678
uint32_t votes
Definition: core_rpc_server_commands_defs.h:1790
Definition: core_rpc_server_commands_defs.h:1395
std::string main_chain_parent_block
Definition: core_rpc_server_commands_defs.h:2091
Definition: core_rpc_server_commands_defs.h:148
Definition: core_rpc_server_commands_defs.h:2427
Definition: core_rpc_server_commands_defs.h:229
uint64_t id
Definition: core_rpc_server_commands_defs.h:1156
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1393
Definition: core_rpc_server_commands_defs.h:114
uint64_t block_weight
Definition: core_rpc_server_commands_defs.h:1002
std::vector< std::string > blocks
Definition: core_rpc_server_commands_defs.h:972
std::vector< uint64_t > indices
Definition: core_rpc_server_commands_defs.h:183
Definition: core_rpc_server_commands_defs.h:1638
std::string extra_nonce
Definition: core_rpc_server_commands_defs.h:891
Definition: blake256.h:36
Definition: core_rpc_server_commands_defs.h:640
Definition: core_rpc_server_commands_defs.h:2132
uint32_t speed
Definition: core_rpc_server_commands_defs.h:2201
std::vector< tx_info > transactions
Definition: core_rpc_server_commands_defs.h:1397
uint64_t limit_up
Definition: core_rpc_server_commands_defs.h:1678
uint64_t nonces_dupe
Definition: core_rpc_server_commands_defs.h:2459
int64_t limit_down
Definition: core_rpc_server_commands_defs.h:1708
Definition: core_rpc_server_commands_defs.h:1387
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2485
Definition: core_rpc_server_commands_defs.h:1560
Definition: core_rpc_server_commands_defs.h:138
std::string key
Definition: core_rpc_server_commands_defs.h:535
Definition: core_rpc_server_commands_defs.h:1811
Definition: core_rpc_server_commands_defs.h:1462
Definition: core_rpc_server_commands_defs.h:631
uint64_t max_count
Definition: core_rpc_server_commands_defs.h:1938
bool binary
Definition: core_rpc_server_commands_defs.h:2266
uint64_t seed_height
Definition: core_rpc_server_commands_defs.h:2328
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1536
Definition: core_rpc_server_commands_defs.h:323
uint32_t threads_count
Definition: core_rpc_server_commands_defs.h:802
Definition: core_rpc_server_commands_defs.h:886
Definition: core_rpc_server_commands_defs.h:251
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:434
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1075
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1250
static void prune(MDB_env *env0, MDB_env *env1)
Definition: blockchain_prune.cpp:246
std::string pow_hash
Definition: core_rpc_server_commands_defs.h:1004
uint64_t last_seen
Definition: core_rpc_server_commands_defs.h:1162
bool get_txid
Definition: core_rpc_server_commands_defs.h:479
blobdata blockhashing_blob
Definition: core_rpc_server_commands_defs.h:916
rpc::output_distribution_data data
Definition: core_rpc_server_commands_defs.h:2263
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1558
Definition: core_rpc_server_commands_defs.h:1719
uint64_t num_txes
Definition: core_rpc_server_commands_defs.h:1003
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:814
Definition: core_rpc_server_commands_defs.h:1268
bool mainnet
Definition: core_rpc_server_commands_defs.h:666
std::string txid
Definition: core_rpc_server_commands_defs.h:539
Definition: core_rpc_server_commands_defs.h:1237
std::vector< entry > histogram
Definition: core_rpc_server_commands_defs.h:1974
uint64_t height
Definition: core_rpc_server_commands_defs.h:1123
Definition: core_rpc_server_commands_defs.h:1290
uint64_t outgoing_connections_count
Definition: core_rpc_server_commands_defs.h:661
Definition: core_rpc_server_commands_defs.h:2082
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:812
uint64_t nonces_good
Definition: core_rpc_server_commands_defs.h:2456
Definition: core_rpc_server_commands_defs.h:562
bool invalid_input
Definition: core_rpc_server_commands_defs.h:586
Definition: core_rpc_server_commands_defs.h:1846
Definition: core_rpc_server_commands_defs.h:1572
Definition: core_rpc_server_commands_defs.h:2008
uint64_t start_time
Definition: core_rpc_server_commands_defs.h:679
uint64_t cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:671
Definition: core_rpc_server_commands_defs.h:1692
uint64_t time_in_pool
Definition: core_rpc_server_commands_defs.h:1457
Definition: core_rpc_server_commands_defs.h:1252
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:559
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:448
std::string client
Definition: core_rpc_server_commands_defs.h:2451
std::string categories
Definition: core_rpc_server_commands_defs.h:1314
bool overspend
Definition: core_rpc_server_commands_defs.h:589
uint64_t block_size_median
Definition: core_rpc_server_commands_defs.h:676
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2080
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2551
bool do_sanity_checks
Definition: core_rpc_server_commands_defs.h:568
bool get_txid
Definition: core_rpc_server_commands_defs.h:523
std::string host
Definition: core_rpc_server_commands_defs.h:1157
uint64_t length
Definition: core_rpc_server_commands_defs.h:2086
uint8_t bg_min_idle_seconds
Definition: core_rpc_server_commands_defs.h:807
POD_CLASS hash
Definition: hash.h:48
std::string bootstrap_daemon_address
Definition: core_rpc_server_commands_defs.h:682
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1088
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:742
uint32_t rate
Definition: core_rpc_server_commands_defs.h:2200
std::string client
Definition: core_rpc_server_commands_defs.h:2492
bool is_background_mining_enabled
Definition: core_rpc_server_commands_defs.h:805
std::vector< std::string > missed_tx
Definition: core_rpc_server_commands_defs.h:388
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1808
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:422
uint64_t earliest_height
Definition: core_rpc_server_commands_defs.h:1794
uint64_t to_height
Definition: core_rpc_server_commands_defs.h:2244
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2235
Definition: core_rpc_server_commands_defs.h:1453
Definition: core_rpc_server_commands_defs.h:798
Definition: core_rpc_server_commands_defs.h:518
Definition: core_rpc_server_commands_defs.h:2195
Definition: core_rpc_server_commands_defs.h:2178
int64_t delta_balance
Definition: core_rpc_server_commands_defs.h:2493
bool enabled
Definition: core_rpc_server_commands_defs.h:1788
bool do_not_relay
Definition: core_rpc_server_commands_defs.h:1350
bool prune
Definition: core_rpc_server_commands_defs.h:329
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1285
bool was_bootstrap_ever_used
Definition: core_rpc_server_commands_defs.h:684
Definition: core_rpc_server_commands_defs.h:2567
std::string prev_hash
Definition: core_rpc_server_commands_defs.h:988
uint16_t rpc_port
Definition: core_rpc_server_commands_defs.h:1220
std::vector< outkey > outs
Definition: core_rpc_server_commands_defs.h:508
Definition: core_rpc_server_commands_defs.h:1093
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1981
Definition: core_rpc_server_commands_defs.h:983
Definition: core_rpc_server_commands_defs.h:2366
uint64_t total_bytes_out
Definition: core_rpc_server_commands_defs.h:751
uint64_t height
Definition: core_rpc_server_commands_defs.h:2085
uint64_t credits
Definition: core_rpc_server_commands_defs.h:2505
std::string auto_uri
Definition: core_rpc_server_commands_defs.h:2137
uint32_t hashrate
Definition: core_rpc_server_commands_defs.h:2477
std::string command
Definition: core_rpc_server_commands_defs.h:2121
Definition: core_rpc_server_commands_defs.h:1409
std::string tx_json
Definition: core_rpc_server_commands_defs.h:1338
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:847
uint64_t last_update_time
Definition: core_rpc_server_commands_defs.h:2453
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1137
std::vector< entry > data
Definition: core_rpc_server_commands_defs.h:2429
uint32_t pruning_seed
Definition: core_rpc_server_commands_defs.h:2556
uint64_t seed_height
Definition: core_rpc_server_commands_defs.h:912
std::string wide_fee_amount
Definition: core_rpc_server_commands_defs.h:2029
Definition: core_rpc_server_commands_defs.h:2167
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1872
Definition: core_rpc_server_commands_defs.h:310
Definition: core_rpc_server_commands_defs.h:2045
std::string host
Definition: core_rpc_server_commands_defs.h:1815
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:654
std::string seed_hash
Definition: core_rpc_server_commands_defs.h:913
uint64_t height
Definition: core_rpc_server_commands_defs.h:2334
Definition: core_rpc_server_commands_defs.h:1834
Definition: core_rpc_server_commands_defs.h:1721
Definition: core_rpc_server_commands_defs.h:1668
uint32_t txs_total
Definition: core_rpc_server_commands_defs.h:1501
uint32_t out_peers
Definition: core_rpc_server_commands_defs.h:1724
std::list< connection_info > connections
Definition: core_rpc_server_commands_defs.h:1562
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2151
std::string as_hex
Definition: core_rpc_server_commands_defs.h:345
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:783
uint64_t total_packets_in
Definition: core_rpc_server_commands_defs.h:748
std::string client
Definition: core_rpc_server_commands_defs.h:116
bool too_big
Definition: core_rpc_server_commands_defs.h:588
std::list< crypto::hash > block_ids
Definition: core_rpc_server_commands_defs.h:167
uint64_t fee
Definition: core_rpc_server_commands_defs.h:2060
txpool_stats pool_stats
Definition: core_rpc_server_commands_defs.h:1540
blobdata blocktemplate_blob
Definition: core_rpc_server_commands_defs.h:915
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:629
bool kept_by_block
Definition: core_rpc_server_commands_defs.h:1344
Definition: core_rpc_server_commands_defs.h:2490
Definition: core_rpc_server_commands_defs.h:2412
Definition: core_rpc_server_commands_defs.h:190
bool binary
Definition: core_rpc_server_commands_defs.h:2246
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:307
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1655
Definition: core_rpc_server_commands_defs.h:1666
uint64_t amount
Definition: core_rpc_server_commands_defs.h:465
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2537
std::string tx_blob
Definition: core_rpc_server_commands_defs.h:1352
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:168
uint64_t target_height
Definition: core_rpc_server_commands_defs.h:2219
error
Tracks LMDB error codes.
Definition: error.h:44
uint64_t fee
Definition: core_rpc_server_commands_defs.h:1341
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:873
Definition: core_rpc_server_commands_defs.h:2117
bool relayed
Definition: core_rpc_server_commands_defs.h:1348
Definition: core_rpc_server_commands_defs.h:2542
uint32_t num_not_relayed
Definition: core_rpc_server_commands_defs.h:1504
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:934
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2410
bool compress
Definition: core_rpc_server_commands_defs.h:2247
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1332
std::string pow_algorithm
Definition: core_rpc_server_commands_defs.h:804
uint64_t diff
Definition: core_rpc_server_commands_defs.h:2332
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2364
#define true
Definition: stdbool.h:36
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2005
#define s(x, c)
Definition: aesb.c:47
bool bad_txs
Definition: core_rpc_server_commands_defs.h:2571
Definition: core_rpc_server_commands_defs.h:2515
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1056
Definition: core_rpc_server_commands_defs.h:1912
std::string last_failed_id_hash
Definition: core_rpc_server_commands_defs.h:1346
rapidjson::Document json
Definition: transport.cpp:49
uint32_t bytes_med
Definition: core_rpc_server_commands_defs.h:1498
std::string top_hash
Definition: core_rpc_server_commands_defs.h:127
uint64_t last_relayed_time
Definition: core_rpc_server_commands_defs.h:1349
uint64_t height
Definition: core_rpc_server_commands_defs.h:494
Definition: core_rpc_server_commands_defs.h:1676
Definition: core_rpc_server_commands_defs.h:2240
Definition: core_rpc_server_commands_defs.h:140
uint64_t height
Definition: core_rpc_server_commands_defs.h:991
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:995
Definition: core_rpc_server_commands_defs.h:2023
std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value, void >::type write_varint(OutputIt &&dest, T i)
writes a varint to a stream.
Definition: varint.h:69
peer(uint64_t id, const std::string &host, uint16_t port, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port, uint32_t rpc_credits_per_hash)
Definition: core_rpc_server_commands_defs.h:1170
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2436
std::vector< block_header_response > block_headers
Definition: core_rpc_server_commands_defs.h:1080
uint64_t start_time
Definition: core_rpc_server_commands_defs.h:747
uint8_t bg_idle_threshold
Definition: core_rpc_server_commands_defs.h:806
Definition: core_rpc_server_commands_defs.h:1885
txpool_stats()
Definition: core_rpc_server_commands_defs.h:1509
std::vector< uint64_t > amounts
Definition: core_rpc_server_commands_defs.h:2242
std::vector< T > decompress_integer_array(const std::string &s)
Definition: core_rpc_server_commands_defs.h:58
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1587
std::string view_key
Definition: core_rpc_server_commands_defs.h:298
Definition: core_rpc_server_commands_defs.h:101
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:320
uint64_t amount
Definition: core_rpc_server_commands_defs.h:1955
Definition: core_rpc_server_commands_defs.h:1589
uint32_t bytes_max
Definition: core_rpc_server_commands_defs.h:1497