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 5
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;
688  std::string version;
689  bool synchronized;
690 
691  BEGIN_KV_SERIALIZE_MAP()
692  KV_SERIALIZE_PARENT(rpc_access_response_base)
693  KV_SERIALIZE(height)
694  KV_SERIALIZE(target_height)
695  KV_SERIALIZE(difficulty)
696  KV_SERIALIZE(wide_difficulty)
697  KV_SERIALIZE(difficulty_top64)
698  KV_SERIALIZE(target)
699  KV_SERIALIZE(tx_count)
700  KV_SERIALIZE(tx_pool_size)
701  KV_SERIALIZE(alt_blocks_count)
702  KV_SERIALIZE(outgoing_connections_count)
703  KV_SERIALIZE(incoming_connections_count)
704  KV_SERIALIZE(rpc_connections_count)
705  KV_SERIALIZE(white_peerlist_size)
706  KV_SERIALIZE(grey_peerlist_size)
707  KV_SERIALIZE(mainnet)
708  KV_SERIALIZE(testnet)
709  KV_SERIALIZE(stagenet)
710  KV_SERIALIZE(nettype)
711  KV_SERIALIZE(top_block_hash)
712  KV_SERIALIZE(cumulative_difficulty)
713  KV_SERIALIZE(wide_cumulative_difficulty)
714  KV_SERIALIZE(cumulative_difficulty_top64)
715  KV_SERIALIZE(block_size_limit)
716  KV_SERIALIZE_OPT(block_weight_limit, (uint64_t)0)
717  KV_SERIALIZE(block_size_median)
718  KV_SERIALIZE_OPT(block_weight_median, (uint64_t)0)
719  KV_SERIALIZE(adjusted_time)
720  KV_SERIALIZE(start_time)
721  KV_SERIALIZE(free_space)
722  KV_SERIALIZE(offline)
723  KV_SERIALIZE(bootstrap_daemon_address)
724  KV_SERIALIZE(height_without_bootstrap)
725  KV_SERIALIZE(was_bootstrap_ever_used)
726  KV_SERIALIZE(database_size)
727  KV_SERIALIZE(update_available)
728  KV_SERIALIZE(busy_syncing)
729  KV_SERIALIZE(version)
730  KV_SERIALIZE(synchronized)
731  END_KV_SERIALIZE_MAP()
732  };
733  typedef epee::misc_utils::struct_init<response_t> response;
734  };
735 
736 
737  //-----------------------------------------------
739  {
741  {
742  BEGIN_KV_SERIALIZE_MAP()
743  KV_SERIALIZE_PARENT(rpc_request_base)
744  END_KV_SERIALIZE_MAP()
745  };
746  typedef epee::misc_utils::struct_init<request_t> request;
747 
748 
750  {
751  uint64_t start_time;
753  uint64_t total_bytes_in;
755  uint64_t total_bytes_out;
756 
757  BEGIN_KV_SERIALIZE_MAP()
758  KV_SERIALIZE_PARENT(rpc_response_base)
759  KV_SERIALIZE(start_time)
760  KV_SERIALIZE(total_packets_in)
761  KV_SERIALIZE(total_bytes_in)
762  KV_SERIALIZE(total_packets_out)
763  KV_SERIALIZE(total_bytes_out)
764  END_KV_SERIALIZE_MAP()
765  };
766  typedef epee::misc_utils::struct_init<response_t> response;
767  };
768 
769  //-----------------------------------------------
771  {
773  {
774  BEGIN_KV_SERIALIZE_MAP()
775  KV_SERIALIZE_PARENT(rpc_request_base)
776  END_KV_SERIALIZE_MAP()
777  };
778  typedef epee::misc_utils::struct_init<request_t> request;
779 
780 
782  {
783  BEGIN_KV_SERIALIZE_MAP()
784  KV_SERIALIZE_PARENT(rpc_response_base)
785  END_KV_SERIALIZE_MAP()
786  };
787  typedef epee::misc_utils::struct_init<response_t> response;
788  };
789 
790  //-----------------------------------------------
792  {
794  {
795  BEGIN_KV_SERIALIZE_MAP()
796  KV_SERIALIZE_PARENT(rpc_request_base)
797  END_KV_SERIALIZE_MAP()
798  };
799  typedef epee::misc_utils::struct_init<request_t> request;
800 
801 
803  {
804  bool active;
805  uint64_t speed;
806  uint32_t threads_count;
807  std::string address;
808  std::string pow_algorithm;
813  uint8_t bg_target;
814  uint32_t block_target;
815  uint64_t block_reward;
816  uint64_t difficulty;
817  std::string wide_difficulty;
819 
820  BEGIN_KV_SERIALIZE_MAP()
821  KV_SERIALIZE_PARENT(rpc_response_base)
822  KV_SERIALIZE(active)
823  KV_SERIALIZE(speed)
824  KV_SERIALIZE(threads_count)
825  KV_SERIALIZE(address)
826  KV_SERIALIZE(pow_algorithm)
827  KV_SERIALIZE(is_background_mining_enabled)
828  KV_SERIALIZE(bg_idle_threshold)
829  KV_SERIALIZE(bg_min_idle_seconds)
830  KV_SERIALIZE(bg_ignore_battery)
831  KV_SERIALIZE(bg_target)
832  KV_SERIALIZE(block_target)
833  KV_SERIALIZE(block_reward)
834  KV_SERIALIZE(difficulty)
835  KV_SERIALIZE(wide_difficulty)
836  KV_SERIALIZE(difficulty_top64)
837  END_KV_SERIALIZE_MAP()
838  };
839  typedef epee::misc_utils::struct_init<response_t> response;
840  };
841 
842  //-----------------------------------------------
844  {
846  {
847  BEGIN_KV_SERIALIZE_MAP()
848  KV_SERIALIZE_PARENT(rpc_request_base)
849  END_KV_SERIALIZE_MAP()
850  };
851  typedef epee::misc_utils::struct_init<request_t> request;
852 
853 
855  {
856  BEGIN_KV_SERIALIZE_MAP()
857  KV_SERIALIZE_PARENT(rpc_response_base)
858  END_KV_SERIALIZE_MAP()
859  };
860  typedef epee::misc_utils::struct_init<response_t> response;
861  };
862 
863  //
865  {
866  typedef std::list<std::string> request;
867 
869  {
870  uint64_t count;
871 
872  BEGIN_KV_SERIALIZE_MAP()
873  KV_SERIALIZE_PARENT(rpc_response_base)
874  KV_SERIALIZE(count)
875  END_KV_SERIALIZE_MAP()
876  };
877  typedef epee::misc_utils::struct_init<response_t> response;
878  };
879 
881  {
882  typedef std::vector<uint64_t> request;
883 
884  typedef std::string response;
885  };
886 
887 
889  {
891  {
892  uint64_t reserve_size; //max 255 bytes
893  std::string wallet_address;
894  std::string prev_block;
895  std::string extra_nonce;
896 
897  BEGIN_KV_SERIALIZE_MAP()
898  KV_SERIALIZE_PARENT(rpc_request_base)
899  KV_SERIALIZE(reserve_size)
900  KV_SERIALIZE(wallet_address)
901  KV_SERIALIZE(prev_block)
902  KV_SERIALIZE(extra_nonce)
903  END_KV_SERIALIZE_MAP()
904  };
905  typedef epee::misc_utils::struct_init<request_t> request;
906 
908  {
909  uint64_t difficulty;
910  std::string wide_difficulty;
912  uint64_t height;
913  uint64_t reserved_offset;
914  uint64_t expected_reward;
915  std::string prev_hash;
916  uint64_t seed_height;
917  std::string seed_hash;
918  std::string next_seed_hash;
921 
922  BEGIN_KV_SERIALIZE_MAP()
923  KV_SERIALIZE_PARENT(rpc_response_base)
924  KV_SERIALIZE(difficulty)
925  KV_SERIALIZE(wide_difficulty)
926  KV_SERIALIZE(difficulty_top64)
927  KV_SERIALIZE(height)
928  KV_SERIALIZE(reserved_offset)
929  KV_SERIALIZE(expected_reward)
930  KV_SERIALIZE(prev_hash)
931  KV_SERIALIZE(seed_height)
932  KV_SERIALIZE(blocktemplate_blob)
933  KV_SERIALIZE(blockhashing_blob)
934  KV_SERIALIZE(seed_hash)
935  KV_SERIALIZE(next_seed_hash)
936  END_KV_SERIALIZE_MAP()
937  };
938  typedef epee::misc_utils::struct_init<response_t> response;
939  };
940 
942  {
943  typedef std::vector<std::string> request;
944 
946  {
947  BEGIN_KV_SERIALIZE_MAP()
948  KV_SERIALIZE_PARENT(rpc_response_base)
949  END_KV_SERIALIZE_MAP()
950  };
951  typedef epee::misc_utils::struct_init<response_t> response;
952  };
953 
955  {
957  {
959  std::string wallet_address;
960  std::string prev_block;
961  uint32_t starting_nonce;
962 
963  BEGIN_KV_SERIALIZE_MAP()
964  KV_SERIALIZE_PARENT(rpc_request_base)
965  KV_SERIALIZE(amount_of_blocks)
966  KV_SERIALIZE(wallet_address)
967  KV_SERIALIZE(prev_block)
968  KV_SERIALIZE_OPT(starting_nonce, (uint32_t)0)
969  END_KV_SERIALIZE_MAP()
970  };
971  typedef epee::misc_utils::struct_init<request_t> request;
972 
974  {
975  uint64_t height;
976  std::vector<std::string> blocks;
977 
978  BEGIN_KV_SERIALIZE_MAP()
979  KV_SERIALIZE_PARENT(rpc_response_base)
980  KV_SERIALIZE(height)
981  KV_SERIALIZE(blocks)
982  END_KV_SERIALIZE_MAP()
983  };
984  typedef epee::misc_utils::struct_init<response_t> response;
985  };
986 
988  {
989  uint8_t major_version;
990  uint8_t minor_version;
991  uint64_t timestamp;
992  std::string prev_hash;
993  uint32_t nonce;
995  uint64_t height;
996  uint64_t depth;
997  std::string hash;
998  uint64_t difficulty;
999  std::string wide_difficulty;
1004  uint64_t reward;
1005  uint64_t block_size;
1006  uint64_t block_weight;
1007  uint64_t num_txes;
1008  std::string pow_hash;
1010  std::string miner_tx_hash;
1011 
1012  BEGIN_KV_SERIALIZE_MAP()
1013  KV_SERIALIZE(major_version)
1014  KV_SERIALIZE(minor_version)
1015  KV_SERIALIZE(timestamp)
1016  KV_SERIALIZE(prev_hash)
1017  KV_SERIALIZE(nonce)
1018  KV_SERIALIZE(orphan_status)
1019  KV_SERIALIZE(height)
1020  KV_SERIALIZE(depth)
1021  KV_SERIALIZE(hash)
1022  KV_SERIALIZE(difficulty)
1023  KV_SERIALIZE(wide_difficulty)
1024  KV_SERIALIZE(difficulty_top64)
1025  KV_SERIALIZE(cumulative_difficulty)
1026  KV_SERIALIZE(wide_cumulative_difficulty)
1027  KV_SERIALIZE(cumulative_difficulty_top64)
1028  KV_SERIALIZE(reward)
1029  KV_SERIALIZE(block_size)
1030  KV_SERIALIZE_OPT(block_weight, (uint64_t)0)
1031  KV_SERIALIZE(num_txes)
1032  KV_SERIALIZE(pow_hash)
1033  KV_SERIALIZE_OPT(long_term_weight, (uint64_t)0)
1034  KV_SERIALIZE(miner_tx_hash)
1035  END_KV_SERIALIZE_MAP()
1036  };
1037 
1039  {
1041  {
1043 
1044  BEGIN_KV_SERIALIZE_MAP()
1045  KV_SERIALIZE_PARENT(rpc_access_request_base)
1046  KV_SERIALIZE_OPT(fill_pow_hash, false);
1047  END_KV_SERIALIZE_MAP()
1048  };
1049  typedef epee::misc_utils::struct_init<request_t> request;
1050 
1052  {
1054 
1055  BEGIN_KV_SERIALIZE_MAP()
1056  KV_SERIALIZE_PARENT(rpc_access_response_base)
1057  KV_SERIALIZE(block_header)
1058  END_KV_SERIALIZE_MAP()
1059  };
1060  typedef epee::misc_utils::struct_init<response_t> response;
1061 
1062  };
1063 
1065  {
1067  {
1068  std::string hash;
1069  std::vector<std::string> hashes;
1071 
1072  BEGIN_KV_SERIALIZE_MAP()
1073  KV_SERIALIZE_PARENT(rpc_access_request_base)
1074  KV_SERIALIZE(hash)
1075  KV_SERIALIZE(hashes)
1076  KV_SERIALIZE_OPT(fill_pow_hash, false);
1077  END_KV_SERIALIZE_MAP()
1078  };
1079  typedef epee::misc_utils::struct_init<request_t> request;
1080 
1082  {
1084  std::vector<block_header_response> block_headers;
1085 
1086  BEGIN_KV_SERIALIZE_MAP()
1087  KV_SERIALIZE_PARENT(rpc_access_response_base)
1088  KV_SERIALIZE(block_header)
1089  KV_SERIALIZE(block_headers)
1090  END_KV_SERIALIZE_MAP()
1091  };
1092  typedef epee::misc_utils::struct_init<response_t> response;
1093  };
1094 
1096  {
1098  {
1099  uint64_t height;
1101 
1102  BEGIN_KV_SERIALIZE_MAP()
1103  KV_SERIALIZE_PARENT(rpc_access_request_base)
1104  KV_SERIALIZE(height)
1105  KV_SERIALIZE_OPT(fill_pow_hash, false);
1106  END_KV_SERIALIZE_MAP()
1107  };
1108  typedef epee::misc_utils::struct_init<request_t> request;
1109 
1111  {
1113 
1114  BEGIN_KV_SERIALIZE_MAP()
1115  KV_SERIALIZE_PARENT(rpc_access_response_base)
1116  KV_SERIALIZE(block_header)
1117  END_KV_SERIALIZE_MAP()
1118  };
1119  typedef epee::misc_utils::struct_init<response_t> response;
1120  };
1121 
1123  {
1125  {
1126  std::string hash;
1127  uint64_t height;
1129 
1130  BEGIN_KV_SERIALIZE_MAP()
1131  KV_SERIALIZE_PARENT(rpc_access_request_base)
1132  KV_SERIALIZE(hash)
1133  KV_SERIALIZE(height)
1134  KV_SERIALIZE_OPT(fill_pow_hash, false);
1135  END_KV_SERIALIZE_MAP()
1136  };
1137  typedef epee::misc_utils::struct_init<request_t> request;
1138 
1140  {
1142  std::string miner_tx_hash;
1143  std::vector<std::string> tx_hashes;
1144  std::string blob;
1145  std::string json;
1146 
1147  BEGIN_KV_SERIALIZE_MAP()
1148  KV_SERIALIZE_PARENT(rpc_access_response_base)
1149  KV_SERIALIZE(block_header)
1150  KV_SERIALIZE(miner_tx_hash)
1151  KV_SERIALIZE(tx_hashes)
1152  KV_SERIALIZE(blob)
1153  KV_SERIALIZE(json)
1154  END_KV_SERIALIZE_MAP()
1155  };
1156  typedef epee::misc_utils::struct_init<response_t> response;
1157  };
1158 
1159  struct peer {
1160  uint64_t id;
1161  std::string host;
1162  uint32_t ip;
1163  uint16_t port;
1164  uint16_t rpc_port;
1166  uint64_t last_seen;
1167  uint32_t pruning_seed;
1168 
1169  peer() = default;
1170 
1171  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)
1172  : 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)
1173  {}
1174  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)
1175  : 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)
1176  {}
1177  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)
1178  : 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)
1179  {}
1180 
1181  BEGIN_KV_SERIALIZE_MAP()
1182  KV_SERIALIZE(id)
1183  KV_SERIALIZE(host)
1184  KV_SERIALIZE(ip)
1185  KV_SERIALIZE(port)
1186  KV_SERIALIZE_OPT(rpc_port, (uint16_t)0)
1187  KV_SERIALIZE_OPT(rpc_credits_per_hash, (uint32_t)0)
1188  KV_SERIALIZE(last_seen)
1189  KV_SERIALIZE_OPT(pruning_seed, (uint32_t)0)
1190  END_KV_SERIALIZE_MAP()
1191  };
1192 
1194  {
1196  {
1199 
1200  BEGIN_KV_SERIALIZE_MAP()
1201  KV_SERIALIZE_PARENT(rpc_request_base)
1202  KV_SERIALIZE_OPT(public_only, true)
1203  KV_SERIALIZE_OPT(include_blocked, false)
1204  END_KV_SERIALIZE_MAP()
1205  };
1206  typedef epee::misc_utils::struct_init<request_t> request;
1207 
1209  {
1210  std::vector<peer> white_list;
1211  std::vector<peer> gray_list;
1212 
1213  BEGIN_KV_SERIALIZE_MAP()
1214  KV_SERIALIZE_PARENT(rpc_response_base)
1215  KV_SERIALIZE(white_list)
1216  KV_SERIALIZE(gray_list)
1217  END_KV_SERIALIZE_MAP()
1218  };
1219  typedef epee::misc_utils::struct_init<response_t> response;
1220  };
1221 
1223  {
1224  std::string host;
1225  uint64_t last_seen;
1226  uint16_t rpc_port;
1228 
1229  public_node(): last_seen(0), rpc_port(0), rpc_credits_per_hash(0) {}
1230 
1232  : host(peer.host), last_seen(peer.last_seen), rpc_port(peer.rpc_port), rpc_credits_per_hash(peer.rpc_credits_per_hash)
1233  {}
1234 
1235  BEGIN_KV_SERIALIZE_MAP()
1236  KV_SERIALIZE(host)
1237  KV_SERIALIZE(last_seen)
1238  KV_SERIALIZE(rpc_port)
1239  KV_SERIALIZE(rpc_credits_per_hash)
1240  END_KV_SERIALIZE_MAP()
1241  };
1242 
1244  {
1246  {
1247  bool gray;
1248  bool white;
1250 
1251  BEGIN_KV_SERIALIZE_MAP()
1252  KV_SERIALIZE_PARENT(rpc_request_base)
1253  KV_SERIALIZE_OPT(gray, false)
1254  KV_SERIALIZE_OPT(white, true)
1255  KV_SERIALIZE_OPT(include_blocked, false)
1256  END_KV_SERIALIZE_MAP()
1257  };
1258  typedef epee::misc_utils::struct_init<request_t> request;
1259 
1261  {
1262  std::vector<public_node> gray;
1263  std::vector<public_node> white;
1264 
1265  BEGIN_KV_SERIALIZE_MAP()
1266  KV_SERIALIZE_PARENT(rpc_response_base)
1267  KV_SERIALIZE(gray)
1268  KV_SERIALIZE(white)
1269  END_KV_SERIALIZE_MAP()
1270  };
1271  typedef epee::misc_utils::struct_init<response_t> response;
1272  };
1273 
1275  {
1277  {
1278  bool visible;
1279 
1280  BEGIN_KV_SERIALIZE_MAP()
1281  KV_SERIALIZE_PARENT(rpc_request_base)
1282  KV_SERIALIZE(visible)
1283  END_KV_SERIALIZE_MAP()
1284  };
1285  typedef epee::misc_utils::struct_init<request_t> request;
1286 
1288  {
1289  BEGIN_KV_SERIALIZE_MAP()
1290  KV_SERIALIZE_PARENT(rpc_response_base)
1291  END_KV_SERIALIZE_MAP()
1292  };
1293  typedef epee::misc_utils::struct_init<response_t> response;
1294  };
1295 
1297  {
1299  {
1300  int8_t level;
1301 
1302  BEGIN_KV_SERIALIZE_MAP()
1303  KV_SERIALIZE_PARENT(rpc_request_base)
1304  KV_SERIALIZE(level)
1305  END_KV_SERIALIZE_MAP()
1306  };
1307  typedef epee::misc_utils::struct_init<request_t> request;
1308 
1310  {
1311  BEGIN_KV_SERIALIZE_MAP()
1312  KV_SERIALIZE_PARENT(rpc_response_base)
1313  END_KV_SERIALIZE_MAP()
1314  };
1315  typedef epee::misc_utils::struct_init<response_t> response;
1316  };
1317 
1319  {
1321  {
1322  std::string categories;
1323 
1324  BEGIN_KV_SERIALIZE_MAP()
1325  KV_SERIALIZE_PARENT(rpc_request_base)
1326  KV_SERIALIZE(categories)
1327  END_KV_SERIALIZE_MAP()
1328  };
1329  typedef epee::misc_utils::struct_init<request_t> request;
1330 
1332  {
1333  std::string categories;
1334 
1335  BEGIN_KV_SERIALIZE_MAP()
1336  KV_SERIALIZE_PARENT(rpc_response_base)
1337  KV_SERIALIZE(categories)
1338  END_KV_SERIALIZE_MAP()
1339  };
1340  typedef epee::misc_utils::struct_init<response_t> response;
1341  };
1342 
1343  struct tx_info
1344  {
1345  std::string id_hash;
1346  std::string tx_json; // TODO - expose this data directly
1347  uint64_t blob_size;
1348  uint64_t weight;
1349  uint64_t fee;
1354  std::string last_failed_id_hash;
1355  uint64_t receive_time;
1356  bool relayed;
1360  std::string tx_blob;
1361 
1362  BEGIN_KV_SERIALIZE_MAP()
1363  KV_SERIALIZE(id_hash)
1364  KV_SERIALIZE(tx_json)
1365  KV_SERIALIZE(blob_size)
1366  KV_SERIALIZE_OPT(weight, (uint64_t)0)
1367  KV_SERIALIZE(fee)
1368  KV_SERIALIZE(max_used_block_id_hash)
1369  KV_SERIALIZE(max_used_block_height)
1370  KV_SERIALIZE(kept_by_block)
1371  KV_SERIALIZE(last_failed_height)
1372  KV_SERIALIZE(last_failed_id_hash)
1373  KV_SERIALIZE(receive_time)
1374  KV_SERIALIZE(relayed)
1375  KV_SERIALIZE(last_relayed_time)
1376  KV_SERIALIZE(do_not_relay)
1377  KV_SERIALIZE(double_spend_seen)
1378  KV_SERIALIZE(tx_blob)
1379  END_KV_SERIALIZE_MAP()
1380  };
1381 
1383  {
1384  std::string id_hash;
1385  std::vector<std::string> txs_hashes;
1386 
1387  BEGIN_KV_SERIALIZE_MAP()
1388  KV_SERIALIZE(id_hash)
1389  KV_SERIALIZE(txs_hashes)
1390  END_KV_SERIALIZE_MAP()
1391  };
1392 
1394  {
1396  {
1397  BEGIN_KV_SERIALIZE_MAP()
1398  KV_SERIALIZE_PARENT(rpc_access_request_base)
1399  END_KV_SERIALIZE_MAP()
1400  };
1401  typedef epee::misc_utils::struct_init<request_t> request;
1402 
1404  {
1405  std::vector<tx_info> transactions;
1406  std::vector<spent_key_image_info> spent_key_images;
1407 
1408  BEGIN_KV_SERIALIZE_MAP()
1409  KV_SERIALIZE_PARENT(rpc_access_response_base)
1410  KV_SERIALIZE(transactions)
1411  KV_SERIALIZE(spent_key_images)
1412  END_KV_SERIALIZE_MAP()
1413  };
1414  typedef epee::misc_utils::struct_init<response_t> response;
1415  };
1416 
1418  {
1420  {
1421  BEGIN_KV_SERIALIZE_MAP()
1422  KV_SERIALIZE_PARENT(rpc_access_request_base)
1423  END_KV_SERIALIZE_MAP()
1424  };
1425  typedef epee::misc_utils::struct_init<request_t> request;
1426 
1428  {
1429  std::vector<crypto::hash> tx_hashes;
1430 
1431  BEGIN_KV_SERIALIZE_MAP()
1432  KV_SERIALIZE_PARENT(rpc_access_response_base)
1433  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(tx_hashes)
1434  END_KV_SERIALIZE_MAP()
1435  };
1436  typedef epee::misc_utils::struct_init<response_t> response;
1437  };
1438 
1440  {
1442  {
1443  BEGIN_KV_SERIALIZE_MAP()
1444  KV_SERIALIZE_PARENT(rpc_access_request_base)
1445  END_KV_SERIALIZE_MAP()
1446  };
1447  typedef epee::misc_utils::struct_init<request_t> request;
1448 
1450  {
1451  std::vector<std::string> tx_hashes;
1452 
1453  BEGIN_KV_SERIALIZE_MAP()
1454  KV_SERIALIZE_PARENT(rpc_access_response_base)
1455  KV_SERIALIZE(tx_hashes)
1456  END_KV_SERIALIZE_MAP()
1457  };
1458  typedef epee::misc_utils::struct_init<response_t> response;
1459  };
1460 
1462  {
1463  uint64_t weight;
1464  uint64_t fee;
1465  uint64_t time_in_pool;
1466  };
1467 
1469  {
1471  {
1472  BEGIN_KV_SERIALIZE_MAP()
1473  KV_SERIALIZE_PARENT(rpc_access_request_base)
1474  END_KV_SERIALIZE_MAP()
1475  };
1476  typedef epee::misc_utils::struct_init<request_t> request;
1477 
1479  {
1480  std::vector<tx_backlog_entry> backlog;
1481 
1482  BEGIN_KV_SERIALIZE_MAP()
1483  KV_SERIALIZE_PARENT(rpc_access_response_base)
1484  KV_SERIALIZE_CONTAINER_POD_AS_BLOB(backlog)
1485  END_KV_SERIALIZE_MAP()
1486  };
1487  typedef epee::misc_utils::struct_init<response_t> response;
1488  };
1489 
1491  {
1492  uint32_t txs;
1493  uint64_t bytes;
1494 
1495  BEGIN_KV_SERIALIZE_MAP()
1496  KV_SERIALIZE(txs)
1497  KV_SERIALIZE(bytes)
1498  END_KV_SERIALIZE_MAP()
1499  };
1500 
1502  {
1503  uint64_t bytes_total;
1504  uint32_t bytes_min;
1505  uint32_t bytes_max;
1506  uint32_t bytes_med;
1507  uint64_t fee_total;
1508  uint64_t oldest;
1509  uint32_t txs_total;
1510  uint32_t num_failing;
1511  uint32_t num_10m;
1513  uint64_t histo_98pc;
1514  std::vector<txpool_histo> histo;
1516 
1517  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) {}
1518 
1519  BEGIN_KV_SERIALIZE_MAP()
1520  KV_SERIALIZE(bytes_total)
1521  KV_SERIALIZE(bytes_min)
1522  KV_SERIALIZE(bytes_max)
1523  KV_SERIALIZE(bytes_med)
1524  KV_SERIALIZE(fee_total)
1525  KV_SERIALIZE(oldest)
1526  KV_SERIALIZE(txs_total)
1527  KV_SERIALIZE(num_failing)
1528  KV_SERIALIZE(num_10m)
1529  KV_SERIALIZE(num_not_relayed)
1530  KV_SERIALIZE(histo_98pc)
1531  KV_SERIALIZE(histo)
1532  KV_SERIALIZE(num_double_spends)
1533  END_KV_SERIALIZE_MAP()
1534  };
1535 
1537  {
1539  {
1540  BEGIN_KV_SERIALIZE_MAP()
1541  KV_SERIALIZE_PARENT(rpc_access_request_base)
1542  END_KV_SERIALIZE_MAP()
1543  };
1544  typedef epee::misc_utils::struct_init<request_t> request;
1545 
1547  {
1549 
1550  BEGIN_KV_SERIALIZE_MAP()
1551  KV_SERIALIZE_PARENT(rpc_access_response_base)
1552  KV_SERIALIZE(pool_stats)
1553  END_KV_SERIALIZE_MAP()
1554  };
1555  typedef epee::misc_utils::struct_init<response_t> response;
1556  };
1557 
1559  {
1561  {
1562  BEGIN_KV_SERIALIZE_MAP()
1563  KV_SERIALIZE_PARENT(rpc_request_base)
1564  END_KV_SERIALIZE_MAP()
1565  };
1566  typedef epee::misc_utils::struct_init<request_t> request;
1567 
1569  {
1570  std::list<connection_info> connections;
1571 
1572  BEGIN_KV_SERIALIZE_MAP()
1573  KV_SERIALIZE_PARENT(rpc_response_base)
1574  KV_SERIALIZE(connections)
1575  END_KV_SERIALIZE_MAP()
1576  };
1577  typedef epee::misc_utils::struct_init<response_t> response;
1578  };
1579 
1581  {
1583  {
1584  uint64_t start_height;
1585  uint64_t end_height;
1587 
1588  BEGIN_KV_SERIALIZE_MAP()
1589  KV_SERIALIZE_PARENT(rpc_access_request_base)
1590  KV_SERIALIZE(start_height)
1591  KV_SERIALIZE(end_height)
1592  KV_SERIALIZE_OPT(fill_pow_hash, false);
1593  END_KV_SERIALIZE_MAP()
1594  };
1595  typedef epee::misc_utils::struct_init<request_t> request;
1596 
1598  {
1599  std::vector<block_header_response> headers;
1600 
1601  BEGIN_KV_SERIALIZE_MAP()
1602  KV_SERIALIZE_PARENT(rpc_access_response_base)
1603  KV_SERIALIZE(headers)
1604  END_KV_SERIALIZE_MAP()
1605  };
1606  typedef epee::misc_utils::struct_init<response_t> response;
1607  };
1608 
1610  {
1611  struct request_t
1612  {
1613  std::string address;
1614  std::string username;
1615  std::string password;
1616 
1617  BEGIN_KV_SERIALIZE_MAP()
1618  KV_SERIALIZE(address)
1619  KV_SERIALIZE(username)
1620  KV_SERIALIZE(password)
1621  END_KV_SERIALIZE_MAP()
1622  };
1623  typedef epee::misc_utils::struct_init<request_t> request;
1624 
1625  struct response_t
1626  {
1627  std::string status;
1628 
1629  BEGIN_KV_SERIALIZE_MAP()
1630  KV_SERIALIZE(status)
1631  END_KV_SERIALIZE_MAP()
1632  };
1633  typedef epee::misc_utils::struct_init<response_t> response;
1634  };
1635 
1637  {
1639  {
1640  BEGIN_KV_SERIALIZE_MAP()
1641  KV_SERIALIZE_PARENT(rpc_request_base)
1642  END_KV_SERIALIZE_MAP()
1643  };
1644  typedef epee::misc_utils::struct_init<request_t> request;
1645 
1647  {
1648  BEGIN_KV_SERIALIZE_MAP()
1649  KV_SERIALIZE_PARENT(rpc_response_base)
1650  END_KV_SERIALIZE_MAP()
1651  };
1652  typedef epee::misc_utils::struct_init<response_t> response;
1653  };
1654 
1656  {
1658  {
1659  BEGIN_KV_SERIALIZE_MAP()
1660  KV_SERIALIZE_PARENT(rpc_request_base)
1661  END_KV_SERIALIZE_MAP()
1662  };
1663  typedef epee::misc_utils::struct_init<request_t> request;
1664 
1666  {
1667  BEGIN_KV_SERIALIZE_MAP()
1668  KV_SERIALIZE_PARENT(rpc_response_base)
1669  END_KV_SERIALIZE_MAP()
1670  };
1671  typedef epee::misc_utils::struct_init<response_t> response;
1672  };
1673 
1675  {
1677  {
1678  BEGIN_KV_SERIALIZE_MAP()
1679  KV_SERIALIZE_PARENT(rpc_request_base)
1680  END_KV_SERIALIZE_MAP()
1681  };
1682  typedef epee::misc_utils::struct_init<request_t> request;
1683 
1685  {
1686  uint64_t limit_up;
1687  uint64_t limit_down;
1688 
1689  BEGIN_KV_SERIALIZE_MAP()
1690  KV_SERIALIZE_PARENT(rpc_response_base)
1691  KV_SERIALIZE(limit_up)
1692  KV_SERIALIZE(limit_down)
1693  END_KV_SERIALIZE_MAP()
1694  };
1695  typedef epee::misc_utils::struct_init<response_t> response;
1696  };
1697 
1699  {
1701  {
1702  int64_t limit_down; // all limits (for get and set) are kB/s
1703  int64_t limit_up;
1704 
1705  BEGIN_KV_SERIALIZE_MAP()
1706  KV_SERIALIZE_PARENT(rpc_request_base)
1707  KV_SERIALIZE(limit_down)
1708  KV_SERIALIZE(limit_up)
1709  END_KV_SERIALIZE_MAP()
1710  };
1711  typedef epee::misc_utils::struct_init<request_t> request;
1712 
1714  {
1715  int64_t limit_up;
1716  int64_t limit_down;
1717 
1718  BEGIN_KV_SERIALIZE_MAP()
1719  KV_SERIALIZE_PARENT(rpc_response_base)
1720  KV_SERIALIZE(limit_up)
1721  KV_SERIALIZE(limit_down)
1722  END_KV_SERIALIZE_MAP()
1723  };
1724  typedef epee::misc_utils::struct_init<response_t> response;
1725  };
1726 
1728  {
1730  {
1731  bool set;
1732  uint32_t out_peers;
1733 
1734  BEGIN_KV_SERIALIZE_MAP()
1735  KV_SERIALIZE_PARENT(rpc_request_base)
1736  KV_SERIALIZE_OPT(set, true)
1737  KV_SERIALIZE(out_peers)
1738  END_KV_SERIALIZE_MAP()
1739  };
1740  typedef epee::misc_utils::struct_init<request_t> request;
1741 
1743  {
1744  uint32_t out_peers;
1745 
1746  BEGIN_KV_SERIALIZE_MAP()
1747  KV_SERIALIZE_PARENT(rpc_response_base)
1748  KV_SERIALIZE(out_peers)
1749  END_KV_SERIALIZE_MAP()
1750  };
1751  typedef epee::misc_utils::struct_init<response_t> response;
1752  };
1753 
1755  {
1757  {
1758  bool set;
1759  uint32_t in_peers;
1760  BEGIN_KV_SERIALIZE_MAP()
1761  KV_SERIALIZE_PARENT(rpc_request_base)
1762  KV_SERIALIZE_OPT(set, true)
1763  KV_SERIALIZE(in_peers)
1764  END_KV_SERIALIZE_MAP()
1765  };
1766  typedef epee::misc_utils::struct_init<request_t> request;
1767 
1769  {
1770  uint32_t in_peers;
1771 
1772  BEGIN_KV_SERIALIZE_MAP()
1773  KV_SERIALIZE_PARENT(rpc_response_base)
1774  KV_SERIALIZE(in_peers)
1775  END_KV_SERIALIZE_MAP()
1776  };
1777  typedef epee::misc_utils::struct_init<response_t> response;
1778  };
1779 
1781  {
1783  {
1784  uint8_t version;
1785 
1786  BEGIN_KV_SERIALIZE_MAP()
1787  KV_SERIALIZE_PARENT(rpc_access_request_base)
1788  KV_SERIALIZE(version)
1789  END_KV_SERIALIZE_MAP()
1790  };
1791  typedef epee::misc_utils::struct_init<request_t> request;
1792 
1794  {
1795  uint8_t version;
1796  bool enabled;
1797  uint32_t window;
1798  uint32_t votes;
1799  uint32_t threshold;
1800  uint8_t voting;
1801  uint32_t state;
1803 
1804  BEGIN_KV_SERIALIZE_MAP()
1805  KV_SERIALIZE_PARENT(rpc_access_response_base)
1806  KV_SERIALIZE(version)
1807  KV_SERIALIZE(enabled)
1808  KV_SERIALIZE(window)
1809  KV_SERIALIZE(votes)
1810  KV_SERIALIZE(threshold)
1811  KV_SERIALIZE(voting)
1812  KV_SERIALIZE(state)
1813  KV_SERIALIZE(earliest_height)
1814  END_KV_SERIALIZE_MAP()
1815  };
1816  typedef epee::misc_utils::struct_init<response_t> response;
1817  };
1818 
1820  {
1821  struct ban
1822  {
1823  std::string host;
1824  uint32_t ip;
1825  uint32_t seconds;
1826 
1827  BEGIN_KV_SERIALIZE_MAP()
1828  KV_SERIALIZE(host)
1829  KV_SERIALIZE(ip)
1830  KV_SERIALIZE(seconds)
1831  END_KV_SERIALIZE_MAP()
1832  };
1833 
1835  {
1836  BEGIN_KV_SERIALIZE_MAP()
1837  KV_SERIALIZE_PARENT(rpc_request_base)
1838  END_KV_SERIALIZE_MAP()
1839  };
1840  typedef epee::misc_utils::struct_init<request_t> request;
1841 
1843  {
1844  std::vector<ban> bans;
1845 
1846  BEGIN_KV_SERIALIZE_MAP()
1847  KV_SERIALIZE_PARENT(rpc_response_base)
1848  KV_SERIALIZE(bans)
1849  END_KV_SERIALIZE_MAP()
1850  };
1851  typedef epee::misc_utils::struct_init<response_t> response;
1852  };
1853 
1855  {
1856  struct ban
1857  {
1858  std::string host;
1859  uint32_t ip;
1860  bool ban;
1861  uint32_t seconds;
1862 
1863  BEGIN_KV_SERIALIZE_MAP()
1864  KV_SERIALIZE(host)
1865  KV_SERIALIZE(ip)
1866  KV_SERIALIZE(ban)
1867  KV_SERIALIZE(seconds)
1868  END_KV_SERIALIZE_MAP()
1869  };
1870 
1872  {
1873  std::vector<ban> bans;
1874 
1875  BEGIN_KV_SERIALIZE_MAP()
1876  KV_SERIALIZE_PARENT(rpc_request_base)
1877  KV_SERIALIZE(bans)
1878  END_KV_SERIALIZE_MAP()
1879  };
1880  typedef epee::misc_utils::struct_init<request_t> request;
1881 
1883  {
1884  BEGIN_KV_SERIALIZE_MAP()
1885  KV_SERIALIZE_PARENT(rpc_response_base)
1886  END_KV_SERIALIZE_MAP()
1887  };
1888  typedef epee::misc_utils::struct_init<response_t> response;
1889  };
1890 
1892  {
1893  struct request_t
1894  {
1895  std::string address;
1896 
1897  BEGIN_KV_SERIALIZE_MAP()
1898  KV_SERIALIZE(address)
1899  END_KV_SERIALIZE_MAP()
1900  };
1901  typedef epee::misc_utils::struct_init<request_t> request;
1902 
1903  struct response_t
1904  {
1905  std::string status;
1906  bool banned;
1907  uint32_t seconds;
1908 
1909  BEGIN_KV_SERIALIZE_MAP()
1910  KV_SERIALIZE(status)
1911  KV_SERIALIZE(banned)
1912  KV_SERIALIZE(seconds)
1913  END_KV_SERIALIZE_MAP()
1914  };
1915  typedef epee::misc_utils::struct_init<response_t> response;
1916  };
1917 
1919  {
1921  {
1922  std::vector<std::string> txids;
1923 
1924  BEGIN_KV_SERIALIZE_MAP()
1925  KV_SERIALIZE_PARENT(rpc_request_base)
1926  KV_SERIALIZE(txids)
1927  END_KV_SERIALIZE_MAP()
1928  };
1929  typedef epee::misc_utils::struct_init<request_t> request;
1930 
1932  {
1933  BEGIN_KV_SERIALIZE_MAP()
1934  KV_SERIALIZE_PARENT(rpc_response_base)
1935  END_KV_SERIALIZE_MAP()
1936  };
1937  typedef epee::misc_utils::struct_init<response_t> response;
1938  };
1939 
1941  {
1943  {
1944  std::vector<uint64_t> amounts;
1945  uint64_t min_count;
1946  uint64_t max_count;
1947  bool unlocked;
1948  uint64_t recent_cutoff;
1949 
1950  BEGIN_KV_SERIALIZE_MAP()
1951  KV_SERIALIZE_PARENT(rpc_access_request_base);
1952  KV_SERIALIZE(amounts);
1953  KV_SERIALIZE(min_count);
1954  KV_SERIALIZE(max_count);
1955  KV_SERIALIZE(unlocked);
1956  KV_SERIALIZE(recent_cutoff);
1957  END_KV_SERIALIZE_MAP()
1958  };
1959  typedef epee::misc_utils::struct_init<request_t> request;
1960 
1961  struct entry
1962  {
1963  uint64_t amount;
1967 
1968  BEGIN_KV_SERIALIZE_MAP()
1969  KV_SERIALIZE(amount);
1970  KV_SERIALIZE(total_instances);
1971  KV_SERIALIZE(unlocked_instances);
1972  KV_SERIALIZE(recent_instances);
1973  END_KV_SERIALIZE_MAP()
1974 
1975  entry(uint64_t amount, uint64_t total_instances, uint64_t unlocked_instances, uint64_t recent_instances):
1976  amount(amount), total_instances(total_instances), unlocked_instances(unlocked_instances), recent_instances(recent_instances) {}
1977  entry() {}
1978  };
1979 
1981  {
1982  std::vector<entry> histogram;
1983 
1984  BEGIN_KV_SERIALIZE_MAP()
1985  KV_SERIALIZE_PARENT(rpc_access_response_base)
1986  KV_SERIALIZE(histogram)
1987  END_KV_SERIALIZE_MAP()
1988  };
1989  typedef epee::misc_utils::struct_init<response_t> response;
1990  };
1991 
1993  {
1995  {
1996  BEGIN_KV_SERIALIZE_MAP()
1997  KV_SERIALIZE_PARENT(rpc_request_base)
1998  END_KV_SERIALIZE_MAP()
1999  };
2000  typedef epee::misc_utils::struct_init<request_t> request;
2001 
2003  {
2004  uint32_t version;
2005  bool release;
2006 
2007  BEGIN_KV_SERIALIZE_MAP()
2008  KV_SERIALIZE_PARENT(rpc_response_base)
2009  KV_SERIALIZE(version)
2010  KV_SERIALIZE(release)
2011  END_KV_SERIALIZE_MAP()
2012  };
2013  typedef epee::misc_utils::struct_init<response_t> response;
2014  };
2015 
2017  {
2019  {
2020  uint64_t height;
2021  uint64_t count;
2022 
2023  BEGIN_KV_SERIALIZE_MAP()
2024  KV_SERIALIZE_PARENT(rpc_access_request_base);
2025  KV_SERIALIZE(height);
2026  KV_SERIALIZE(count);
2027  END_KV_SERIALIZE_MAP()
2028  };
2029  typedef epee::misc_utils::struct_init<request_t> request;
2030 
2032  {
2036  uint64_t fee_amount;
2037  std::string wide_fee_amount;
2039 
2040  BEGIN_KV_SERIALIZE_MAP()
2041  KV_SERIALIZE_PARENT(rpc_access_response_base)
2042  KV_SERIALIZE(emission_amount)
2043  KV_SERIALIZE(wide_emission_amount)
2044  KV_SERIALIZE(emission_amount_top64)
2045  KV_SERIALIZE(fee_amount)
2046  KV_SERIALIZE(wide_fee_amount)
2047  KV_SERIALIZE(fee_amount_top64)
2048  END_KV_SERIALIZE_MAP()
2049  };
2050  typedef epee::misc_utils::struct_init<response_t> response;
2051  };
2052 
2054  {
2056  {
2057  uint64_t grace_blocks;
2058 
2059  BEGIN_KV_SERIALIZE_MAP()
2060  KV_SERIALIZE_PARENT(rpc_access_request_base)
2061  KV_SERIALIZE(grace_blocks)
2062  END_KV_SERIALIZE_MAP()
2063  };
2064  typedef epee::misc_utils::struct_init<request_t> request;
2065 
2067  {
2068  uint64_t fee;
2070 
2071  BEGIN_KV_SERIALIZE_MAP()
2072  KV_SERIALIZE_PARENT(rpc_access_response_base)
2073  KV_SERIALIZE(fee)
2074  KV_SERIALIZE_OPT(quantization_mask, (uint64_t)1)
2075  END_KV_SERIALIZE_MAP()
2076  };
2077  typedef epee::misc_utils::struct_init<response_t> response;
2078  };
2079 
2081  {
2083  {
2084  BEGIN_KV_SERIALIZE_MAP()
2085  KV_SERIALIZE_PARENT(rpc_request_base)
2086  END_KV_SERIALIZE_MAP()
2087  };
2088  typedef epee::misc_utils::struct_init<request_t> request;
2089 
2090  struct chain_info
2091  {
2092  std::string block_hash;
2093  uint64_t height;
2094  uint64_t length;
2095  uint64_t difficulty;
2096  std::string wide_difficulty;
2098  std::vector<std::string> block_hashes;
2100 
2101  BEGIN_KV_SERIALIZE_MAP()
2102  KV_SERIALIZE(block_hash)
2103  KV_SERIALIZE(height)
2104  KV_SERIALIZE(length)
2105  KV_SERIALIZE(difficulty)
2106  KV_SERIALIZE(wide_difficulty)
2107  KV_SERIALIZE(difficulty_top64)
2108  KV_SERIALIZE(block_hashes)
2109  KV_SERIALIZE(main_chain_parent_block)
2110  END_KV_SERIALIZE_MAP()
2111  };
2112 
2114  {
2115  std::vector<chain_info> chains;
2116 
2117  BEGIN_KV_SERIALIZE_MAP()
2118  KV_SERIALIZE_PARENT(rpc_response_base)
2119  KV_SERIALIZE(chains)
2120  END_KV_SERIALIZE_MAP()
2121  };
2122  typedef epee::misc_utils::struct_init<response_t> response;
2123  };
2124 
2126  {
2128  {
2129  std::string command;
2130  std::string path;
2131 
2132  BEGIN_KV_SERIALIZE_MAP()
2133  KV_SERIALIZE_PARENT(rpc_request_base)
2134  KV_SERIALIZE(command)
2135  KV_SERIALIZE(path)
2136  END_KV_SERIALIZE_MAP()
2137  };
2138  typedef epee::misc_utils::struct_init<request_t> request;
2139 
2141  {
2142  bool update;
2143  std::string version;
2144  std::string user_uri;
2145  std::string auto_uri;
2146  std::string hash;
2147  std::string path;
2148 
2149  BEGIN_KV_SERIALIZE_MAP()
2150  KV_SERIALIZE_PARENT(rpc_response_base)
2151  KV_SERIALIZE(update)
2152  KV_SERIALIZE(version)
2153  KV_SERIALIZE(user_uri)
2154  KV_SERIALIZE(auto_uri)
2155  KV_SERIALIZE(hash)
2156  KV_SERIALIZE(path)
2157  END_KV_SERIALIZE_MAP()
2158  };
2159  typedef epee::misc_utils::struct_init<response_t> response;
2160  };
2161 
2163  {
2165  {
2166  std::vector<std::string> txids;
2167 
2168  BEGIN_KV_SERIALIZE_MAP()
2169  KV_SERIALIZE_PARENT(rpc_access_request_base)
2170  KV_SERIALIZE(txids)
2171  END_KV_SERIALIZE_MAP()
2172  };
2173  typedef epee::misc_utils::struct_init<request_t> request;
2174 
2176  {
2177  BEGIN_KV_SERIALIZE_MAP()
2178  KV_SERIALIZE_PARENT(rpc_access_response_base)
2179  END_KV_SERIALIZE_MAP()
2180  };
2181  typedef epee::misc_utils::struct_init<response_t> response;
2182  };
2183 
2185  {
2187  {
2188  BEGIN_KV_SERIALIZE_MAP()
2189  KV_SERIALIZE_PARENT(rpc_access_request_base)
2190  END_KV_SERIALIZE_MAP()
2191  };
2192  typedef epee::misc_utils::struct_init<request_t> request;
2193 
2194  struct peer
2195  {
2197 
2198  BEGIN_KV_SERIALIZE_MAP()
2199  KV_SERIALIZE(info)
2200  END_KV_SERIALIZE_MAP()
2201  };
2202 
2203  struct span
2204  {
2206  uint64_t nblocks;
2207  std::string connection_id;
2208  uint32_t rate;
2209  uint32_t speed;
2210  uint64_t size;
2211  std::string remote_address;
2212 
2213  BEGIN_KV_SERIALIZE_MAP()
2214  KV_SERIALIZE(start_block_height)
2215  KV_SERIALIZE(nblocks)
2216  KV_SERIALIZE(connection_id)
2217  KV_SERIALIZE(rate)
2218  KV_SERIALIZE(speed)
2219  KV_SERIALIZE(size)
2220  KV_SERIALIZE(remote_address)
2221  END_KV_SERIALIZE_MAP()
2222  };
2223 
2225  {
2226  uint64_t height;
2227  uint64_t target_height;
2229  std::list<peer> peers;
2230  std::list<span> spans;
2231  std::string overview;
2232 
2233  BEGIN_KV_SERIALIZE_MAP()
2234  KV_SERIALIZE_PARENT(rpc_access_response_base)
2235  KV_SERIALIZE(height)
2236  KV_SERIALIZE(target_height)
2237  KV_SERIALIZE(next_needed_pruning_seed)
2238  KV_SERIALIZE(peers)
2239  KV_SERIALIZE(spans)
2240  KV_SERIALIZE(overview)
2241  END_KV_SERIALIZE_MAP()
2242  };
2243  typedef epee::misc_utils::struct_init<response_t> response;
2244  };
2245 
2247  {
2249  {
2250  std::vector<uint64_t> amounts;
2251  uint64_t from_height;
2252  uint64_t to_height;
2254  bool binary;
2255  bool compress;
2256 
2257  BEGIN_KV_SERIALIZE_MAP()
2258  KV_SERIALIZE_PARENT(rpc_access_request_base)
2259  KV_SERIALIZE(amounts)
2260  KV_SERIALIZE_OPT(from_height, (uint64_t)0)
2261  KV_SERIALIZE_OPT(to_height, (uint64_t)0)
2262  KV_SERIALIZE_OPT(cumulative, false)
2263  KV_SERIALIZE_OPT(binary, true)
2264  KV_SERIALIZE_OPT(compress, false)
2265  END_KV_SERIALIZE_MAP()
2266  };
2267  typedef epee::misc_utils::struct_init<request_t> request;
2268 
2270  {
2272  uint64_t amount;
2273  std::string compressed_data;
2274  bool binary;
2275  bool compress;
2276 
2277  BEGIN_KV_SERIALIZE_MAP()
2278  KV_SERIALIZE(amount)
2279  KV_SERIALIZE_N(data.start_height, "start_height")
2280  KV_SERIALIZE(binary)
2281  KV_SERIALIZE(compress)
2282  if (this_ref.binary)
2283  {
2284  if (is_store)
2285  {
2286  if (this_ref.compress)
2287  {
2288  const_cast<std::string&>(this_ref.compressed_data) = compress_integer_array(this_ref.data.distribution);
2289  KV_SERIALIZE(compressed_data)
2290  }
2291  else
2292  KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(data.distribution, "distribution")
2293  }
2294  else
2295  {
2296  if (this_ref.compress)
2297  {
2298  KV_SERIALIZE(compressed_data)
2299  const_cast<std::vector<uint64_t>&>(this_ref.data.distribution) = decompress_integer_array<uint64_t>(this_ref.compressed_data);
2300  }
2301  else
2302  KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(data.distribution, "distribution")
2303  }
2304  }
2305  else
2306  KV_SERIALIZE_N(data.distribution, "distribution")
2307  KV_SERIALIZE_N(data.base, "base")
2308  END_KV_SERIALIZE_MAP()
2309  };
2310 
2312  {
2313  std::vector<distribution> distributions;
2314 
2315  BEGIN_KV_SERIALIZE_MAP()
2316  KV_SERIALIZE_PARENT(rpc_access_response_base)
2317  KV_SERIALIZE(distributions)
2318  END_KV_SERIALIZE_MAP()
2319  };
2320  typedef epee::misc_utils::struct_init<response_t> response;
2321  };
2322 
2324  {
2326  {
2327  BEGIN_KV_SERIALIZE_MAP()
2328  KV_SERIALIZE_PARENT(rpc_access_request_base)
2329  END_KV_SERIALIZE_MAP()
2330  };
2331  typedef epee::misc_utils::struct_init<request_t> request;
2332 
2334  {
2335  std::string hashing_blob;
2336  uint64_t seed_height;
2337  std::string seed_hash;
2338  std::string next_seed_hash;
2339  uint32_t cookie;
2340  uint64_t diff;
2342  uint64_t height;
2343 
2344  BEGIN_KV_SERIALIZE_MAP()
2345  KV_SERIALIZE_PARENT(rpc_access_response_base)
2346  KV_SERIALIZE(hashing_blob)
2347  KV_SERIALIZE(seed_height)
2348  KV_SERIALIZE(seed_hash)
2349  KV_SERIALIZE(next_seed_hash)
2350  KV_SERIALIZE(cookie)
2351  KV_SERIALIZE(diff)
2352  KV_SERIALIZE(credits_per_hash_found)
2353  KV_SERIALIZE(height)
2354  END_KV_SERIALIZE_MAP()
2355  };
2356  typedef epee::misc_utils::struct_init<response_t> response;
2357  };
2358 
2360  {
2362  {
2363  uint32_t nonce;
2364  uint32_t cookie;
2365 
2366  BEGIN_KV_SERIALIZE_MAP()
2367  KV_SERIALIZE_PARENT(rpc_access_request_base)
2368  KV_SERIALIZE(nonce)
2369  KV_SERIALIZE(cookie)
2370  END_KV_SERIALIZE_MAP()
2371  };
2372  typedef epee::misc_utils::struct_init<request_t> request;
2373 
2375  {
2376  BEGIN_KV_SERIALIZE_MAP()
2377  KV_SERIALIZE_PARENT(rpc_access_response_base)
2378  END_KV_SERIALIZE_MAP()
2379  };
2380  typedef epee::misc_utils::struct_init<response_t> response;
2381  };
2382 
2384  {
2386  {
2387  std::string paying_for;
2388  uint64_t payment;
2389 
2390  BEGIN_KV_SERIALIZE_MAP()
2391  KV_SERIALIZE_PARENT(rpc_access_request_base)
2392  KV_SERIALIZE(paying_for)
2393  KV_SERIALIZE(payment)
2394  END_KV_SERIALIZE_MAP()
2395  };
2396  typedef epee::misc_utils::struct_init<request_t> request;
2397 
2399  {
2400  BEGIN_KV_SERIALIZE_MAP()
2401  KV_SERIALIZE_PARENT(rpc_access_response_base)
2402  END_KV_SERIALIZE_MAP()
2403  };
2404  typedef epee::misc_utils::struct_init<response_t> response;
2405  };
2406 
2408  {
2410  {
2411  bool clear;
2412 
2413  BEGIN_KV_SERIALIZE_MAP()
2414  KV_SERIALIZE_PARENT(rpc_request_base)
2415  KV_SERIALIZE(clear)
2416  END_KV_SERIALIZE_MAP()
2417  };
2418  typedef epee::misc_utils::struct_init<request_t> request;
2419 
2420  struct entry
2421  {
2422  std::string rpc;
2423  uint64_t count;
2424  uint64_t time;
2425  uint64_t credits;
2426 
2427  BEGIN_KV_SERIALIZE_MAP()
2428  KV_SERIALIZE(rpc)
2429  KV_SERIALIZE(count)
2430  KV_SERIALIZE(time)
2431  KV_SERIALIZE(credits)
2432  END_KV_SERIALIZE_MAP()
2433  };
2434 
2436  {
2437  std::vector<entry> data;
2438 
2439  BEGIN_KV_SERIALIZE_MAP()
2440  KV_SERIALIZE_PARENT(rpc_response_base)
2441  KV_SERIALIZE(data)
2442  END_KV_SERIALIZE_MAP()
2443  };
2444  typedef epee::misc_utils::struct_init<response_t> response;
2445  };
2446 
2448  {
2450  {
2451  BEGIN_KV_SERIALIZE_MAP()
2452  KV_SERIALIZE_PARENT(rpc_request_base)
2453  END_KV_SERIALIZE_MAP()
2454  };
2455  typedef epee::misc_utils::struct_init<request_t> request;
2456 
2457  struct entry
2458  {
2459  std::string client;
2460  uint64_t balance;
2462  uint64_t credits_total;
2463  uint64_t credits_used;
2464  uint64_t nonces_good;
2465  uint64_t nonces_stale;
2466  uint64_t nonces_bad;
2467  uint64_t nonces_dupe;
2468 
2469  BEGIN_KV_SERIALIZE_MAP()
2470  KV_SERIALIZE(client)
2471  KV_SERIALIZE(balance)
2472  KV_SERIALIZE(last_update_time)
2473  KV_SERIALIZE(credits_total)
2474  KV_SERIALIZE(credits_used)
2475  KV_SERIALIZE(nonces_good)
2476  KV_SERIALIZE(nonces_stale)
2477  KV_SERIALIZE(nonces_bad)
2478  KV_SERIALIZE(nonces_dupe)
2479  END_KV_SERIALIZE_MAP()
2480  };
2481 
2483  {
2484  std::list<entry> entries;
2485  uint32_t hashrate;
2486 
2487  BEGIN_KV_SERIALIZE_MAP()
2488  KV_SERIALIZE_PARENT(rpc_response_base)
2489  KV_SERIALIZE(entries)
2490  KV_SERIALIZE(hashrate)
2491  END_KV_SERIALIZE_MAP()
2492  };
2493  typedef epee::misc_utils::struct_init<response_t> response;
2494  };
2495 
2497  {
2499  {
2500  std::string client;
2501  int64_t delta_balance;
2502 
2503  BEGIN_KV_SERIALIZE_MAP()
2504  KV_SERIALIZE_PARENT(rpc_request_base)
2505  KV_SERIALIZE(client)
2506  KV_SERIALIZE_OPT(delta_balance, (int64_t)0)
2507  END_KV_SERIALIZE_MAP()
2508  };
2509  typedef epee::misc_utils::struct_init<request_t> request;
2510 
2512  {
2513  uint64_t credits;
2514 
2515  BEGIN_KV_SERIALIZE_MAP()
2516  KV_SERIALIZE_PARENT(rpc_response_base)
2517  KV_SERIALIZE(credits)
2518  END_KV_SERIALIZE_MAP()
2519  };
2520  typedef epee::misc_utils::struct_init<response_t> response;
2521  };
2522 
2524  {
2526  {
2527  uint64_t nblocks;
2528 
2529  BEGIN_KV_SERIALIZE_MAP()
2530  KV_SERIALIZE_PARENT(rpc_request_base)
2531  KV_SERIALIZE(nblocks)
2532  END_KV_SERIALIZE_MAP()
2533  };
2534  typedef epee::misc_utils::struct_init<request_t> request;
2535 
2537  {
2538  uint64_t height;
2539 
2540  BEGIN_KV_SERIALIZE_MAP()
2541  KV_SERIALIZE_PARENT(rpc_response_base)
2542  KV_SERIALIZE(height)
2543  END_KV_SERIALIZE_MAP()
2544  };
2545  typedef epee::misc_utils::struct_init<response_t> response;
2546  };
2547 
2549  {
2551  {
2552  bool check;
2553 
2554  BEGIN_KV_SERIALIZE_MAP()
2555  KV_SERIALIZE_PARENT(rpc_request_base)
2556  KV_SERIALIZE_OPT(check, false)
2557  END_KV_SERIALIZE_MAP()
2558  };
2559  typedef epee::misc_utils::struct_init<request_t> request;
2560 
2562  {
2563  bool pruned;
2564  uint32_t pruning_seed;
2565 
2566  BEGIN_KV_SERIALIZE_MAP()
2567  KV_SERIALIZE_PARENT(rpc_response_base)
2568  KV_SERIALIZE(pruned)
2569  KV_SERIALIZE(pruning_seed)
2570  END_KV_SERIALIZE_MAP()
2571  };
2572  typedef epee::misc_utils::struct_init<response_t> response;
2573  };
2574 
2576  {
2578  {
2579  bool bad_txs;
2581 
2582  BEGIN_KV_SERIALIZE_MAP()
2583  KV_SERIALIZE_PARENT(rpc_request_base)
2584  KV_SERIALIZE_OPT(bad_txs, false)
2585  KV_SERIALIZE_OPT(bad_blocks, false)
2586  END_KV_SERIALIZE_MAP()
2587  };
2588  typedef epee::misc_utils::struct_init<request_t> request;
2589 
2591  {
2592  BEGIN_KV_SERIALIZE_MAP()
2593  KV_SERIALIZE_PARENT(rpc_response_base)
2594  END_KV_SERIALIZE_MAP()
2595  };
2596  typedef epee::misc_utils::struct_init<response_t> response;
2597  };
2598 
2599 }
#define s(x, c)
Definition: aesb.c:47
static void prune(MDB_env *env0, MDB_env *env1)
Definition: blockchain_prune.cpp:246
const uint32_t T[512]
Definition: groestl_tables.h:36
std::vector< T > decompress_integer_array(const std::string &s)
Definition: core_rpc_server_commands_defs.h:58
std::string compress_integer_array(const std::vector< T > &v)
Definition: core_rpc_server_commands_defs.h:46
Definition: base.py:1
Definition: blocks.cpp:13
POD_CLASS public_key
Definition: crypto.h:61
POD_CLASS hash
Definition: hash.h:48
epee::levin::async_protocol_handler_config< detail::p2p_context > connections
Definition: levin_notify.h:66
@ SPENT_IN_POOL
Definition: daemon_messages.h:134
@ SPENT_IN_BLOCKCHAIN
Definition: daemon_messages.h:133
@ UNSPENT
Definition: daemon_messages.h:132
Holds cryptonote related classes and helpers.
Definition: blockchain_db.cpp:45
std::string blobdata
Definition: blobdatatype.h:39
Definition: cryptonote_format_utils.h:44
mdb_size_t count(MDB_cursor *cur)
Definition: value_stream.cpp:39
error
Tracks LMDB error codes.
Definition: error.h:45
version
Supported socks variants.
Definition: socks.h:58
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
CXA_THROW_INFO_T * info
Definition: stack_trace.cpp:90
#define true
Definition: stdbool.h:36
#define false
Definition: stdbool.h:37
Definition: core_rpc_server_commands_defs.h:2499
int64_t delta_balance
Definition: core_rpc_server_commands_defs.h:2501
std::string client
Definition: core_rpc_server_commands_defs.h:2500
Definition: core_rpc_server_commands_defs.h:2512
uint64_t credits
Definition: core_rpc_server_commands_defs.h:2513
Definition: core_rpc_server_commands_defs.h:2497
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2520
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2509
Definition: core_rpc_server_commands_defs.h:2458
uint64_t last_update_time
Definition: core_rpc_server_commands_defs.h:2461
uint64_t nonces_stale
Definition: core_rpc_server_commands_defs.h:2465
std::string client
Definition: core_rpc_server_commands_defs.h:2459
uint64_t credits_used
Definition: core_rpc_server_commands_defs.h:2463
uint64_t credits_total
Definition: core_rpc_server_commands_defs.h:2462
uint64_t nonces_bad
Definition: core_rpc_server_commands_defs.h:2466
uint64_t balance
Definition: core_rpc_server_commands_defs.h:2460
uint64_t nonces_good
Definition: core_rpc_server_commands_defs.h:2464
uint64_t nonces_dupe
Definition: core_rpc_server_commands_defs.h:2467
Definition: core_rpc_server_commands_defs.h:2450
Definition: core_rpc_server_commands_defs.h:2483
uint32_t hashrate
Definition: core_rpc_server_commands_defs.h:2485
std::list< entry > entries
Definition: core_rpc_server_commands_defs.h:2484
Definition: core_rpc_server_commands_defs.h:2448
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2493
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2455
Definition: core_rpc_server_commands_defs.h:2326
Definition: core_rpc_server_commands_defs.h:2334
uint64_t height
Definition: core_rpc_server_commands_defs.h:2342
std::string next_seed_hash
Definition: core_rpc_server_commands_defs.h:2338
uint32_t cookie
Definition: core_rpc_server_commands_defs.h:2339
std::string hashing_blob
Definition: core_rpc_server_commands_defs.h:2335
uint64_t seed_height
Definition: core_rpc_server_commands_defs.h:2336
uint64_t credits_per_hash_found
Definition: core_rpc_server_commands_defs.h:2341
std::string seed_hash
Definition: core_rpc_server_commands_defs.h:2337
uint64_t diff
Definition: core_rpc_server_commands_defs.h:2340
Definition: core_rpc_server_commands_defs.h:2324
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2356
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2331
Definition: core_rpc_server_commands_defs.h:2386
std::string paying_for
Definition: core_rpc_server_commands_defs.h:2387
uint64_t payment
Definition: core_rpc_server_commands_defs.h:2388
Definition: core_rpc_server_commands_defs.h:2399
Definition: core_rpc_server_commands_defs.h:2384
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2396
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2404
Definition: core_rpc_server_commands_defs.h:2362
uint32_t nonce
Definition: core_rpc_server_commands_defs.h:2363
uint32_t cookie
Definition: core_rpc_server_commands_defs.h:2364
Definition: core_rpc_server_commands_defs.h:2375
Definition: core_rpc_server_commands_defs.h:2360
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2372
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2380
Definition: core_rpc_server_commands_defs.h:2421
uint64_t credits
Definition: core_rpc_server_commands_defs.h:2425
uint64_t time
Definition: core_rpc_server_commands_defs.h:2424
std::string rpc
Definition: core_rpc_server_commands_defs.h:2422
uint64_t count
Definition: core_rpc_server_commands_defs.h:2423
Definition: core_rpc_server_commands_defs.h:2410
bool clear
Definition: core_rpc_server_commands_defs.h:2411
Definition: core_rpc_server_commands_defs.h:2436
std::vector< entry > data
Definition: core_rpc_server_commands_defs.h:2437
Definition: core_rpc_server_commands_defs.h:2408
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2418
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2444
Definition: core_rpc_server_commands_defs.h:1894
std::string address
Definition: core_rpc_server_commands_defs.h:1895
Definition: core_rpc_server_commands_defs.h:1904
uint32_t seconds
Definition: core_rpc_server_commands_defs.h:1907
std::string status
Definition: core_rpc_server_commands_defs.h:1905
bool banned
Definition: core_rpc_server_commands_defs.h:1906
Definition: core_rpc_server_commands_defs.h:1892
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1915
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1901
Definition: core_rpc_server_commands_defs.h:1658
Definition: core_rpc_server_commands_defs.h:1666
Definition: core_rpc_server_commands_defs.h:1656
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1663
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1671
Definition: core_rpc_server_commands_defs.h:2578
bool bad_txs
Definition: core_rpc_server_commands_defs.h:2579
bool bad_blocks
Definition: core_rpc_server_commands_defs.h:2580
Definition: core_rpc_server_commands_defs.h:2591
Definition: core_rpc_server_commands_defs.h:2576
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2588
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2596
Definition: core_rpc_server_commands_defs.h:1921
std::vector< std::string > txids
Definition: core_rpc_server_commands_defs.h:1922
Definition: core_rpc_server_commands_defs.h:1932
Definition: core_rpc_server_commands_defs.h:1919
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1937
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1929
Definition: core_rpc_server_commands_defs.h:957
uint64_t amount_of_blocks
Definition: core_rpc_server_commands_defs.h:958
std::string wallet_address
Definition: core_rpc_server_commands_defs.h:959
std::string prev_block
Definition: core_rpc_server_commands_defs.h:960
uint32_t starting_nonce
Definition: core_rpc_server_commands_defs.h:961
Definition: core_rpc_server_commands_defs.h:974
uint64_t height
Definition: core_rpc_server_commands_defs.h:975
std::vector< std::string > blocks
Definition: core_rpc_server_commands_defs.h:976
Definition: core_rpc_server_commands_defs.h:955
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:971
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:984
Definition: core_rpc_server_commands_defs.h:1822
uint32_t seconds
Definition: core_rpc_server_commands_defs.h:1825
uint32_t ip
Definition: core_rpc_server_commands_defs.h:1824
std::string host
Definition: core_rpc_server_commands_defs.h:1823
Definition: core_rpc_server_commands_defs.h:1835
Definition: core_rpc_server_commands_defs.h:1843
std::vector< ban > bans
Definition: core_rpc_server_commands_defs.h:1844
Definition: core_rpc_server_commands_defs.h:1820
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1840
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1851
Definition: core_rpc_server_commands_defs.h:869
uint64_t count
Definition: core_rpc_server_commands_defs.h:870
Definition: core_rpc_server_commands_defs.h:865
std::list< std::string > request
Definition: core_rpc_server_commands_defs.h:866
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:877
Definition: core_rpc_server_commands_defs.h:881
std::vector< uint64_t > request
Definition: core_rpc_server_commands_defs.h:882
std::string response
Definition: core_rpc_server_commands_defs.h:884
Definition: core_rpc_server_commands_defs.h:891
std::string wallet_address
Definition: core_rpc_server_commands_defs.h:893
uint64_t reserve_size
Definition: core_rpc_server_commands_defs.h:892
std::string prev_block
Definition: core_rpc_server_commands_defs.h:894
std::string extra_nonce
Definition: core_rpc_server_commands_defs.h:895
Definition: core_rpc_server_commands_defs.h:908
std::string prev_hash
Definition: core_rpc_server_commands_defs.h:915
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:909
uint64_t height
Definition: core_rpc_server_commands_defs.h:912
uint64_t expected_reward
Definition: core_rpc_server_commands_defs.h:914
blobdata blocktemplate_blob
Definition: core_rpc_server_commands_defs.h:919
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:911
std::string seed_hash
Definition: core_rpc_server_commands_defs.h:917
std::string next_seed_hash
Definition: core_rpc_server_commands_defs.h:918
blobdata blockhashing_blob
Definition: core_rpc_server_commands_defs.h:920
uint64_t seed_height
Definition: core_rpc_server_commands_defs.h:916
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:910
uint64_t reserved_offset
Definition: core_rpc_server_commands_defs.h:913
Definition: core_rpc_server_commands_defs.h:889
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:938
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:905
Definition: core_rpc_server_commands_defs.h:2091
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:2097
uint64_t length
Definition: core_rpc_server_commands_defs.h:2094
uint64_t height
Definition: core_rpc_server_commands_defs.h:2093
std::vector< std::string > block_hashes
Definition: core_rpc_server_commands_defs.h:2098
std::string block_hash
Definition: core_rpc_server_commands_defs.h:2092
std::string main_chain_parent_block
Definition: core_rpc_server_commands_defs.h:2099
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:2095
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:2096
Definition: core_rpc_server_commands_defs.h:2083
Definition: core_rpc_server_commands_defs.h:2114
std::vector< chain_info > chains
Definition: core_rpc_server_commands_defs.h:2115
Definition: core_rpc_server_commands_defs.h:2081
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2088
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2122
Definition: core_rpc_server_commands_defs.h:244
Definition: core_rpc_server_commands_defs.h:252
std::vector< std::string > blks_hashes
Definition: core_rpc_server_commands_defs.h:253
Definition: core_rpc_server_commands_defs.h:242
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:260
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:249
Definition: core_rpc_server_commands_defs.h:2056
uint64_t grace_blocks
Definition: core_rpc_server_commands_defs.h:2057
Definition: core_rpc_server_commands_defs.h:2067
uint64_t quantization_mask
Definition: core_rpc_server_commands_defs.h:2069
uint64_t fee
Definition: core_rpc_server_commands_defs.h:2068
Definition: core_rpc_server_commands_defs.h:2054
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2077
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2064
Definition: core_rpc_server_commands_defs.h:220
std::vector< uint64_t > heights
Definition: core_rpc_server_commands_defs.h:221
Definition: core_rpc_server_commands_defs.h:230
std::vector< block_complete_entry > blocks
Definition: core_rpc_server_commands_defs.h:231
Definition: core_rpc_server_commands_defs.h:218
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:238
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:227
Definition: core_rpc_server_commands_defs.h:191
std::vector< tx_output_indices > indices
Definition: core_rpc_server_commands_defs.h:192
Definition: core_rpc_server_commands_defs.h:166
bool prune
Definition: core_rpc_server_commands_defs.h:169
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:168
std::list< crypto::hash > block_ids
Definition: core_rpc_server_commands_defs.h:167
bool no_miner_tx
Definition: core_rpc_server_commands_defs.h:170
Definition: core_rpc_server_commands_defs.h:200
std::vector< block_output_indices > output_indices
Definition: core_rpc_server_commands_defs.h:204
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:202
uint64_t current_height
Definition: core_rpc_server_commands_defs.h:203
std::vector< block_complete_entry > blocks
Definition: core_rpc_server_commands_defs.h:201
Definition: core_rpc_server_commands_defs.h:182
std::vector< uint64_t > indices
Definition: core_rpc_server_commands_defs.h:183
Definition: core_rpc_server_commands_defs.h:163
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:179
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:214
Definition: core_rpc_server_commands_defs.h:1125
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1128
uint64_t height
Definition: core_rpc_server_commands_defs.h:1127
std::string hash
Definition: core_rpc_server_commands_defs.h:1126
Definition: core_rpc_server_commands_defs.h:1140
std::vector< std::string > tx_hashes
Definition: core_rpc_server_commands_defs.h:1143
std::string blob
Definition: core_rpc_server_commands_defs.h:1144
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1141
std::string miner_tx_hash
Definition: core_rpc_server_commands_defs.h:1142
std::string json
Definition: core_rpc_server_commands_defs.h:1145
Definition: core_rpc_server_commands_defs.h:1583
uint64_t end_height
Definition: core_rpc_server_commands_defs.h:1585
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:1584
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1586
Definition: core_rpc_server_commands_defs.h:1598
std::vector< block_header_response > headers
Definition: core_rpc_server_commands_defs.h:1599
Definition: core_rpc_server_commands_defs.h:1581
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1595
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1606
Definition: core_rpc_server_commands_defs.h:1067
std::string hash
Definition: core_rpc_server_commands_defs.h:1068
std::vector< std::string > hashes
Definition: core_rpc_server_commands_defs.h:1069
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1070
Definition: core_rpc_server_commands_defs.h:1082
std::vector< block_header_response > block_headers
Definition: core_rpc_server_commands_defs.h:1084
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1083
Definition: core_rpc_server_commands_defs.h:1065
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1092
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1079
Definition: core_rpc_server_commands_defs.h:1098
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1100
uint64_t height
Definition: core_rpc_server_commands_defs.h:1099
Definition: core_rpc_server_commands_defs.h:1111
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1112
Definition: core_rpc_server_commands_defs.h:1096
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1119
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1108
Definition: core_rpc_server_commands_defs.h:1123
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1156
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1137
Definition: core_rpc_server_commands_defs.h:2019
uint64_t height
Definition: core_rpc_server_commands_defs.h:2020
uint64_t count
Definition: core_rpc_server_commands_defs.h:2021
Definition: core_rpc_server_commands_defs.h:2032
std::string wide_fee_amount
Definition: core_rpc_server_commands_defs.h:2037
std::string wide_emission_amount
Definition: core_rpc_server_commands_defs.h:2034
uint64_t fee_amount_top64
Definition: core_rpc_server_commands_defs.h:2038
uint64_t emission_amount
Definition: core_rpc_server_commands_defs.h:2033
uint64_t emission_amount_top64
Definition: core_rpc_server_commands_defs.h:2035
uint64_t fee_amount
Definition: core_rpc_server_commands_defs.h:2036
Definition: core_rpc_server_commands_defs.h:2017
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2029
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2050
Definition: core_rpc_server_commands_defs.h:1561
Definition: core_rpc_server_commands_defs.h:1569
std::list< connection_info > connections
Definition: core_rpc_server_commands_defs.h:1570
Definition: core_rpc_server_commands_defs.h:1559
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1566
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1577
Definition: core_rpc_server_commands_defs.h:266
std::list< crypto::hash > block_ids
Definition: core_rpc_server_commands_defs.h:267
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:268
Definition: core_rpc_server_commands_defs.h:278
uint64_t current_height
Definition: core_rpc_server_commands_defs.h:281
std::vector< crypto::hash > m_block_ids
Definition: core_rpc_server_commands_defs.h:279
uint64_t start_height
Definition: core_rpc_server_commands_defs.h:280
Definition: core_rpc_server_commands_defs.h:263
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:290
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:275
Definition: core_rpc_server_commands_defs.h:141
Definition: core_rpc_server_commands_defs.h:149
uint64_t height
Definition: core_rpc_server_commands_defs.h:150
std::string hash
Definition: core_rpc_server_commands_defs.h:151
Definition: core_rpc_server_commands_defs.h:139
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:146
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:159
Definition: core_rpc_server_commands_defs.h:643
Definition: core_rpc_server_commands_defs.h:651
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:656
uint64_t block_size_limit
Definition: core_rpc_server_commands_defs.h:674
uint64_t cumulative_difficulty_top64
Definition: core_rpc_server_commands_defs.h:673
uint64_t free_space
Definition: core_rpc_server_commands_defs.h:680
bool busy_syncing
Definition: core_rpc_server_commands_defs.h:687
uint64_t white_peerlist_size
Definition: core_rpc_server_commands_defs.h:664
bool was_bootstrap_ever_used
Definition: core_rpc_server_commands_defs.h:684
std::string bootstrap_daemon_address
Definition: core_rpc_server_commands_defs.h:682
uint64_t target
Definition: core_rpc_server_commands_defs.h:657
bool update_available
Definition: core_rpc_server_commands_defs.h:686
uint64_t block_size_median
Definition: core_rpc_server_commands_defs.h:676
bool offline
Definition: core_rpc_server_commands_defs.h:681
std::string version
Definition: core_rpc_server_commands_defs.h:688
uint64_t block_weight_median
Definition: core_rpc_server_commands_defs.h:677
uint64_t start_time
Definition: core_rpc_server_commands_defs.h:679
uint64_t adjusted_time
Definition: core_rpc_server_commands_defs.h:678
uint64_t target_height
Definition: core_rpc_server_commands_defs.h:653
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:655
uint64_t outgoing_connections_count
Definition: core_rpc_server_commands_defs.h:661
std::string top_block_hash
Definition: core_rpc_server_commands_defs.h:670
uint64_t database_size
Definition: core_rpc_server_commands_defs.h:685
std::string wide_cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:672
uint64_t block_weight_limit
Definition: core_rpc_server_commands_defs.h:675
bool testnet
Definition: core_rpc_server_commands_defs.h:667
uint64_t incoming_connections_count
Definition: core_rpc_server_commands_defs.h:662
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:654
uint64_t tx_pool_size
Definition: core_rpc_server_commands_defs.h:659
uint64_t grey_peerlist_size
Definition: core_rpc_server_commands_defs.h:665
uint64_t cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:671
bool mainnet
Definition: core_rpc_server_commands_defs.h:666
uint64_t alt_blocks_count
Definition: core_rpc_server_commands_defs.h:660
bool stagenet
Definition: core_rpc_server_commands_defs.h:668
uint64_t height
Definition: core_rpc_server_commands_defs.h:652
uint64_t rpc_connections_count
Definition: core_rpc_server_commands_defs.h:663
std::string nettype
Definition: core_rpc_server_commands_defs.h:669
uint64_t height_without_bootstrap
Definition: core_rpc_server_commands_defs.h:683
uint64_t tx_count
Definition: core_rpc_server_commands_defs.h:658
Definition: core_rpc_server_commands_defs.h:641
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:733
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:648
Definition: core_rpc_server_commands_defs.h:1041
bool fill_pow_hash
Definition: core_rpc_server_commands_defs.h:1042
Definition: core_rpc_server_commands_defs.h:1052
block_header_response block_header
Definition: core_rpc_server_commands_defs.h:1053
Definition: core_rpc_server_commands_defs.h:1039
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1060
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1049
Definition: core_rpc_server_commands_defs.h:1677
Definition: core_rpc_server_commands_defs.h:1685
uint64_t limit_up
Definition: core_rpc_server_commands_defs.h:1686
uint64_t limit_down
Definition: core_rpc_server_commands_defs.h:1687
Definition: core_rpc_server_commands_defs.h:1675
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1695
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1682
Definition: core_rpc_server_commands_defs.h:741
Definition: core_rpc_server_commands_defs.h:750
uint64_t total_bytes_out
Definition: core_rpc_server_commands_defs.h:755
uint64_t start_time
Definition: core_rpc_server_commands_defs.h:751
uint64_t total_bytes_in
Definition: core_rpc_server_commands_defs.h:753
uint64_t total_packets_in
Definition: core_rpc_server_commands_defs.h:752
uint64_t total_packets_out
Definition: core_rpc_server_commands_defs.h:754
Definition: core_rpc_server_commands_defs.h:739
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:746
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:766
Definition: core_rpc_server_commands_defs.h:534
std::string mask
Definition: core_rpc_server_commands_defs.h:536
bool unlocked
Definition: core_rpc_server_commands_defs.h:537
uint64_t height
Definition: core_rpc_server_commands_defs.h:538
std::string key
Definition: core_rpc_server_commands_defs.h:535
std::string txid
Definition: core_rpc_server_commands_defs.h:539
Definition: core_rpc_server_commands_defs.h:521
std::vector< get_outputs_out > outputs
Definition: core_rpc_server_commands_defs.h:522
bool get_txid
Definition: core_rpc_server_commands_defs.h:523
Definition: core_rpc_server_commands_defs.h:551
std::vector< outkey > outs
Definition: core_rpc_server_commands_defs.h:552
Definition: core_rpc_server_commands_defs.h:490
crypto::public_key key
Definition: core_rpc_server_commands_defs.h:491
rct::key mask
Definition: core_rpc_server_commands_defs.h:492
uint64_t height
Definition: core_rpc_server_commands_defs.h:494
bool unlocked
Definition: core_rpc_server_commands_defs.h:493
crypto::hash txid
Definition: core_rpc_server_commands_defs.h:495
Definition: core_rpc_server_commands_defs.h:477
std::vector< get_outputs_out > outputs
Definition: core_rpc_server_commands_defs.h:478
bool get_txid
Definition: core_rpc_server_commands_defs.h:479
Definition: core_rpc_server_commands_defs.h:507
std::vector< outkey > outs
Definition: core_rpc_server_commands_defs.h:508
Definition: core_rpc_server_commands_defs.h:475
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:487
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:515
Definition: core_rpc_server_commands_defs.h:519
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:559
Definition: core_rpc_server_commands_defs.h:2270
bool binary
Definition: core_rpc_server_commands_defs.h:2274
rpc::output_distribution_data data
Definition: core_rpc_server_commands_defs.h:2271
std::string compressed_data
Definition: core_rpc_server_commands_defs.h:2273
bool compress
Definition: core_rpc_server_commands_defs.h:2275
uint64_t amount
Definition: core_rpc_server_commands_defs.h:2272
Definition: core_rpc_server_commands_defs.h:2249
uint64_t from_height
Definition: core_rpc_server_commands_defs.h:2251
bool compress
Definition: core_rpc_server_commands_defs.h:2255
uint64_t to_height
Definition: core_rpc_server_commands_defs.h:2252
bool binary
Definition: core_rpc_server_commands_defs.h:2254
std::vector< uint64_t > amounts
Definition: core_rpc_server_commands_defs.h:2250
bool cumulative
Definition: core_rpc_server_commands_defs.h:2253
Definition: core_rpc_server_commands_defs.h:2312
std::vector< distribution > distributions
Definition: core_rpc_server_commands_defs.h:2313
Definition: core_rpc_server_commands_defs.h:2247
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2320
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2267
Definition: core_rpc_server_commands_defs.h:1962
uint64_t unlocked_instances
Definition: core_rpc_server_commands_defs.h:1965
uint64_t recent_instances
Definition: core_rpc_server_commands_defs.h:1966
uint64_t total_instances
Definition: core_rpc_server_commands_defs.h:1964
entry()
Definition: core_rpc_server_commands_defs.h:1977
uint64_t amount
Definition: core_rpc_server_commands_defs.h:1963
Definition: core_rpc_server_commands_defs.h:1943
uint64_t max_count
Definition: core_rpc_server_commands_defs.h:1946
uint64_t min_count
Definition: core_rpc_server_commands_defs.h:1945
bool unlocked
Definition: core_rpc_server_commands_defs.h:1947
uint64_t recent_cutoff
Definition: core_rpc_server_commands_defs.h:1948
std::vector< uint64_t > amounts
Definition: core_rpc_server_commands_defs.h:1944
Definition: core_rpc_server_commands_defs.h:1981
std::vector< entry > histogram
Definition: core_rpc_server_commands_defs.h:1982
Definition: core_rpc_server_commands_defs.h:1941
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1989
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1959
Definition: core_rpc_server_commands_defs.h:1196
bool public_only
Definition: core_rpc_server_commands_defs.h:1197
bool include_blocked
Definition: core_rpc_server_commands_defs.h:1198
Definition: core_rpc_server_commands_defs.h:1209
std::vector< peer > white_list
Definition: core_rpc_server_commands_defs.h:1210
std::vector< peer > gray_list
Definition: core_rpc_server_commands_defs.h:1211
Definition: core_rpc_server_commands_defs.h:1194
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1206
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1219
Definition: core_rpc_server_commands_defs.h:1246
bool gray
Definition: core_rpc_server_commands_defs.h:1247
bool include_blocked
Definition: core_rpc_server_commands_defs.h:1249
bool white
Definition: core_rpc_server_commands_defs.h:1248
Definition: core_rpc_server_commands_defs.h:1261
std::vector< public_node > gray
Definition: core_rpc_server_commands_defs.h:1262
std::vector< public_node > white
Definition: core_rpc_server_commands_defs.h:1263
Definition: core_rpc_server_commands_defs.h:1244
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1271
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1258
Definition: core_rpc_server_commands_defs.h:343
uint64_t block_height
Definition: core_rpc_server_commands_defs.h:352
std::string as_json
Definition: core_rpc_server_commands_defs.h:349
bool in_pool
Definition: core_rpc_server_commands_defs.h:350
bool relayed
Definition: core_rpc_server_commands_defs.h:356
uint64_t received_timestamp
Definition: core_rpc_server_commands_defs.h:354
std::string as_hex
Definition: core_rpc_server_commands_defs.h:345
std::string prunable_as_hex
Definition: core_rpc_server_commands_defs.h:347
std::string prunable_hash
Definition: core_rpc_server_commands_defs.h:348
std::vector< uint64_t > output_indices
Definition: core_rpc_server_commands_defs.h:355
std::string pruned_as_hex
Definition: core_rpc_server_commands_defs.h:346
std::string tx_hash
Definition: core_rpc_server_commands_defs.h:344
uint64_t block_timestamp
Definition: core_rpc_server_commands_defs.h:353
bool double_spend_seen
Definition: core_rpc_server_commands_defs.h:351
Definition: core_rpc_server_commands_defs.h:326
bool split
Definition: core_rpc_server_commands_defs.h:330
std::vector< std::string > txs_hashes
Definition: core_rpc_server_commands_defs.h:327
bool prune
Definition: core_rpc_server_commands_defs.h:329
bool decode_as_json
Definition: core_rpc_server_commands_defs.h:328
Definition: core_rpc_server_commands_defs.h:382
std::vector< std::string > txs_as_hex
Definition: core_rpc_server_commands_defs.h:384
std::vector< std::string > txs_as_json
Definition: core_rpc_server_commands_defs.h:385
std::vector< entry > txs
Definition: core_rpc_server_commands_defs.h:391
std::vector< std::string > missed_tx
Definition: core_rpc_server_commands_defs.h:388
Definition: core_rpc_server_commands_defs.h:324
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:401
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:340
Definition: core_rpc_server_commands_defs.h:1396
Definition: core_rpc_server_commands_defs.h:1404
std::vector< spent_key_image_info > spent_key_images
Definition: core_rpc_server_commands_defs.h:1406
std::vector< tx_info > transactions
Definition: core_rpc_server_commands_defs.h:1405
Definition: core_rpc_server_commands_defs.h:1471
Definition: core_rpc_server_commands_defs.h:1479
std::vector< tx_backlog_entry > backlog
Definition: core_rpc_server_commands_defs.h:1480
Definition: core_rpc_server_commands_defs.h:1469
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1476
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1487
Definition: core_rpc_server_commands_defs.h:1442
Definition: core_rpc_server_commands_defs.h:1450
std::vector< std::string > tx_hashes
Definition: core_rpc_server_commands_defs.h:1451
Definition: core_rpc_server_commands_defs.h:1420
Definition: core_rpc_server_commands_defs.h:1428
std::vector< crypto::hash > tx_hashes
Definition: core_rpc_server_commands_defs.h:1429
Definition: core_rpc_server_commands_defs.h:1418
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1436
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1425
Definition: core_rpc_server_commands_defs.h:1440
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1458
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1447
Definition: core_rpc_server_commands_defs.h:1539
Definition: core_rpc_server_commands_defs.h:1547
txpool_stats pool_stats
Definition: core_rpc_server_commands_defs.h:1548
Definition: core_rpc_server_commands_defs.h:1537
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1544
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1555
Definition: core_rpc_server_commands_defs.h:1394
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1401
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1414
Definition: core_rpc_server_commands_defs.h:441
crypto::hash txid
Definition: core_rpc_server_commands_defs.h:442
Definition: core_rpc_server_commands_defs.h:452
std::vector< uint64_t > o_indexes
Definition: core_rpc_server_commands_defs.h:453
Definition: core_rpc_server_commands_defs.h:439
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:448
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:460
Definition: core_rpc_server_commands_defs.h:1995
Definition: core_rpc_server_commands_defs.h:2003
bool release
Definition: core_rpc_server_commands_defs.h:2005
uint32_t version
Definition: core_rpc_server_commands_defs.h:2004
Definition: core_rpc_server_commands_defs.h:1993
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2013
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2000
Definition: core_rpc_server_commands_defs.h:1783
uint8_t version
Definition: core_rpc_server_commands_defs.h:1784
Definition: core_rpc_server_commands_defs.h:1794
uint32_t state
Definition: core_rpc_server_commands_defs.h:1801
bool enabled
Definition: core_rpc_server_commands_defs.h:1796
uint32_t window
Definition: core_rpc_server_commands_defs.h:1797
uint8_t voting
Definition: core_rpc_server_commands_defs.h:1800
uint32_t votes
Definition: core_rpc_server_commands_defs.h:1798
uint8_t version
Definition: core_rpc_server_commands_defs.h:1795
uint64_t earliest_height
Definition: core_rpc_server_commands_defs.h:1802
uint32_t threshold
Definition: core_rpc_server_commands_defs.h:1799
Definition: core_rpc_server_commands_defs.h:1781
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1816
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1791
Definition: core_rpc_server_commands_defs.h:1757
uint32_t in_peers
Definition: core_rpc_server_commands_defs.h:1759
bool set
Definition: core_rpc_server_commands_defs.h:1758
Definition: core_rpc_server_commands_defs.h:1769
uint32_t in_peers
Definition: core_rpc_server_commands_defs.h:1770
Definition: core_rpc_server_commands_defs.h:1755
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1777
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1766
Definition: core_rpc_server_commands_defs.h:414
std::vector< std::string > key_images
Definition: core_rpc_server_commands_defs.h:415
Definition: core_rpc_server_commands_defs.h:426
std::vector< int > spent_status
Definition: core_rpc_server_commands_defs.h:427
Definition: core_rpc_server_commands_defs.h:406
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:422
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:434
STATUS
Definition: core_rpc_server_commands_defs.h:407
Definition: core_rpc_server_commands_defs.h:794
Definition: core_rpc_server_commands_defs.h:803
uint32_t threads_count
Definition: core_rpc_server_commands_defs.h:806
bool bg_ignore_battery
Definition: core_rpc_server_commands_defs.h:812
bool active
Definition: core_rpc_server_commands_defs.h:804
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:816
uint64_t speed
Definition: core_rpc_server_commands_defs.h:805
uint8_t bg_idle_threshold
Definition: core_rpc_server_commands_defs.h:810
bool is_background_mining_enabled
Definition: core_rpc_server_commands_defs.h:809
uint64_t block_reward
Definition: core_rpc_server_commands_defs.h:815
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:818
std::string pow_algorithm
Definition: core_rpc_server_commands_defs.h:808
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:817
uint32_t block_target
Definition: core_rpc_server_commands_defs.h:814
uint8_t bg_target
Definition: core_rpc_server_commands_defs.h:813
uint8_t bg_min_idle_seconds
Definition: core_rpc_server_commands_defs.h:811
std::string address
Definition: core_rpc_server_commands_defs.h:807
Definition: core_rpc_server_commands_defs.h:792
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:799
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:839
Definition: core_rpc_server_commands_defs.h:1730
uint32_t out_peers
Definition: core_rpc_server_commands_defs.h:1732
bool set
Definition: core_rpc_server_commands_defs.h:1731
Definition: core_rpc_server_commands_defs.h:1743
uint32_t out_peers
Definition: core_rpc_server_commands_defs.h:1744
Definition: core_rpc_server_commands_defs.h:1728
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1751
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1740
Definition: core_rpc_server_commands_defs.h:2526
uint64_t nblocks
Definition: core_rpc_server_commands_defs.h:2527
Definition: core_rpc_server_commands_defs.h:2537
uint64_t height
Definition: core_rpc_server_commands_defs.h:2538
Definition: core_rpc_server_commands_defs.h:2524
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2534
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2545
Definition: core_rpc_server_commands_defs.h:2551
bool check
Definition: core_rpc_server_commands_defs.h:2552
Definition: core_rpc_server_commands_defs.h:2562
bool pruned
Definition: core_rpc_server_commands_defs.h:2563
uint32_t pruning_seed
Definition: core_rpc_server_commands_defs.h:2564
Definition: core_rpc_server_commands_defs.h:2549
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2559
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2572
Definition: core_rpc_server_commands_defs.h:2165
std::vector< std::string > txids
Definition: core_rpc_server_commands_defs.h:2166
Definition: core_rpc_server_commands_defs.h:2176
Definition: core_rpc_server_commands_defs.h:2163
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2173
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2181
Definition: core_rpc_server_commands_defs.h:846
Definition: core_rpc_server_commands_defs.h:855
Definition: core_rpc_server_commands_defs.h:844
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:860
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:851
Definition: core_rpc_server_commands_defs.h:565
bool do_not_relay
Definition: core_rpc_server_commands_defs.h:567
bool do_sanity_checks
Definition: core_rpc_server_commands_defs.h:568
std::string tx_as_hex
Definition: core_rpc_server_commands_defs.h:566
Definition: core_rpc_server_commands_defs.h:581
bool sanity_check_failed
Definition: core_rpc_server_commands_defs.h:592
bool not_relayed
Definition: core_rpc_server_commands_defs.h:583
bool fee_too_low
Definition: core_rpc_server_commands_defs.h:590
bool invalid_input
Definition: core_rpc_server_commands_defs.h:586
bool low_mixin
Definition: core_rpc_server_commands_defs.h:584
bool too_few_outputs
Definition: core_rpc_server_commands_defs.h:591
bool double_spend
Definition: core_rpc_server_commands_defs.h:585
bool overspend
Definition: core_rpc_server_commands_defs.h:589
bool invalid_output
Definition: core_rpc_server_commands_defs.h:587
std::string reason
Definition: core_rpc_server_commands_defs.h:582
bool too_big
Definition: core_rpc_server_commands_defs.h:588
Definition: core_rpc_server_commands_defs.h:563
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:609
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:577
Definition: core_rpc_server_commands_defs.h:1857
uint32_t seconds
Definition: core_rpc_server_commands_defs.h:1861
uint32_t ip
Definition: core_rpc_server_commands_defs.h:1859
bool ban
Definition: core_rpc_server_commands_defs.h:1860
std::string host
Definition: core_rpc_server_commands_defs.h:1858
Definition: core_rpc_server_commands_defs.h:1872
std::vector< ban > bans
Definition: core_rpc_server_commands_defs.h:1873
Definition: core_rpc_server_commands_defs.h:1883
Definition: core_rpc_server_commands_defs.h:1855
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1888
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1880
Definition: core_rpc_server_commands_defs.h:1612
std::string username
Definition: core_rpc_server_commands_defs.h:1614
std::string password
Definition: core_rpc_server_commands_defs.h:1615
std::string address
Definition: core_rpc_server_commands_defs.h:1613
Definition: core_rpc_server_commands_defs.h:1626
std::string status
Definition: core_rpc_server_commands_defs.h:1627
Definition: core_rpc_server_commands_defs.h:1610
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1623
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1633
Definition: core_rpc_server_commands_defs.h:1701
int64_t limit_down
Definition: core_rpc_server_commands_defs.h:1702
int64_t limit_up
Definition: core_rpc_server_commands_defs.h:1703
Definition: core_rpc_server_commands_defs.h:1714
int64_t limit_down
Definition: core_rpc_server_commands_defs.h:1716
int64_t limit_up
Definition: core_rpc_server_commands_defs.h:1715
Definition: core_rpc_server_commands_defs.h:1699
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1724
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1711
Definition: core_rpc_server_commands_defs.h:1321
std::string categories
Definition: core_rpc_server_commands_defs.h:1322
Definition: core_rpc_server_commands_defs.h:1332
std::string categories
Definition: core_rpc_server_commands_defs.h:1333
Definition: core_rpc_server_commands_defs.h:1319
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1329
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1340
Definition: core_rpc_server_commands_defs.h:1277
bool visible
Definition: core_rpc_server_commands_defs.h:1278
Definition: core_rpc_server_commands_defs.h:1288
Definition: core_rpc_server_commands_defs.h:1275
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1285
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1293
Definition: core_rpc_server_commands_defs.h:1299
int8_t level
Definition: core_rpc_server_commands_defs.h:1300
Definition: core_rpc_server_commands_defs.h:1310
Definition: core_rpc_server_commands_defs.h:1297
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1307
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1315
Definition: core_rpc_server_commands_defs.h:615
bool do_background_mining
Definition: core_rpc_server_commands_defs.h:618
uint64_t threads_count
Definition: core_rpc_server_commands_defs.h:617
std::string miner_address
Definition: core_rpc_server_commands_defs.h:616
bool ignore_battery
Definition: core_rpc_server_commands_defs.h:619
Definition: core_rpc_server_commands_defs.h:632
Definition: core_rpc_server_commands_defs.h:613
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:629
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:637
Definition: core_rpc_server_commands_defs.h:1639
Definition: core_rpc_server_commands_defs.h:1647
Definition: core_rpc_server_commands_defs.h:1637
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:1652
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:1644
Definition: core_rpc_server_commands_defs.h:773
Definition: core_rpc_server_commands_defs.h:782
Definition: core_rpc_server_commands_defs.h:771
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:787
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:778
Definition: core_rpc_server_commands_defs.h:946
Definition: core_rpc_server_commands_defs.h:942
std::vector< std::string > request
Definition: core_rpc_server_commands_defs.h:943
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:951
Definition: core_rpc_server_commands_defs.h:296
std::string address
Definition: core_rpc_server_commands_defs.h:297
std::string tx
Definition: core_rpc_server_commands_defs.h:299
std::string view_key
Definition: core_rpc_server_commands_defs.h:298
Definition: core_rpc_server_commands_defs.h:311
std::string status
Definition: core_rpc_server_commands_defs.h:312
std::string error
Definition: core_rpc_server_commands_defs.h:313
Definition: core_rpc_server_commands_defs.h:294
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:320
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:307
Definition: core_rpc_server_commands_defs.h:2195
connection_info info
Definition: core_rpc_server_commands_defs.h:2196
Definition: core_rpc_server_commands_defs.h:2187
Definition: core_rpc_server_commands_defs.h:2225
uint64_t target_height
Definition: core_rpc_server_commands_defs.h:2227
std::list< peer > peers
Definition: core_rpc_server_commands_defs.h:2229
uint32_t next_needed_pruning_seed
Definition: core_rpc_server_commands_defs.h:2228
uint64_t height
Definition: core_rpc_server_commands_defs.h:2226
std::string overview
Definition: core_rpc_server_commands_defs.h:2231
std::list< span > spans
Definition: core_rpc_server_commands_defs.h:2230
Definition: core_rpc_server_commands_defs.h:2204
std::string remote_address
Definition: core_rpc_server_commands_defs.h:2211
std::string connection_id
Definition: core_rpc_server_commands_defs.h:2207
uint64_t size
Definition: core_rpc_server_commands_defs.h:2210
uint32_t speed
Definition: core_rpc_server_commands_defs.h:2209
uint32_t rate
Definition: core_rpc_server_commands_defs.h:2208
uint64_t nblocks
Definition: core_rpc_server_commands_defs.h:2206
uint64_t start_block_height
Definition: core_rpc_server_commands_defs.h:2205
Definition: core_rpc_server_commands_defs.h:2185
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2243
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2192
Definition: core_rpc_server_commands_defs.h:2128
std::string command
Definition: core_rpc_server_commands_defs.h:2129
std::string path
Definition: core_rpc_server_commands_defs.h:2130
Definition: core_rpc_server_commands_defs.h:2141
std::string hash
Definition: core_rpc_server_commands_defs.h:2146
std::string user_uri
Definition: core_rpc_server_commands_defs.h:2144
std::string path
Definition: core_rpc_server_commands_defs.h:2147
std::string auto_uri
Definition: core_rpc_server_commands_defs.h:2145
bool update
Definition: core_rpc_server_commands_defs.h:2142
std::string version
Definition: core_rpc_server_commands_defs.h:2143
Definition: core_rpc_server_commands_defs.h:2126
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:2159
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:2138
Definition: core_rpc_server_commands_defs.h:988
uint8_t minor_version
Definition: core_rpc_server_commands_defs.h:990
uint64_t difficulty_top64
Definition: core_rpc_server_commands_defs.h:1000
uint64_t reward
Definition: core_rpc_server_commands_defs.h:1004
uint64_t timestamp
Definition: core_rpc_server_commands_defs.h:991
std::string pow_hash
Definition: core_rpc_server_commands_defs.h:1008
uint8_t major_version
Definition: core_rpc_server_commands_defs.h:989
uint64_t difficulty
Definition: core_rpc_server_commands_defs.h:998
std::string miner_tx_hash
Definition: core_rpc_server_commands_defs.h:1010
uint32_t nonce
Definition: core_rpc_server_commands_defs.h:993
std::string hash
Definition: core_rpc_server_commands_defs.h:997
bool orphan_status
Definition: core_rpc_server_commands_defs.h:994
uint64_t long_term_weight
Definition: core_rpc_server_commands_defs.h:1009
uint64_t block_size
Definition: core_rpc_server_commands_defs.h:1005
uint64_t cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:1001
uint64_t cumulative_difficulty_top64
Definition: core_rpc_server_commands_defs.h:1003
uint64_t height
Definition: core_rpc_server_commands_defs.h:995
std::string wide_difficulty
Definition: core_rpc_server_commands_defs.h:999
uint64_t num_txes
Definition: core_rpc_server_commands_defs.h:1007
uint64_t depth
Definition: core_rpc_server_commands_defs.h:996
uint64_t block_weight
Definition: core_rpc_server_commands_defs.h:1006
std::string prev_hash
Definition: core_rpc_server_commands_defs.h:992
std::string wide_cumulative_difficulty
Definition: core_rpc_server_commands_defs.h:1002
Definition: cryptonote_basic.h:447
Definition: cryptonote_protocol_defs.h:48
Definition: core_rpc_server_commands_defs.h:464
uint64_t amount
Definition: core_rpc_server_commands_defs.h:465
uint64_t index
Definition: core_rpc_server_commands_defs.h:466
Definition: core_rpc_server_commands_defs.h:1159
uint32_t ip
Definition: core_rpc_server_commands_defs.h:1162
uint32_t pruning_seed
Definition: core_rpc_server_commands_defs.h:1167
uint32_t rpc_credits_per_hash
Definition: core_rpc_server_commands_defs.h:1165
uint64_t last_seen
Definition: core_rpc_server_commands_defs.h:1166
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:1177
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:1174
uint16_t port
Definition: core_rpc_server_commands_defs.h:1163
std::string host
Definition: core_rpc_server_commands_defs.h:1161
uint16_t rpc_port
Definition: core_rpc_server_commands_defs.h:1164
uint64_t id
Definition: core_rpc_server_commands_defs.h:1160
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:1171
Definition: core_rpc_server_commands_defs.h:1223
std::string host
Definition: core_rpc_server_commands_defs.h:1224
uint64_t last_seen
Definition: core_rpc_server_commands_defs.h:1225
uint32_t rpc_credits_per_hash
Definition: core_rpc_server_commands_defs.h:1227
public_node()
Definition: core_rpc_server_commands_defs.h:1229
public_node(const peer &peer)
Definition: core_rpc_server_commands_defs.h:1231
uint16_t rpc_port
Definition: core_rpc_server_commands_defs.h:1226
Definition: rpc_handler.h:46
std::vector< std::uint64_t > distribution
Definition: rpc_handler.h:47
Definition: core_rpc_server_commands_defs.h:115
std::string client
Definition: core_rpc_server_commands_defs.h:116
Definition: core_rpc_server_commands_defs.h:125
uint64_t credits
Definition: core_rpc_server_commands_defs.h:126
std::string top_hash
Definition: core_rpc_server_commands_defs.h:127
rpc_access_response_base()
Definition: core_rpc_server_commands_defs.h:129
Definition: core_rpc_server_commands_defs.h:96
Definition: core_rpc_server_commands_defs.h:102
std::string status
Definition: core_rpc_server_commands_defs.h:103
bool untrusted
Definition: core_rpc_server_commands_defs.h:104
rpc_response_base()
Definition: core_rpc_server_commands_defs.h:106
Definition: core_rpc_server_commands_defs.h:1383
std::string id_hash
Definition: core_rpc_server_commands_defs.h:1384
std::vector< std::string > txs_hashes
Definition: core_rpc_server_commands_defs.h:1385
Definition: core_rpc_server_commands_defs.h:1462
uint64_t weight
Definition: core_rpc_server_commands_defs.h:1463
uint64_t fee
Definition: core_rpc_server_commands_defs.h:1464
uint64_t time_in_pool
Definition: core_rpc_server_commands_defs.h:1465
Definition: core_rpc_server_commands_defs.h:1344
std::string max_used_block_id_hash
Definition: core_rpc_server_commands_defs.h:1350
uint64_t max_used_block_height
Definition: core_rpc_server_commands_defs.h:1351
uint64_t blob_size
Definition: core_rpc_server_commands_defs.h:1347
bool relayed
Definition: core_rpc_server_commands_defs.h:1356
uint64_t last_failed_height
Definition: core_rpc_server_commands_defs.h:1353
bool do_not_relay
Definition: core_rpc_server_commands_defs.h:1358
uint64_t receive_time
Definition: core_rpc_server_commands_defs.h:1355
bool kept_by_block
Definition: core_rpc_server_commands_defs.h:1352
std::string tx_json
Definition: core_rpc_server_commands_defs.h:1346
uint64_t fee
Definition: core_rpc_server_commands_defs.h:1349
std::string last_failed_id_hash
Definition: core_rpc_server_commands_defs.h:1354
uint64_t last_relayed_time
Definition: core_rpc_server_commands_defs.h:1357
uint64_t weight
Definition: core_rpc_server_commands_defs.h:1348
std::string tx_blob
Definition: core_rpc_server_commands_defs.h:1360
std::string id_hash
Definition: core_rpc_server_commands_defs.h:1345
bool double_spend_seen
Definition: core_rpc_server_commands_defs.h:1359
Definition: core_rpc_server_commands_defs.h:1491
uint64_t bytes
Definition: core_rpc_server_commands_defs.h:1493
uint32_t txs
Definition: core_rpc_server_commands_defs.h:1492
Definition: core_rpc_server_commands_defs.h:1502
uint64_t oldest
Definition: core_rpc_server_commands_defs.h:1508
uint32_t num_not_relayed
Definition: core_rpc_server_commands_defs.h:1512
uint32_t num_10m
Definition: core_rpc_server_commands_defs.h:1511
uint32_t num_double_spends
Definition: core_rpc_server_commands_defs.h:1515
txpool_stats()
Definition: core_rpc_server_commands_defs.h:1517
uint64_t bytes_total
Definition: core_rpc_server_commands_defs.h:1503
std::vector< txpool_histo > histo
Definition: core_rpc_server_commands_defs.h:1514
uint64_t histo_98pc
Definition: core_rpc_server_commands_defs.h:1513
uint32_t txs_total
Definition: core_rpc_server_commands_defs.h:1509
uint32_t num_failing
Definition: core_rpc_server_commands_defs.h:1510
uint64_t fee_total
Definition: core_rpc_server_commands_defs.h:1507
uint32_t bytes_max
Definition: core_rpc_server_commands_defs.h:1505
uint32_t bytes_min
Definition: core_rpc_server_commands_defs.h:1504
uint32_t bytes_med
Definition: core_rpc_server_commands_defs.h:1506
Definition: rctTypes.h:79
Definition: blake256.h:36
static __thread int depth
Definition: threadpool.cpp:34
rapidjson::Document json
Definition: transport.cpp:49
provides the implementation of varint's