Merge commit '94ed562' into LokiMergeUpstream20180821

This commit is contained in:
doy-lee 2018-09-19 14:15:55 +10:00
commit b64d7048a3
35 changed files with 212 additions and 493 deletions

View File

@ -1,7 +1,7 @@
# Contributing to Monero
A good way to help is to test, and report bugs. See
[How to Report Bugs Effectively (by Simon Tatham)](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
[How to Report Bugs Effectively (by Simon Tatham)](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
if you want to help that way. Testing is invaluable in making a piece
of software solid and usable.

View File

@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@ -285,7 +285,7 @@ EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
@ -318,7 +318,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
# will parse them like normal C++ but will assume all classes use public instead
# of private inheritance when no explicit protection keyword is present.
# The default value is: NO.
@ -677,7 +677,7 @@ LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. Do not use file names with spaces, bibtex cannot handle them. See
@ -759,7 +759,7 @@ INPUT = src
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# documentation (see: https://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@ -951,7 +951,7 @@ SOURCE_TOOLTIPS = YES
# If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system
# (see http://www.gnu.org/software/global/global.html). You will need version
# (see https://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@ -1094,7 +1094,7 @@ HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the stylesheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220.
@ -1152,12 +1152,12 @@ HTML_INDEX_NUM_ENTRIES = 100
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
# environment (see: https://developer.apple.com/tools/xcode/), introduced with
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
# Makefile in the HTML output directory. Running make will produce the docset in
# that directory and running make install will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@ -1197,7 +1197,7 @@ DOCSET_PUBLISHER_NAME = Publisher
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
# Windows.
#
# The HTML Help Workshop contains a compiler that can convert all HTML output
@ -1273,7 +1273,7 @@ QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1281,7 +1281,7 @@ QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1290,7 +1290,7 @@ QHP_VIRTUAL_FOLDER = doc
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1298,7 +1298,7 @@ QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1306,7 +1306,7 @@ QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
@ -1411,7 +1411,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering
# https://www.mathjax.org) which uses client side Javascript for the rendering
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
@ -1423,7 +1423,7 @@ USE_MATHJAX = NO
# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see:
# http://docs.mathjax.org/en/latest/output.html) for more details.
# https://docs.mathjax.org/en/latest/output.html) for more details.
# Possible values are: HTML-CSS (which is slower, but has the best
# compatibility), NativeMML (i.e. MathML) and SVG.
# The default value is: HTML-CSS.
@ -1438,11 +1438,11 @@ MATHJAX_FORMAT = HTML-CSS
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of
# MathJax from http://www.mathjax.org before deployment.
# The default value is: http://cdn.mathjax.org/mathjax/latest.
# MathJax from https://www.mathjax.org before deployment.
# The default value is: https://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
# extension names that should be enabled during MathJax rendering. For example
@ -1453,7 +1453,7 @@ MATHJAX_EXTENSIONS =
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
# (see: https://docs.mathjax.org/en/latest/output.html) for more details. For an
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
@ -1500,7 +1500,7 @@ SERVER_BASED_SEARCH = NO
#
# Doxygen ships with an example indexer ( doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/).
# Xapian (see: https://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@ -1513,7 +1513,7 @@ EXTERNAL_SEARCH = NO
#
# Doxygen ships with an example indexer ( doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Xapian (see: https://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
@ -1684,7 +1684,7 @@ LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@ -2051,7 +2051,7 @@ HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see:
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: NO.

View File

@ -203,14 +203,14 @@ If you are using the older Raspbian Jessie image, compiling Loki is a bit more c
#### On Windows:
Binaries for Windows are built on Windows using the MinGW toolchain within
[MSYS2 environment](http://msys2.github.io). The MSYS2 environment emulates a
[MSYS2 environment](https://www.msys2.org). The MSYS2 environment emulates a
POSIX system. The toolchain runs within the environment and *cross-compiles*
binaries that can run outside of the environment as a regular Windows
application.
**Preparing the build environment**
* Download and install the [MSYS2 installer](http://msys2.github.io), either the 64-bit or the 32-bit package, depending on your system.
* Download and install the [MSYS2 installer](https://www.msys2.org), either the 64-bit or the 32-bit package, depending on your system.
* Open the MSYS shell via the `MSYS2 Shell` shortcut
* Update packages using pacman:

View File

@ -18,7 +18,7 @@
# that follow. The default is UTF-8 which is also the encoding used for all
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
# iconv built into libc) for the transcoding. See
# http://www.gnu.org/software/libiconv for the list of possible encodings.
# https://www.gnu.org/software/libiconv for the list of possible encodings.
DOXYFILE_ENCODING = UTF-8
@ -242,7 +242,7 @@ EXTENSION_MAPPING =
# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
# comments according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you
# can mix doxygen, HTML, and XML commands with Markdown formatting.
# Disable only in case of backward compatibilities issues.
@ -589,7 +589,7 @@ LAYOUT_FILE =
# containing the references data. This must be a list of .bib files. The
# .bib extension is automatically appended if omitted. Using this command
# requires the bibtex tool to be installed. See also
# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
# https://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
# feature you need bibtex and perl available in the search path.
@ -665,7 +665,7 @@ INPUT = ../README.md \
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
# also the default input encoding. Doxygen uses libiconv (or the iconv built
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
# into libc) for the transcoding. See https://www.gnu.org/software/libiconv for
# the list of possible encodings.
INPUT_ENCODING = UTF-8
@ -833,7 +833,7 @@ REFERENCES_LINK_SOURCE = YES
# If the USE_HTAGS tag is set to YES then the references to source code
# will point to the HTML generated by the htags(1) tool instead of doxygen
# built-in source browser. The htags tool is part of GNU's global source
# tagging system (see http://www.gnu.org/software/global/global.html). You
# tagging system (see https://www.gnu.org/software/global/global.html). You
# will need version 4.8.6 or higher.
USE_HTAGS = NO
@ -928,7 +928,7 @@ HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
# Doxygen will adjust the colors in the style sheet and background images
# according to this color. Hue is specified as an angle on a colorwheel,
# see http://en.wikipedia.org/wiki/Hue for more information.
# see https://en.wikipedia.org/wiki/Hue for more information.
# For instance the value 0 represents red, 60 is yellow, 120 is green,
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
# The allowed range is 0 to 359.
@ -981,7 +981,7 @@ HTML_INDEX_NUM_ENTRIES = 100
# directory and running "make install" will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
# it at startup.
# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
GENERATE_DOCSET = NO
@ -1179,7 +1179,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
# (see http://www.mathjax.org) which uses client side Javascript for the
# (see https://www.mathjax.org) which uses client side Javascript for the
# rendering instead of using prerendered bitmaps. Use this if you do not
# have LaTeX installed or if you want to formulas look prettier in the HTML
# output. When enabled you may also need to install MathJax separately and
@ -1194,9 +1194,9 @@ USE_MATHJAX = NO
# MATHJAX_RELPATH should be ../mathjax. The default value points to
# the MathJax Content Delivery Network so you can quickly see the result without
# installing MathJax. However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
# copy of MathJax from https://www.mathjax.org before deployment.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.
@ -1318,7 +1318,7 @@ LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
# http://en.wikipedia.org/wiki/BibTeX for more info.
# https://en.wikipedia.org/wiki/BibTeX for more info.
LATEX_BIB_STYLE = plain

View File

@ -1581,6 +1581,13 @@ public:
*/
virtual bool is_read_only() const = 0;
/**
* @brief get disk space requirements
*
* @return the size required
*/
virtual uint64_t get_database_size() const = 0;
// TODO: this should perhaps be (or call) a series of functions which
// progressively update through version updates
/**

View File

@ -36,6 +36,7 @@
#include <random>
#include "string_tools.h"
#include "file_io_utils.h"
#include "common/util.h"
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "crypto/crypto.h"
@ -3506,6 +3507,16 @@ bool BlockchainLMDB::is_read_only() const
return false;
}
uint64_t BlockchainLMDB::get_database_size() const
{
uint64_t size = 0;
boost::filesystem::path datafile(m_folder);
datafile /= CRYPTONOTE_BLOCKCHAINDATA_FILENAME;
if (!epee::file_io_utils::get_file_size(datafile.string(), size))
size = 0;
return size;
}
void BlockchainLMDB::fixup()
{
LOG_PRINT_L3("BlockchainLMDB::" << __func__);

View File

@ -384,6 +384,8 @@ private:
virtual bool is_read_only() const;
virtual uint64_t get_database_size() const;
// fix up anything that may be wrong due to past bugs
virtual void fixup();

View File

@ -73,7 +73,7 @@ public:
#if defined(_MSC_VER)
, m_oss(std::move(rhs.m_oss))
#else
// GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
// GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
, m_oss(rhs.m_oss.str(), std::ios_base::out | std::ios_base::ate)
#endif
, m_color(std::move(rhs.m_color))

View File

@ -52,7 +52,7 @@
#define ST_LOG(x) CINFO(el::base::Writer,el::base::DispatchAction::FileOnlyLog,LOKI_DEFAULT_LOG_CATEGORY) << x
// from http://stackoverflow.com/questions/11665829/how-can-i-print-stack-trace-for-caught-exceptions-in-c-code-injection-in-c
// from https://stackoverflow.com/questions/11665829/how-can-i-print-stack-trace-for-caught-exceptions-in-c-code-injection-in-c
// The decl of __cxa_throw in /usr/include/.../cxxabi.h uses
// 'std::type_info *', but GCC's built-in protype uses 'void *'.

View File

@ -31,7 +31,7 @@
* The blake256_* and blake224_* functions are largely copied from
* blake256_light.c and blake224_light.c from the BLAKE website:
*
* http://131002.net/blake/
* https://131002.net/blake/
*
* The hmac_* functions implement HMAC-BLAKE-256 and HMAC-BLAKE-224.
* HMAC is specified by RFC 2104.

View File

@ -0,0 +1,4 @@
This code comes from Daniel J. Bernstein's SUPERCOP source,
released in the public domain.
[http://ed25519.cr.yp.to/software.html](http://ed25519.cr.yp.to/software.html)

View File

@ -1,2 +1,2 @@
EdDSA signatures using Curve25519
from http://hyperelliptic.org/ebats/supercop-20141124.tar.bz2
from https://hyperelliptic.org/ebats/supercop-20141124.tar.bz2

View File

@ -1,5 +1,5 @@
#assumes you have gnu sed, osx sed might need slight syntax changeo
#c.f. http://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files
#c.f. https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files
#written by shen-noether monero research labs
@ -8,7 +8,7 @@ import glob #for copy files
import textwrap #for comments etc
print("make sure you have cat and grep installed")
print("also assumes gnu sed syntax, c.f. :http://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files")
print("also assumes gnu sed syntax, c.f. :https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files")
print("I believe osx may have slightly different version of sed")
print("maybe someone smart can replace the sed with perl..")

View File

@ -2,6 +2,6 @@ shen_ed25519_ref10
MakeCryptoOps.py makes crypto-ops.c in the Monero source from the ref10 implementation
EdDSA signatures using Curve25519
from http://hyperelliptic.org/ebats/supercop-20141124.tar.bz2
from https://hyperelliptic.org/ebats/supercop-20141124.tar.bz2
Commented / combined by Shen Noether, Monero Research Lab

View File

@ -43,8 +43,8 @@
#elif defined(_MSC_VER)
#include <assert.h>
#include <stdlib.h>
// http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc
// http://msdn.microsoft.com/en-us/library/bb918180.aspx
// https://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc
// https://msdn.microsoft.com/en-us/library/bb918180.aspx
#pragma section(".CRT$XCT", read)
#define INITIALIZER(name) \
static void __cdecl name(void); \

View File

@ -309,7 +309,7 @@ STATIC INLINE void aes_256_assist2(__m128i* t1, __m128i * t3)
* CPU AES support.
* For more information about these functions, see page 19 of Intel's AES instructions
* white paper:
* http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/aes-instructions-set-white-paper.pdf
* https://www.intel.com/content/dam/doc/white-paper/advanced-encryption-standard-new-instructions-set-paper.pdf
*
* @param key the input 128 bit key
* @param expandedKey An output buffer to hold the generated key schedule
@ -558,7 +558,7 @@ void slow_hash_free_state(void)
* AES support on x86 CPUs.
*
* A diagram of the inner loop of this function can be found at
* http://www.cs.cmu.edu/~dga/crypto/xmr/cryptonight.png
* https://www.cs.cmu.edu/~dga/crypto/xmr/cryptonight.png
*
* @param data the data to hash
* @param length the length in bytes of the data

View File

@ -67,7 +67,7 @@ size_t tree_hash_cnt(size_t count) {
}
void tree_hash(const char (*hashes)[HASH_SIZE], size_t count, char *root_hash) {
// The blockchain block at height 202612 http://monerochain.info/block/bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698
// The blockchain block at height 202612 https://moneroblocks.info/block/202612
// contained 514 transactions, that triggered bad calculation of variable "cnt" in the original version of this function
// as from CryptoNote code.
//

View File

@ -488,7 +488,7 @@ namespace cryptonote
{
//we lucky!
++m_config.current_extra_message_index;
MGINFO_GREEN("Found block for difficulty: " << local_diff);
MGINFO_GREEN("Found block " << get_block_hash(b) << " at height " << height << " for difficulty: " << local_diff);
if(!m_phandler->handle_block_found(b))
{
--m_config.current_extra_message_index;

View File

@ -80,7 +80,9 @@ namespace {
<< "hash: " << header.hash << std::endl
<< "difficulty: " << boost::lexical_cast<std::string>(header.difficulty) << std::endl
<< "POW hash: " << header.pow_hash << std::endl
<< "reward: " << boost::lexical_cast<std::string>(header.reward);
<< "block size: " << header.block_size << std::endl
<< "num txes: " << header.num_txes << std::endl
<< "reward: " << cryptonote::print_money(header.reward);
}
std::string get_human_time_ago(time_t t, time_t now)

View File

@ -275,22 +275,32 @@ namespace hw {
/* ======================================================================= */
/* MISC */
/* ======================================================================= */
int device_ledger::set_command_header(BYTE ins, BYTE p1, BYTE p2) {
reset_buffer();
int offset = 0;
this->buffer_send[0] = 0x00;
this->buffer_send[1] = ins;
this->buffer_send[2] = p1;
this->buffer_send[3] = p2;
this->buffer_send[4] = 0x00;
return 5;
}
int device_ledger::set_command_header_noopt(BYTE ins, BYTE p1, BYTE p2) {
int offset = set_command_header(ins, p1, p2);
//options
this->buffer_send[offset++] = 0;
this->buffer_send[4] = offset - 5;
return offset;
}
void device_ledger::send_simple(BYTE ins, BYTE p1) {
this->length_send = set_command_header_noopt(ins, p1);
this->exchange();
}
bool device_ledger::reset() {
int offset;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_RESET;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_RESET);
return true;
}
@ -452,20 +462,10 @@ namespace hw {
int offset;
reset_buffer();
switch(mode) {
case TRANSACTION_CREATE_REAL:
case TRANSACTION_CREATE_FAKE:
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_SET_SIGNATURE_MODE;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
offset = set_command_header_noopt(INS_SET_SIGNATURE_MODE, 1);
//account
this->buffer_send[offset] = mode;
offset += 1;
@ -496,22 +496,7 @@ namespace hw {
bool device_ledger::get_public_address(cryptonote::account_public_address &pubkey){
AUTO_LOCK_CMD();
int offset;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GET_KEY;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_GET_KEY, 1);
memmove(pubkey.m_view_public_key.data, this->buffer_recv, 32);
memmove(pubkey.m_spend_public_key.data, this->buffer_recv+32, 32);
@ -527,22 +512,7 @@ namespace hw {
memset(skey.data, 0xFF, 32);
//spcialkey, normal conf handled in decrypt
int offset;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GET_KEY;
this->buffer_send[2] = 0x02;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_GET_KEY, 0x02);
//View key is retrievied, if allowed, to speed up blockchain parsing
memmove(this->viewkey.data, this->buffer_recv+0, 32);
@ -564,7 +534,6 @@ namespace hw {
bool device_ledger::generate_chacha_key(const cryptonote::account_keys &keys, crypto::chacha_key &key) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
crypto::chacha_key key_x;
@ -572,20 +541,7 @@ namespace hw {
this->controle_device->generate_chacha_key(keys_x, key_x);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GET_CHACHA8_PREKEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_GET_CHACHA8_PREKEY);
char prekey[200];
memmove(prekey, &this->buffer_recv[0], 200);
@ -628,19 +584,7 @@ namespace hw {
crypto::derive_subaddress_public_key(pub, derivation, output_index,derived_pub);
} else {
int offset =0;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_DERIVE_SUBADDRESS_PUBLIC_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_DERIVE_SUBADDRESS_PUBLIC_KEY);
//pub
memmove(this->buffer_send+offset, pub.data, 32);
offset += 32;
@ -671,7 +615,6 @@ namespace hw {
crypto::public_key device_ledger::get_subaddress_spend_public_key(const cryptonote::account_keys& keys, const cryptonote::subaddress_index &index) {
AUTO_LOCK_CMD();
crypto::public_key D;
int offset;
#ifdef DEBUG_HWDEVICE
const cryptonote::account_keys keys_x = hw::ledger::decrypt(keys);
@ -688,17 +631,7 @@ namespace hw {
D = keys.m_account_address.m_spend_public_key;
} else {
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GET_SUBADDRESS_SPEND_PUBLIC_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
int offset = set_command_header_noopt(INS_GET_SUBADDRESS_SPEND_PUBLIC_KEY);
//index
static_assert(sizeof(cryptonote::subaddress_index) == 8, "cryptonote::subaddress_index shall be 8 bytes length");
memmove(this->buffer_send+offset, &index, sizeof(cryptonote::subaddress_index));
@ -733,7 +666,6 @@ namespace hw {
cryptonote::account_public_address device_ledger::get_subaddress(const cryptonote::account_keys& keys, const cryptonote::subaddress_index &index) {
AUTO_LOCK_CMD();
cryptonote::account_public_address address;
int offset;
#ifdef DEBUG_HWDEVICE
const cryptonote::account_keys keys_x = hw::ledger::decrypt(keys);
@ -752,17 +684,7 @@ namespace hw {
if (index.is_zero()) {
address = keys.m_account_address;
} else {
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GET_SUBADDRESS;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
int offset = set_command_header_noopt(INS_GET_SUBADDRESS);
//index
static_assert(sizeof(cryptonote::subaddress_index) == 8, "cryptonote::subaddress_index shall be 8 bytes length");
memmove(this->buffer_send+offset, &index, sizeof(cryptonote::subaddress_index));
@ -787,7 +709,6 @@ namespace hw {
crypto::secret_key device_ledger::get_subaddress_secret_key(const crypto::secret_key &sec, const cryptonote::subaddress_index &index) {
AUTO_LOCK_CMD();
crypto::secret_key sub_sec;
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::secret_key sec_x = hw::ledger::decrypt(sec);
@ -799,17 +720,7 @@ namespace hw {
hw::ledger::log_hexbuffer("get_subaddress_secret_key: [[OUT]] sub_sec", sub_sec_x.data, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GET_SUBADDRESS_SECRET_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_GET_SUBADDRESS_SECRET_KEY);
//sec
memmove(this->buffer_send+offset, sec.data, 32);
offset += 32;
@ -840,16 +751,7 @@ namespace hw {
AUTO_LOCK_CMD();
int offset, sw;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_VERIFY_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
offset = set_command_header_noopt(INS_VERIFY_KEY);
//sec
memmove(this->buffer_send+offset, secret_key.data, 32);
offset += 32;
@ -872,7 +774,6 @@ namespace hw {
bool device_ledger::scalarmultKey(rct::key & aP, const rct::key &P, const rct::key &a) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const rct::key P_x = P;
@ -884,17 +785,7 @@ namespace hw {
hw::ledger::log_hexbuffer("scalarmultKey: [[OUT]] aP", (char*)aP_x.bytes, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_SECRET_SCAL_MUL_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_SECRET_SCAL_MUL_KEY);
//pub
memmove(this->buffer_send+offset, P.bytes, 32);
offset += 32;
@ -919,7 +810,6 @@ namespace hw {
bool device_ledger::scalarmultBase(rct::key &aG, const rct::key &a) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const rct::key a_x = hw::ledger::decrypt(a);
@ -929,17 +819,7 @@ namespace hw {
hw::ledger::log_hexbuffer("scalarmultKey: [[OUT]] aG", (char*)aG_x.bytes, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_SECRET_SCAL_MUL_BASE;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_SECRET_SCAL_MUL_BASE);
//sec
memmove(this->buffer_send+offset, a.bytes, 32);
offset += 32;
@ -960,7 +840,6 @@ namespace hw {
bool device_ledger::sc_secret_add( crypto::secret_key &r, const crypto::secret_key &a, const crypto::secret_key &b) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::secret_key a_x = hw::ledger::decrypt(a);
@ -969,17 +848,7 @@ namespace hw {
this->controle_device->sc_secret_add(r_x, a_x, b_x);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_SECRET_KEY_ADD;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_SECRET_KEY_ADD);
//sec key
memmove(this->buffer_send+offset, a.data, 32);
offset += 32;
@ -1008,8 +877,6 @@ namespace hw {
throw std::runtime_error("device generate key does not support recover");
}
int offset;
#ifdef DEBUG_HWDEVICE
bool recover_x = recover;
const crypto::secret_key recovery_key_x = recovery_key;
@ -1017,21 +884,7 @@ namespace hw {
crypto::secret_key sec_x;
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GENERATE_KEYPAIR;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_GENERATE_KEYPAIR);
//pub key
memmove(pub.data, &this->buffer_recv[0], 32);
@ -1071,19 +924,7 @@ namespace hw {
r = crypto::generate_key_derivation(pub, this->viewkey, derivation);
} else {
int offset;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GEN_KEY_DERIVATION;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_GEN_KEY_DERIVATION);
//pub
memmove(this->buffer_send+offset, pub.data, 32);
offset += 32;
@ -1132,7 +973,6 @@ namespace hw {
bool device_ledger::derivation_to_scalar(const crypto::key_derivation &derivation, const size_t output_index, crypto::ec_scalar &res) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::key_derivation derivation_x = hw::ledger::decrypt(derivation);
@ -1144,17 +984,7 @@ namespace hw {
hw::ledger::log_hexbuffer("derivation_to_scalar: [[OUT]] res ", res_x.data, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_DERIVATION_TO_SCALAR;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_DERIVATION_TO_SCALAR);
//derivattion
memmove(this->buffer_send+offset, derivation.data, 32);
offset += 32;
@ -1182,7 +1012,6 @@ namespace hw {
bool device_ledger::derive_secret_key(const crypto::key_derivation &derivation, const std::size_t output_index, const crypto::secret_key &sec, crypto::secret_key &derived_sec) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::key_derivation derivation_x = hw::ledger::decrypt(derivation);
@ -1196,17 +1025,7 @@ namespace hw {
hw::ledger::log_hexbuffer("derive_secret_key: [[OUT]] derived_sec", derived_sec_x.data, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_DERIVE_SECRET_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_DERIVE_SECRET_KEY);
//derivation
memmove(this->buffer_send+offset, derivation.data, 32);
offset += 32;
@ -1237,7 +1056,6 @@ namespace hw {
bool device_ledger::derive_public_key(const crypto::key_derivation &derivation, const std::size_t output_index, const crypto::public_key &pub, crypto::public_key &derived_pub){
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::key_derivation derivation_x = hw::ledger::decrypt(derivation);
@ -1251,17 +1069,7 @@ namespace hw {
hw::ledger::log_hexbuffer("derive_public_key: [[OUT]] derived_pub ", derived_pub_x.data, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_DERIVE_PUBLIC_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_DERIVE_PUBLIC_KEY);
//derivation
memmove(this->buffer_send+offset, derivation.data, 32);
offset += 32;
@ -1291,7 +1099,6 @@ namespace hw {
bool device_ledger::secret_key_to_public_key(const crypto::secret_key &sec, crypto::public_key &pub) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::secret_key sec_x = hw::ledger::decrypt(sec);
@ -1304,17 +1111,7 @@ namespace hw {
}
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_SECRET_KEY_TO_PUBLIC_KEY;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_SECRET_KEY_TO_PUBLIC_KEY);
//sec key
memmove(this->buffer_send+offset, sec.data, 32);
offset += 32;
@ -1335,7 +1132,6 @@ namespace hw {
bool device_ledger::generate_key_image(const crypto::public_key &pub, const crypto::secret_key &sec, crypto::key_image &image){
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::public_key pub_x = pub;
@ -1347,17 +1143,7 @@ namespace hw {
hw::ledger::log_hexbuffer("generate_key_image: [[OUT]] image ", image_x.data, 32);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_GEN_KEY_IMAGE;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0;
offset += 1;
int offset = set_command_header_noopt(INS_GEN_KEY_IMAGE);
//pub
memmove(this->buffer_send+offset, pub.data, 32);
offset += 32;
@ -1385,20 +1171,10 @@ namespace hw {
bool device_ledger::open_tx(crypto::secret_key &tx_key) {
AUTO_LOCK_CMD();
int offset;
reset_buffer();
key_map.clear();
int offset = set_command_header_noopt(INS_OPEN_TX, 0x01);
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_OPEN_TX;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
//account
this->buffer_send[offset+0] = 0x00;
this->buffer_send[offset+1] = 0x00;
@ -1417,7 +1193,6 @@ namespace hw {
bool device_ledger::encrypt_payment_id(crypto::hash8 &payment_id, const crypto::public_key &public_key, const crypto::secret_key &secret_key) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const crypto::public_key public_key_x = public_key;
@ -1426,17 +1201,7 @@ namespace hw {
this->controle_device->encrypt_payment_id(payment_id_x, public_key_x, secret_key_x);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_STEALTH;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
int offset = set_command_header_noopt(INS_STEALTH);
//pub
memmove(&this->buffer_send[offset], public_key.data, 32);
offset += 32;
@ -1468,7 +1233,6 @@ namespace hw {
bool device_ledger::ecdhEncode(rct::ecdhTuple & unmasked, const rct::key & AKout) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const rct::key AKout_x = hw::ledger::decrypt(AKout);
@ -1476,17 +1240,7 @@ namespace hw {
this->controle_device->ecdhEncode(unmasked_x, AKout_x);
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_BLIND;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
int offset = set_command_header_noopt(INS_BLIND);
// AKout
memmove(this->buffer_send+offset, AKout.bytes, 32);
offset += 32;
@ -1516,7 +1270,6 @@ namespace hw {
bool device_ledger::ecdhDecode(rct::ecdhTuple & masked, const rct::key & AKout) {
AUTO_LOCK_CMD();
int offset;
#ifdef DEBUG_HWDEVICE
const rct::key AKout_x = hw::ledger::decrypt(AKout);
@ -1524,17 +1277,8 @@ namespace hw {
this->controle_device->ecdhDecode(masked_x, AKout_x);
#endif
reset_buffer();
int offset = set_command_header_noopt(INS_UNBLIND);
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_UNBLIND;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
// AKout
memmove(this->buffer_send+offset, AKout.bytes, 32);
offset += 32;
@ -1584,16 +1328,7 @@ namespace hw {
data = blob.data();
// ====== u8 type, varint txnfee ======
int offset;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_VALIDATE;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = 0x01;
this->buffer_send[4] = 0x00;
offset = 5;
int offset = set_command_header(INS_VALIDATE, 0x01, 0x01);
//options
this->buffer_send[offset] = (inputs_size == 0)?0x00:0x80;
offset += 1;
@ -1621,13 +1356,7 @@ namespace hw {
//pseudoOuts
if ((type == rct::RCTTypeSimple) || (type == rct::RCTTypeSimpleBulletproof)) {
for ( i = 0; i < inputs_size; i++) {
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_VALIDATE;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = i+2;
this->buffer_send[4] = 0x00;
offset = 5;
offset = set_command_header(INS_VALIDATE, 0x01, i+2);
//options
this->buffer_send[offset] = (i==inputs_size-1)? 0x00:0x80;
offset += 1;
@ -1654,14 +1383,7 @@ namespace hw {
log_hexbuffer("Pout not found", (char*)outPk[i].dest.bytes, 32);
CHECK_AND_ASSERT_THROW_MES(found, "Pout not found");
}
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_VALIDATE;
this->buffer_send[2] = 0x02;
this->buffer_send[3] = i+1;
this->buffer_send[4] = 0x00;
offset = 5;
offset = set_command_header(INS_VALIDATE, 0x02, i+1);
//options
this->buffer_send[offset] = (i==outputs_size-1)? 0x00:0x80 ;
offset += 1;
@ -1706,14 +1428,7 @@ namespace hw {
// ====== C[], message, proof======
C_offset = kv_offset;
for (i = 0; i < outputs_size; i++) {
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_VALIDATE;
this->buffer_send[2] = 0x03;
this->buffer_send[3] = i+1;
this->buffer_send[4] = 0x00;
offset = 5;
offset = set_command_header(INS_VALIDATE, 0x03, i+1);
//options
this->buffer_send[offset] = 0x80 ;
offset += 1;
@ -1728,17 +1443,7 @@ namespace hw {
}
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_VALIDATE;
this->buffer_send[2] = 0x03;
this->buffer_send[3] = i+1;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
offset = set_command_header_noopt(INS_VALIDATE, 0x03, i+1);
//message
memmove(this->buffer_send+offset, hashes[0].bytes,32);
offset += 32;
@ -1763,7 +1468,6 @@ namespace hw {
bool device_ledger::mlsag_prepare(const rct::key &H, const rct::key &xx,
rct::key &a, rct::key &aG, rct::key &aHP, rct::key &II) {
AUTO_LOCK_CMD();
int offset;
unsigned char options;
#ifdef DEBUG_HWDEVICE
@ -1775,17 +1479,7 @@ namespace hw {
rct::key II_x;
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_MLSAG;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
int offset = set_command_header_noopt(INS_MLSAG, 0x01);
//value H
memmove(this->buffer_send+offset, H.bytes, 32);
offset += 32;
@ -1818,7 +1512,6 @@ namespace hw {
bool device_ledger::mlsag_prepare(rct::key &a, rct::key &aG) {
AUTO_LOCK_CMD();
int offset;
unsigned char options;
#ifdef DEBUG_HWDEVICE
@ -1826,21 +1519,7 @@ namespace hw {
rct::key aG_x;
#endif
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_MLSAG;
this->buffer_send[2] = 0x01;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_MLSAG, 0x01);
memmove(a.bytes, &this->buffer_recv[32*0], 32);
memmove(aG.bytes, &this->buffer_recv[32*1], 32);
@ -1856,7 +1535,6 @@ namespace hw {
bool device_ledger::mlsag_hash(const rct::keyV &long_message, rct::key &c) {
AUTO_LOCK_CMD();
int offset;
unsigned char options;
size_t cnt;
@ -1868,14 +1546,7 @@ namespace hw {
cnt = long_message.size();
for (size_t i = 0; i<cnt; i++) {
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_MLSAG;
this->buffer_send[2] = 0x02;
this->buffer_send[3] = i+1;
this->buffer_send[4] = 0x00;
offset = 5;
int offset = set_command_header(INS_MLSAG, 0x02, i+1);
//options
this->buffer_send[offset] =
(i==(cnt-1))?0x00:0x80; //last
@ -1900,7 +1571,6 @@ namespace hw {
bool device_ledger::mlsag_sign(const rct::key &c, const rct::keyV &xx, const rct::keyV &alpha, const size_t rows, const size_t dsRows, rct::keyV &ss) {
AUTO_LOCK_CMD();
int offset;
CHECK_AND_ASSERT_THROW_MES(dsRows<=rows, "dsRows greater than rows");
CHECK_AND_ASSERT_THROW_MES(xx.size() == rows, "xx size does not match rows");
@ -1918,14 +1588,7 @@ namespace hw {
#endif
for (size_t j = 0; j < dsRows; j++) {
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_MLSAG;
this->buffer_send[2] = 0x03;
this->buffer_send[3] = j+1;
this->buffer_send[4] = 0x00;
offset = 5;
int offset = set_command_header(INS_MLSAG, 0x03, j+1);
//options
this->buffer_send[offset] = 0x00;
if (j==(dsRows-1)) {
@ -1962,24 +1625,7 @@ namespace hw {
bool device_ledger::close_tx() {
AUTO_LOCK_CMD();
int offset;
reset_buffer();
this->buffer_send[0] = 0x00;
this->buffer_send[1] = INS_CLOSE_TX;
this->buffer_send[2] = 0x00;
this->buffer_send[3] = 0x00;
this->buffer_send[4] = 0x00;
offset = 5;
//options
this->buffer_send[offset] = 0x00;
offset += 1;
this->buffer_send[4] = offset-5;
this->length_send = offset;
this->exchange();
send_simple(INS_CLOSE_TX);
return true;
}

View File

@ -102,6 +102,9 @@ namespace hw {
void logRESP(void);
unsigned int exchange(unsigned int ok=0x9000, unsigned int mask=0xFFFF);
void reset_buffer(void);
int set_command_header(BYTE ins, BYTE p1 = 0x00, BYTE p2 = 0x00);
int set_command_header_noopt(BYTE ins, BYTE p1 = 0x00, BYTE p2 = 0x00);
void send_simple(BYTE ins, BYTE p1 = 0x00);
// hw running mode
device_mode mode;

View File

@ -37,7 +37,7 @@
* Sources:
* Baza Radikaro Oficiala
* Reta Vortaro (http://www.reta-vortaro.de/revo/)
* Esperanto Panorama - Esperanto-English Dictionary (http://www.esperanto-panorama.net/vortaro/eoen.htm)
* Esperanto Panorama - Esperanto-English Dictionary (https://www.esperanto-panorama.net/vortaro/eoen.htm)
* ESPDIC - Paul Denisowski (http://www.denisowski.org/Esperanto/ESPDIC/espdic.txt)
*/

View File

@ -35,7 +35,7 @@
/*
* Word list authored by: sorpaas
* Sources:
* lo gimste jo'u lo ma'oste (http://guskant.github.io/lojbo/gismu-cmavo.html)
* lo gimste jo'u lo ma'oste (https://guskant.github.io/lojbo/gismu-cmavo.html)
* N-grams of Lojban corpus (https://mw.lojban.org/papri/N-grams_of_Lojban_corpus)
*/

View File

@ -147,7 +147,7 @@ namespace rct {
//This is a just slghtly more efficient version than the ones described below
//(will be explained in more detail in Ring Multisig paper
//These are aka MG signatutes in earlier drafts of the ring ct paper
// c.f. http://eprint.iacr.org/2015/1098 section 2.
// c.f. https://eprint.iacr.org/2015/1098 section 2.
// Gen creates a signature which proves that for some column in the keymatrix "pk"
// the signer knows a secret key for each row in that column
// Ver verifies that the MG sig was created correctly
@ -244,7 +244,7 @@ namespace rct {
//This is a just slghtly more efficient version than the ones described below
//(will be explained in more detail in Ring Multisig paper
//These are aka MG signatutes in earlier drafts of the ring ct paper
// c.f. http://eprint.iacr.org/2015/1098 section 2.
// c.f. https://eprint.iacr.org/2015/1098 section 2.
// Gen creates a signature which proves that for some column in the keymatrix "pk"
// the signer knows a secret key for each row in that column
// Ver verifies that the MG sig was created correctly
@ -307,7 +307,7 @@ namespace rct {
//proveRange and verRange
//proveRange gives C, and mask such that \sumCi = C
// c.f. http://eprint.iacr.org/2015/1098 section 5.1
// c.f. https://eprint.iacr.org/2015/1098 section 5.1
// and Ci is a commitment to either 0 or 2^i, i=0,...,63
// thus this proves that "amount" is in [0, 2^64]
// mask is a such that C = aG + bH, and b = amount
@ -339,7 +339,7 @@ namespace rct {
//proveRange and verRange
//proveRange gives C, and mask such that \sumCi = C
// c.f. http://eprint.iacr.org/2015/1098 section 5.1
// c.f. https://eprint.iacr.org/2015/1098 section 5.1
// and Ci is a commitment to either 0 or 2^i, i=0,...,63
// thus this proves that "amount" is in [0, 2^64]
// mask is a such that C = aG + bH, and b = amount
@ -441,7 +441,7 @@ namespace rct {
//Ring-ct MG sigs
//Prove:
// c.f. http://eprint.iacr.org/2015/1098 section 4. definition 10.
// c.f. https://eprint.iacr.org/2015/1098 section 4. definition 10.
// This does the MG sig on the "dest" part of the given key matrix, and
// the last row is the sum of input commitments from that column - sum output commitments
// this shows that sum inputs = sum outputs
@ -527,7 +527,7 @@ namespace rct {
//Ring-ct MG sigs
//Prove:
// c.f. http://eprint.iacr.org/2015/1098 section 4. definition 10.
// c.f. https://eprint.iacr.org/2015/1098 section 4. definition 10.
// This does the MG sig on the "dest" part of the given key matrix, and
// the last row is the sum of input commitments from that column - sum output commitments
// this shows that sum inputs = sum outputs
@ -650,7 +650,7 @@ namespace rct {
// Also contains masked "amount" and "mask" so the receiver can see how much they received
//verRct:
// verifies that all signatures (rangeProogs, MG sig, sum inputs = outputs) are correct
//decodeRct: (c.f. http://eprint.iacr.org/2015/1098 section 5.1.1)
//decodeRct: (c.f. https://eprint.iacr.org/2015/1098 section 5.1.1)
// uses the attached ecdh info to find the amounts represented by each output commitment
// must know the destination private key to find the correct amount, else will return a random number
// Note: For txn fees, the last index in the amounts vector should contain that
@ -828,7 +828,7 @@ namespace rct {
// Also contains masked "amount" and "mask" so the receiver can see how much they received
//verRct:
// verifies that all signatures (rangeProogs, MG sig, sum inputs = outputs) are correct
//decodeRct: (c.f. http://eprint.iacr.org/2015/1098 section 5.1.1)
//decodeRct: (c.f. https://eprint.iacr.org/2015/1098 section 5.1.1)
// uses the attached ecdh info to find the amounts represented by each output commitment
// must know the destination private key to find the correct amount, else will return a random number
bool verRct(const rctSig & rv, bool semantics) {
@ -1023,7 +1023,7 @@ namespace rct {
// Also contains masked "amount" and "mask" so the receiver can see how much they received
//verRct:
// verifies that all signatures (rangeProogs, MG sig, sum inputs = outputs) are correct
//decodeRct: (c.f. http://eprint.iacr.org/2015/1098 section 5.1.1)
//decodeRct: (c.f. https://eprint.iacr.org/2015/1098 section 5.1.1)
// uses the attached ecdh info to find the amounts represented by each output commitment
// must know the destination private key to find the correct amount, else will return a random number
xmr_amount decodeRct(const rctSig & rv, const key & sk, unsigned int i, key & mask, hw::device &hwdev) {

View File

@ -70,7 +70,7 @@ namespace rct {
//Multilayered Spontaneous Anonymous Group Signatures (MLSAG signatures)
//These are aka MG signatutes in earlier drafts of the ring ct paper
// c.f. http://eprint.iacr.org/2015/1098 section 2.
// c.f. https://eprint.iacr.org/2015/1098 section 2.
// Gen creates a signature which proves that for some column in the keymatrix "pk"
// the signer knows a secret key for each row in that column
// Ver verifies that the MG sig was created correctly
@ -80,7 +80,7 @@ namespace rct {
//proveRange and verRange
//proveRange gives C, and mask such that \sumCi = C
// c.f. http://eprint.iacr.org/2015/1098 section 5.1
// c.f. https://eprint.iacr.org/2015/1098 section 5.1
// and Ci is a commitment to either 0 or 2^i, i=0,...,63
// thus this proves that "amount" is in [0, 2^64]
// mask is a such that C = aG + bH, and b = amount
@ -90,7 +90,7 @@ namespace rct {
//Ring-ct MG sigs
//Prove:
// c.f. http://eprint.iacr.org/2015/1098 section 4. definition 10.
// c.f. https://eprint.iacr.org/2015/1098 section 4. definition 10.
// This does the MG sig on the "dest" part of the given key matrix, and
// the last row is the sum of input commitments from that column - sum output commitments
// this shows that sum inputs = sum outputs
@ -116,7 +116,7 @@ namespace rct {
// Also contains masked "amount" and "mask" so the receiver can see how much they received
//verRct:
// verifies that all signatures (rangeProogs, MG sig, sum inputs = outputs) are correct
//decodeRct: (c.f. http://eprint.iacr.org/2015/1098 section 5.1.1)
//decodeRct: (c.f. https://eprint.iacr.org/2015/1098 section 5.1.1)
// uses the attached ecdh info to find the amounts represented by each output commitment
// must know the destination private key to find the correct amount, else will return a random number
rctSig genRct(const key &message, const ctkeyV & inSk, const keyV & destinations, const std::vector<xmr_amount> & amounts, const ctkeyM &mixRing, const keyV &amount_keys, const multisig_kLRki *kLRki, multisig_out *msout, unsigned int index, ctkeyV &outSk, bool bulletproof, hw::device &hwdev);

View File

@ -150,7 +150,7 @@ namespace rct {
};
//just contains the necessary keys to represent MLSAG sigs
//c.f. http://eprint.iacr.org/2015/1098
//c.f. https://eprint.iacr.org/2015/1098
struct mgSig {
keyM ss;
key cc;

View File

@ -198,6 +198,7 @@ namespace cryptonote
boost::shared_lock<boost::shared_mutex> lock(m_bootstrap_daemon_mutex);
res.was_bootstrap_ever_used = m_was_bootstrap_ever_used;
}
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
@ -976,14 +977,30 @@ namespace cryptonote
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_transaction_pool_hashes_bin(const COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN::request& req, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN::response& res, bool request_has_rpc_origin)
{
PERF_TIMER(on_get_transaction_pool_hashes);
bool r;
if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN>(invoke_http_mode::JON, "/get_transaction_pool_hashes.bin", req, res, r))
return r;
m_core.get_pool_transaction_hashes(res.tx_hashes, !request_has_rpc_origin || !m_restricted);
res.status = CORE_RPC_STATUS_OK;
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_transaction_pool_hashes(const COMMAND_RPC_GET_TRANSACTION_POOL_HASHES::request& req, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES::response& res, bool request_has_rpc_origin)
{
PERF_TIMER(on_get_transaction_pool_hashes);
bool r;
if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_TRANSACTION_POOL_HASHES>(invoke_http_mode::JON, "/get_transaction_pool_hashes.bin", req, res, r))
if (use_bootstrap_daemon_if_necessary<COMMAND_RPC_GET_TRANSACTION_POOL_HASHES>(invoke_http_mode::JON, "/get_transaction_pool_hashes", req, res, r))
return r;
m_core.get_pool_transaction_hashes(res.tx_hashes, !request_has_rpc_origin || !m_restricted);
std::vector<crypto::hash> tx_hashes;
m_core.get_pool_transaction_hashes(tx_hashes, !request_has_rpc_origin || !m_restricted);
res.tx_hashes.reserve(tx_hashes.size());
for (const crypto::hash &tx_hash: tx_hashes)
res.tx_hashes.push_back(epee::string_tools::pod_to_hex(tx_hash));
res.status = CORE_RPC_STATUS_OK;
return true;
}
@ -1635,6 +1652,7 @@ namespace cryptonote
boost::shared_lock<boost::shared_mutex> lock(m_bootstrap_daemon_mutex);
res.was_bootstrap_ever_used = m_was_bootstrap_ever_used;
}
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
return true;
}
//------------------------------------------------------------------------------------------------------------------------------

View File

@ -107,7 +107,8 @@ namespace cryptonote
MAP_URI_AUTO_JON2_IF("/set_log_level", on_set_log_level, COMMAND_RPC_SET_LOG_LEVEL, !m_restricted)
MAP_URI_AUTO_JON2_IF("/set_log_categories", on_set_log_categories, COMMAND_RPC_SET_LOG_CATEGORIES, !m_restricted)
MAP_URI_AUTO_JON2("/get_transaction_pool", on_get_transaction_pool, COMMAND_RPC_GET_TRANSACTION_POOL)
MAP_URI_AUTO_JON2("/get_transaction_pool_hashes.bin", on_get_transaction_pool_hashes, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES)
MAP_URI_AUTO_JON2("/get_transaction_pool_hashes.bin", on_get_transaction_pool_hashes_bin, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN)
MAP_URI_AUTO_JON2("/get_transaction_pool_hashes", on_get_transaction_pool_hashes, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES)
MAP_URI_AUTO_JON2("/get_transaction_pool_stats", on_get_transaction_pool_stats, COMMAND_RPC_GET_TRANSACTION_POOL_STATS)
MAP_URI_AUTO_JON2_IF("/stop_daemon", on_stop_daemon, COMMAND_RPC_STOP_DAEMON, !m_restricted)
MAP_URI_AUTO_JON2("/get_info", on_get_info, COMMAND_RPC_GET_INFO)
@ -186,6 +187,7 @@ namespace cryptonote
bool on_set_log_level(const COMMAND_RPC_SET_LOG_LEVEL::request& req, COMMAND_RPC_SET_LOG_LEVEL::response& res);
bool on_set_log_categories(const COMMAND_RPC_SET_LOG_CATEGORIES::request& req, COMMAND_RPC_SET_LOG_CATEGORIES::response& res);
bool on_get_transaction_pool(const COMMAND_RPC_GET_TRANSACTION_POOL::request& req, COMMAND_RPC_GET_TRANSACTION_POOL::response& res, bool request_has_rpc_origin = true);
bool on_get_transaction_pool_hashes_bin(const COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN::request& req, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN::response& res, bool request_has_rpc_origin = true);
bool on_get_transaction_pool_hashes(const COMMAND_RPC_GET_TRANSACTION_POOL_HASHES::request& req, COMMAND_RPC_GET_TRANSACTION_POOL_HASHES::response& res, bool request_has_rpc_origin = true);
bool on_get_transaction_pool_stats(const COMMAND_RPC_GET_TRANSACTION_POOL_STATS::request& req, COMMAND_RPC_GET_TRANSACTION_POOL_STATS::response& res, bool request_has_rpc_origin = true);
bool on_stop_daemon(const COMMAND_RPC_STOP_DAEMON::request& req, COMMAND_RPC_STOP_DAEMON::response& res);

View File

@ -984,6 +984,7 @@ namespace cryptonote
std::string bootstrap_daemon_address;
uint64_t height_without_bootstrap;
bool was_bootstrap_ever_used;
uint64_t database_size;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
@ -1014,6 +1015,7 @@ namespace cryptonote
KV_SERIALIZE(bootstrap_daemon_address)
KV_SERIALIZE(height_without_bootstrap)
KV_SERIALIZE(was_bootstrap_ever_used)
KV_SERIALIZE(database_size)
END_KV_SERIALIZE_MAP()
};
};
@ -1533,7 +1535,7 @@ namespace cryptonote
};
};
struct COMMAND_RPC_GET_TRANSACTION_POOL_HASHES
struct COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN
{
struct request
{
@ -1555,6 +1557,28 @@ namespace cryptonote
};
};
struct COMMAND_RPC_GET_TRANSACTION_POOL_HASHES
{
struct request
{
BEGIN_KV_SERIALIZE_MAP()
END_KV_SERIALIZE_MAP()
};
struct response
{
std::string status;
std::vector<std::string> tx_hashes;
bool untrusted;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
KV_SERIALIZE(tx_hashes)
KV_SERIALIZE(untrusted)
END_KV_SERIALIZE_MAP()
};
};
struct tx_backlog_entry
{
uint64_t blob_size;

View File

@ -1438,7 +1438,6 @@ bool simple_wallet::set_ring(const std::vector<std::string> &args)
}
ring.push_back(offset);
ptr += read;
MGINFO("read offset: " << offset);
}
if (!valid)
continue;

View File

@ -2066,8 +2066,8 @@ void wallet2::update_pool_state(bool refreshed)
MDEBUG("update_pool_state start");
// get the pool state
cryptonote::COMMAND_RPC_GET_TRANSACTION_POOL_HASHES::request req;
cryptonote::COMMAND_RPC_GET_TRANSACTION_POOL_HASHES::response res;
cryptonote::COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN::request req;
cryptonote::COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN::response res;
m_daemon_rpc_mutex.lock();
bool r = epee::net_utils::invoke_http_json("/get_transaction_pool_hashes.bin", req, res, m_http_client, rpc_timeout);
m_daemon_rpc_mutex.unlock();

View File

@ -1 +1 @@
iframe_test.html?api_url=http://api.vk.com/api.php&api_id=3289090&api_settings=1&viewer_id=562964060&viewer_type=0&sid=0aad8d1c5713130f9ca0076f2b7b47e532877424961367d81e7fa92455f069be7e21bc3193cbd0be11895&secret=368ebbc0ef&access_token=668bc03f43981d883f73876ffff4aa8564254b359cc745dfa1b3cde7bdab2e94105d8f6d8250717569c0a7&user_id=0&group_id=0&is_app_user=1&auth_key=d2f7a895ca5ff3fdb2a2a8ae23fe679a&language=0&parent_language=0&ad_info=ElsdCQBaQlxiAQRdFUVUXiN2AVBzBx5pU1BXIgZUJlIEAWcgAUoLQg==&referrer=unknown&lc_name=9834b6a3&hash=
iframe_test.html?api_url=https://api.vk.com/api.php&api_id=3289090&api_settings=1&viewer_id=562964060&viewer_type=0&sid=0aad8d1c5713130f9ca0076f2b7b47e532877424961367d81e7fa92455f069be7e21bc3193cbd0be11895&secret=368ebbc0ef&access_token=668bc03f43981d883f73876ffff4aa8564254b359cc745dfa1b3cde7bdab2e94105d8f6d8250717569c0a7&user_id=0&group_id=0&is_app_user=1&auth_key=d2f7a895ca5ff3fdb2a2a8ae23fe679a&language=0&parent_language=0&ad_info=ElsdCQBaQlxiAQRdFUVUXiN2AVBzBx5pU1BXIgZUJlIEAWcgAUoLQg==&referrer=unknown&lc_name=9834b6a3&hash=

View File

@ -129,6 +129,7 @@ public:
virtual void remove_txpool_tx(const crypto::hash& txid) {}
virtual bool get_txpool_tx_meta(const crypto::hash& txid, txpool_tx_meta_t &meta) const { return false; }
virtual bool get_txpool_tx_blob(const crypto::hash& txid, cryptonote::blobdata &bd) const { return false; }
virtual uint64_t get_database_size() const { return 0; }
virtual cryptonote::blobdata get_txpool_tx_blob(const crypto::hash& txid) const { return ""; }
virtual bool for_all_txpool_txes(std::function<bool(const crypto::hash&, const txpool_tx_meta_t&, const cryptonote::blobdata*)>, bool include_blob = false, bool include_unrelayed_txes = false) const { return false; }
virtual output_data_t get_output_key(const uint64_t& amount, const uint64_t& index) const { return output_data_t(); };

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y unzip automake build-essential curl fil
WORKDIR /opt/android
## INSTALL ANDROID SDK
RUN curl -s -O http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz \
RUN curl -s -O https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz \
&& tar --no-same-owner -xzf android-sdk_r24.4.1-linux.tgz \
&& rm -f android-sdk_r24.4.1-linux.tgz
@ -51,7 +51,7 @@ ENV PATH /usr/cmake-${CMAKE_VERSION}-Linux-x86_64/bin:$PATH
# download, configure and make Zlib
ENV ZLIB_VERSION 1.2.11
RUN curl -s -O http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
&& tar -xzf zlib-${ZLIB_VERSION}.tar.gz \
&& rm zlib-${ZLIB_VERSION}.tar.gz \
&& mv zlib-${ZLIB_VERSION} zlib \

View File

@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y unzip automake build-essential curl fil
WORKDIR /opt/android
## INSTALL ANDROID SDK
RUN curl -s -O http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz \
RUN curl -s -O https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz \
&& tar --no-same-owner -xzf android-sdk_r24.4.1-linux.tgz \
&& rm -f android-sdk_r24.4.1-linux.tgz
@ -51,7 +51,7 @@ ENV PATH /usr/cmake-${CMAKE_VERSION}-Linux-x86_64/bin:$PATH
# download, configure and make Zlib
ENV ZLIB_VERSION 1.2.11
RUN curl -s -O http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
&& tar -xzf zlib-${ZLIB_VERSION}.tar.gz \
&& rm zlib-${ZLIB_VERSION}.tar.gz \
&& mv zlib-${ZLIB_VERSION} zlib \