Age | Commit message (Collapse) | Author | Files | Lines |
|
In particular, <boost/program_options.hpp> blows up daemon.cpp.obj,
making it too big to compile in debug mode on Win32. Even on a
release build it drops daemon.cpp.o on Linux from 31MB to 20MB.
This has no effect on the final linked binary size.
|
|
75fd96d Revert connection limit to more customary 8 (Javier Smooth)
|
|
d462c62 db_lmdb: always use a batch tx if possible (moneromooo-monero)
|
|
a74cc1b hardfork: only accept major versions we know about (moneromooo-monero)
|
|
cb4ee1b Tone down L0 logs during daemon sync some more (moneromooo-monero)
2177923 Tone down a bit L0 logs during daemon sync (moneromooo-monero)
|
|
|
|
Also wrap that code in two prefix/suffix macros so they are
easier to use and not forget. Also add consts to returned data
casts where applicable.
|
|
|
|
|
|
|
|
We need to stop the p2p layer, which causes the rest to shutdown
gracefully. Hitting ^C was still going through another path.
|
|
7f77b23 posix_daemonizer: only create the main daemon object in the last child (moneromooo-monero)
|
|
79ff6a5 Add LMDB error string to database transaction exception message (warptangent)
|
|
cbded43 core_tests: fix ring_signature_1 tests (moneromooo-monero)
c3d208f core_tests: bump default test fee to 0.02 monero (moneromooo-monero)
10da0a0 add a --fakechain argument for tests (moneromooo-monero)
eee44e6 unit_tests: fix block reward test using post hard fork settings (moneromooo-monero)
595893f blockchain: log block (not chain) height in "BLOCK SUCCESFULLY ADDED" (moneromooo-monero)
2369968 blockchain: fix off by one in get_blocks (moneromooo-monero)
8af913a db_lmdb: implement BlockchainLMDB::reset (moneromooo-monero)
4833f4f db_bdb: implement BlockchainBDB::reset (moneromooo-monero)
18bf06e tx_pool: fix "minumim" typo in message (moneromooo-monero)
44f1267 tests: fix a typo in test name (moneromooo-monero)
1494557 db_lmdb: create all needed directories, not just the leaf one (moneromooo-monero)
015b68a db_bdb: create all needed directories, not just the leaf one (moneromooo-monero)
f141869 tests: remove data-dir argument registration (moneromooo-monero)
|
|
0198306 Stop displaying internal commands for --help (luigi1111)
189d516 simplewallet help & error cleanup (luigi1111)
|
|
This prevents the intermediate thread from exiting properly, as
fork creates a child process with only one thread, so any existing
data_logger thread will not be in the child. Since this thread
sets a flag the data_logger dtor blocks on, all children threads
will hang on exit.
|
|
When throwing an exception from being unable to begin an LMDB
transaction, include the reason.
It's often been due to a write transaction attempted within a write
transaction (batch mode), but there can be other reasons such as write
transaction attempted while database was opened read only, or
environment's map needs to be resized.
|
|
The core tests use the blockchain, and reset it to be able
to add test data to it. This does not play nice with the
databases, since those will save that data without an explicit
save call.
We add a fakechain flag that the tests will set, which tells
the core and blockchain code to use a separate database, as
well as skip a few things like checkpoints and fixup, which
only make sense for real data.
|
|
This makes it log the same height as the original code, which is
less confusing when comparing behaviors.
|
|
|
|
It is needed by the core tests
|
|
It is needed by the core tests
|
|
|
|
|
|
|
|
Displaying in-program commands with --help doesn't match daemon
behaviour (or make sense)
|
|
Typos, grammar, consistency. I don't claim to have gotten everything.
|
|
Data is only guaranteed to be valid within the lifetime of a txn.
You cannot use data returned from LMDB after the txn ends.
Also, fixed a missing txn.commit BlockchainLMDB::get_tx_unlock_time()
|
|
336b375 Register daemon command line arguments to core if they're used in core (moneromooo-monero)
|
|
This fixes coretests, which does not register daemon specific arguments,
but uses core, which uses those arguments. Also gets rid of an unwanted
dependency on daemon code from core.
|
|
2c83055 net_node: add a --offline argument (moneromooo-monero)
|
|
f746434 daemon: add mining status to the status command (moneromooo-monero)
|
|
1c8262c db_bdb: move log_set_config call before open (moneromooo-monero)
|
|
8620b31 db_bdb: support for libdb without DB_FORCESYNC (moneromooo-monero)
|
|
34e3889 p2p: failure to load p2pstate.bin is not fatal anymore (moneromooo-monero)
|
|
a98e976 blockchain_db: fixup missing key images in early DB version (moneromooo-monero)
|
|
It will not try to connect to the monero network, nor listen
|
|
|
|
This is a precaution for older Berkeley DB versions.
- smooth reports an issue running with 4.7:
DB_ENV->log_set_config: DB_LOG_IN_MEMORY: method not permitted
after handle's open method
- this works just fine with 5.3
- we do not use DB_LOG_IN_MEMORY, but we use DB_LOG_AUTO_REMOVE
- libdb docs say some flags must be set before open, and some
may be set at any time, but never say some must be set after
open
- moving the call to log_set_config before open works with 5.3
Therefore, it seems best to move the call before open.
|
|
|
|
Clear any partially loaded data, and start with a default config
|
|
Early DB versions did not store key images for inputs if the
transaction spending them had no outputs (ie, all fee). This
is not correct, as this would allow these outputs to be double
spent. This was fixed in 533acc30eda7792c802ea8b6417917fa99b8bc2b
a few months ago, but databases having synced blocks 2021612 and
685498 with a faulty version will be missing those key images
in the spent keys database. This code checks for this, and adds
those key images if they are missing.
|
|
instead of a command line setting. It makes sense that is is
a long lived setting.
|
|
|
|
1965fce wallet: add a stop_wallet RPC call (moneromooo-monero)
|
|
|
|
|
|
Berkeley DB uses 1 based indices for RECNO databases, and the
implementation of BlockchainDB for Berkeley DB assumes 1 based
indices are passed to the API, whereas the LMDB one assumes
0 based indices. This is all internally consisteny, but since
the BDB code stores 1 based indices in the database, external
users have to be aware of this, as the indices will be off by
one depending on which DB is used.
|
|
Keys in Berkeley DB are 32 bits. We don't want to read random
bits in the high part.
|
|
0921f5b util: use putenv instead of setenv for mingw (moneromooo-monero)
|
|
|
|
This reverts commit c6bf73131aaf804cb17f24c856f826be2761a566, reversing
changes made to 8a52cf4055d247dd4b162985c931e99683992e3c.
|
|
36a298c simplewallet: add tr markers in a few missing user visible strings (moneromooo-monero)
|
|
^C while in manual refresh will cancel the refresh, since that's
often an annoying thing to have to wait for. Also, a manual refresh
command will interrupt any running background refresh and take
over, rather than wait for the background refresh to be done, and
look to be hanging.
|
|
66849ac simplewallet: swap colors in show_transfers (moneromooo-monero)
|
|
|
|
3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
|
|
62e49a5 wallet: optional automatic refresh from the daemon (moneromooo-monero)
|
|
e45a8c9 core: serialize block major/minor versions as bytes, not varints (moneromooo-monero)
|
|
7574297 core_rpc_server: add a --restricted-rpc option (moneromooo-monero)
|
|
9ee48e9 wallet2: speed up wallet refresh for large miners (moneromooo-monero)
4905903 wallet2: parallelize pulling blocks and processing them on refresh (moneromooo-monero)
d0eaf1d wallet2: maintain the short chain manually when refreshing (moneromooo-monero)
a4e9506 wallet2: split pull blocks between pulling and processing (moneromooo-monero)
|
|
55e5a33 rpc: pass current block target in rpc (moneromooo-monero)
|
|
Green is now used for incoming transfers, and magenta for outgoing
transfers. This is consistent to the scheme used by other logging.
|
|
|
|
|
|
The daemon will be polled every 90 seconds for new blocks.
It is enabled by default, and can be turned on/off with
set auto-refresh 1 and set auto-refresh 0 in the wallet.
|
|
This allows them to be saved as a fixed (one byte) chunk whatever
the value. Using a varint will use two bytes as the high bit gets
set.
This is backward compatible with current usage (0-2 values).
|
|
It does not expose the RPC for commands like start_mining, etc
(ie, commands a public node operator might want to be restricted)
|
|
This needed locking the use of m_http_client, to avoid collisions
in I/O.
|
|
|
|
|
|
This fixes the hash rate being wrong on testnet after the switch
to 2 minute blocks
|
|
|
|
m_blocked_ips now stores the unblocking time, rather than the
blocking time.
Also change > to >=, since banning for 0 seconds should not ban
|
|
|
|
d887c18 hardfork: fix more major/minor issues (moneromooo-monero)
3b47ca2 hardfork: fix rescan on load (moneromooo-monero)
4cea2b1 Add IP blocking for misbehaving nodes (adapted from Boolberry) (Javier Smooth)
9c64b12 quiet down p2p logging a bit (Javier Smooth)
53c75ab blockchain: log versions as numbers, not characters (moneromooo-monero)
edade8d hardfork: fix actual/voting confusion (moneromooo-monero)
|
|
06c8b94 daemon: fix blockchain height display not updating after sync (moneromooo-monero)
|
|
410c6cf cn_deserialize: a new tool to decode blocks and transactions (moneromooo-monero)
|
|
3d0b3c5 add recent static checkpoint (Javier Smooth)
|
|
9b945f5 wallet: make the refresh optimizations selectable via command line (moneromooo-monero)
d2c0313 wallet: speedup refresh from daemon (moneromooo-monero)
ea707c7 wallet2: minor cleanup (moneromooo-monero)
55a2da7 wallet2: speedup refresh a bit (moneromooo-monero)
|
|
Also add some more tests, and rename some instances of
"version" and "add" for clarity.
NOTE: the starting height values are sometimes wrong.
I suspect this is due to the hard fork reorg code being
buggy, since they're good when syncing after the fact.
However, they're not actually used by the consensus code,
so I'm ignoring this for now, but this needs debugging.
|
|
|
|
With minor cleanup and fixes (spelling, indent) by moneromooo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Take the opportunity to add a no-coinbase case too, for even faster
sync when an address is known to never have mined to.
|
|
328636c fixed testnet fork point, added comment data back in (Riccardo Spagni)
aed3038 disable time-stats by default, tweak fast-block-sync description (Riccardo Spagni)
8fe1111 update v2 testnet fork height (Riccardo Spagni)
4d74510 checkpoints update (Riccardo Spagni)
|
|
Assume the whole of a coinbase goes to the same address (so that
if the first output isn't for us, none of it is), and only look
for payment id when we received something in the transaction.
|
|
- use std::vector::std::deque to not leak when exceptions happen
- use std::unique_ptr instead of the deprecated std::auto_ptr
|
|
Use the NoodleDoodle threading technique to speedup a couple
code blocks on the main path when refreshing blocks without
any transactions for us.
|
|
|
|
db1fb66 wallet: storing outgoing tx info now defaults to enabled (moneromooo-monero)
9156ba3 wallet: rename store-tx-keys to store-tx-info (moneromooo-monero)
b3d4d41 wallet: improve show_transfers (moneromooo-monero)
725ae4e wallet: use incoming blocks to keep track of payments too (moneromooo-monero)
00790a8 simplewallet: lessen display flicker confusion (moneromooo-monero)
|
|
The info is stored encrypted, and is pretty useful, often after
the fact.
|
|
With backward compatibility
|
|
More information is now saved and displayed
|
|
|
|
|
|
|
|
|
|
Height seemed to be flying all over the place on a rescan here.
Logging to a file shows the heights are actually correct, and
this is some kind of screen refresh artifact. Flush after \r
and update less often to reduce this effect a lot.
|
|
f3724ae Fix startup crash when using a locale boost does not like (moneromooo-monero)
0c1dae3 i18n: allow language to be passed as a parameter (moneromooo-monero)
|
|
There are various locale related bugs in various versions of boost,
where exceptions are thrown in boost::filesystem APIs when the
current locale is not to boost's liking. It's not clear what "not
to boost's liking" means in detail, though "en" and "en_US.UTF-8"
are not to its liking.
Fix it by running a test function that's known to throw in such
a case, and resetting LANG and LC_ALL to C if an exception is
thrown. In simplewallet, the locale is queried before that so the
correct translations will still be used.
|
|
If empty, it will still be fetched from the environment
|
|
The last relayed time of a transaction is maintained, and
transactions will be relayed again if they are still in the
pool after a certain amount of time, which increases with
the transaction's age. All such transactions are resent,
whether or not they originated on the local node.
|
|
baf101e More changes for 2-min blocks Use the correct block time for realtime fuzz on locktime Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting) Lock unit tests to original block time for now (Javier Smooth)
4fea1a5 Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block version 2 (Javier Smooth)
|
|
3f611bc wallet: track outgoing payments and add a show_transfers command (moneromooo-monero)
|
|
It's a user friendly display of incoming and outgoing transfers,
listed by height, within an optional height range.
|
|
It looks like some of the indices passed to the DB access functions
are already bumped by 1. Moreover, the existing code was not
throwing DB errors with 0 keys, and this is unlikely if it really
was using 0 keys. Last, this patch broke sync from scratch in at
least one case. So I'm calling it bad and reverting it.
This reverts commit bfc97401ae81bb30278a318de7f048c653bf6582.
|
|
Use the correct block time for realtime fuzz on locktime
Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting)
Lock unit tests to original block time for now
|
|
version 2
|
|
It returns the ideal version for a given height, which is
based on the minimum height for a fork, disregarding votes
|
|
And setup the first fork to not vote
|
|
b1d0c8a blockchain_dump: fix build without berkeley db (moneromooo-monero)
|
|
|
|
The default default mixin is 4. It can now be changed per wallet.
|
|
|
|
051ddbc rpc: fix start_mining and status RPC crashes (moneromooo-monero)
|
|
bc110af blockchain_utilities: properly exit on error (moneromooo-monero)
|
|
4f873bc Remove some old/obsolete/unused code (moneromooo-monero)
|
|
e70d2e5 common: const and init list pedantry (moneromooo-monero)
|
|
6df4e67 Fix a possibly-unused warning, and rationalize types (moneromooo-monero)
|
|
They check whether they're running on testnet by accessing the
m_rpc_server object, which does not exist when in RPC mode.
Also, fix hard_fork_info being called with the wrong API.
|
|
Replace boolean values and exceptions where appropriate
|
|
git history's here if needed to get any of this back
|
|
|
|
|
|
3e89df4 Build fixes for the old blockchain_storage version (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
06c65cb rpc: fix hard_fork_info RPC (moneromooo-monero)
6f5c129 rpc: fix a few commands not working as command line (moneromooo-monero)
|
|
9caf52b daemon: add a status command (moneromooo-monero)
|
|
ecbb732 Fix leak on real output when using a very recent output (moneromooo-monero)
|
|
43bca0d blockchain_utilities: new blockchain_dump diagnostic tool (moneromooo-monero)
5f397e4 Add functions to iterate through blocks, txes, outputs, key images (moneromooo-monero)
0a5a5e8 db_bdb: record numbers for recno databases start at 1 (moneromooo-monero)
50dfdc0 db_bdb: DB_KEYEMPTY is also not found for non-top recon fields (moneromooo-monero)
572780e blockchain_db: use the DNE exceptions where appropriate (moneromooo-monero)
|
|
I had never tested it, obviously
|
|
The method name to the "json_rpc" commands are names, not part
of URLs.
|
|
Displays current block height and target, net hash, hard fork
basic info, and connections.
Useful as a basic user friendly "what's going on here" command.
|
|
The wallet and the daemon applied different height considerations
when selecting outputs to use. This can leak information on which
input in a ring signature is the real one.
Found and originally fixed by smooth on Aeon.
|
|
It dumps data from the blockchain to a JSON format, and is
intended to help detect differences between data held in
different database formats.
|
|
|
|
|
|
|
|
|
|
Using major version would cause older daemons to reject those
blocks as they fail to deserialize blocks with a major version
which is not 1. There is no such restriction on the minor
version, so switching allows older daemons to coexist with
newer ones till the actual fork date, when most will hopefully
have updated already.
Also, for the same reason, we consider a vote for 0 to be a
vote for 1, since older daemons set minor version to 0.
|
|
Also make the number of blocks endian independant, and add
support for testnet
|
|
This will happen if the chosen output file does not have a
path specified
|
|
It speeds up a lot, which can be significant when reorganizing
from the genesis block to create the hard fork data.
|
|
There is no need to fully recalculate and rewrite state, just
refill state from the DB.
|
|
5ea2f93 wallet2: really include non canonical outputs in dust sweep (moneromooo-monero)
|
|
253ed76 core_rpc_server: add optional json decoded tx to COMMAND_RPC_GET_TRANSACTIONS (moneromooo-monero)
ca23c0e core_rpc_server: add a getblock RPC command, and fix print_block (moneromooo-monero)
|
|
It allows one to check the amount of monero sent to a particular
address in a particular transaction, given that transaction's tx key
|
|
|
|
|
|
|
|
because it leaks your standard address
|
|
df8a110 simplewallet: add a --trusted-daemon flag (moneromooo-monero)
|
|
It allows enabling the rescan_spent command only for trusted
daemon
|
|
As recommended in MRL-0004
|
|
The wallet decomposes fully as of now too.
|
|
The small leftover is carried forward
|
|
|
|
ee27559 Update to compile with latest miniupnpc (warptangent)
|
|
180bcde build: default to Berkeley DB for 32 bit and ARM (moneromooo-monero)
791d8cb db_bdb: fix hard fork keys (moneromooo-monero)
|
|
upnpDiscover() takes a new argument for TTL.
Use the suggested default of 2.
|
|
|
|
Berkeley DB requires RECNO keys to be 32 bits, and forbids a key
value of 0.
|
|
An unsigned quantity is always >= 0
|
|
33affd2 blockchain: on hardfork 2, require mixin 2 at least if possible (moneromooo-monero)
434e0f4 hardfork: make the voting window a week (moneromooo-monero)
0a7421b hardfork: rescan speedup (moneromooo-monero)
fec98b8 hardfork: remove use of GNU extension for initializing object (moneromooo-monero)
4bbf944 blockchain: on hardfork 2, allow miners to claim less money than allowed (moneromooo-monero)
088bc56 hardfork: change window semantics to not count the newly added block (moneromooo-monero)
198f557 blockchain: use different hard fork settings for testnet and mainnet (moneromooo-monero)
|
|
151c32d dns_utils: fix wrong asserts (moneromooo-monero)
|
|
|
|
|
|
Add a block height before which version 1 is assumed
Use DB transactions
|
|
|
|
So they can avoid dust if they so wish
|
|
This allows knowing the hard fork a block must obey in order to be
added to the blockchain. The previous semantics would use that new
block's version vote to determine this hard fork, which made it
impossible to use the rules to validate transactions entering the
tx pool (and made it impossible to validate a block before adding
it to the blockchain).
|
|
|
|
Braino.
|
|
There will be a delay on first load of an existing blockchain
as it gets reparsed for this state data.
|
|
I coded the whole thing from scratch.
|
|
|
|
Since the state isn't actually saved anywhere, as the archive
code isn't called in the new DB version.
|
|
|
|
|
|
|
|
This keeps track of voting via block version, in order to decide
when to enable a particular fork's code.
|
|
|
|
3c10239 unbound: use the mini event fallback implementation (moneromooo-monero)
4e138a0 dns_utils: remove unnecessary string conversion (moneromooo-monero)
f928468 dns_utils: factor the fetching code for different DNS record types (moneromooo-monero)
4ef0da1 dns_utils: simplify string handling and fix leak (moneromooo-monero)
ae5f28c dns_utils: add a const where possible (moneromooo-monero)
f43d465 dns_utils: lock access to the singleton (moneromooo-monero)
5990344 dns: make ctor private (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
This avoids races which could result in two objects being created
|
|
This ensures one can't instanciate a DNSResolver object by
mistake, but uses the singleton. A separate create static
function is added for cases where a new object is explicitely
needed.
|
|
(disabling it was unintentional)
|
|
5dc53c2 wallet: use mutex protected random generation api (moneromooo-monero)
|