Commit graph

503 commits

Author SHA1 Message Date
moneromooo-monero ac9346637a
rpc: add a "is an update available" flag in get_info
Make it easier for a user to be told when to update
2018-09-14 09:28:03 +00:00
doy-lee f8d12478c2 Merge commit '2771a18' into LokiMergeUpstream20180821 2018-09-14 15:40:55 +10:00
doy-lee ae4d7e4465 Merge commit 'a830db25775f7b708210e736154caf147ddf0ef3' into LokiMergeUpstream20180821 2018-09-13 18:42:56 +10:00
doy-lee ca464be3bd Merge commit 'ed2c81e' into LokiMergeUpstream20180821 2018-09-13 18:42:49 +10:00
moneromooo-monero 8d769392d9 replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-09-13 18:31:35 +10:00
doy-lee 0b166ffaa3 Merge branch 'dev' into LokiMergeUpstream20180821 2018-09-13 17:46:15 +10:00
jcktm 76657697ef Revert "core: fix type mismatch between function and declaration"
This reverts commit 0349e183ca.

Revert "Merge pull request #197 from Doy-lee/BlockchainPopBlocksCommand"

This reverts commit 0796630ffa, reversing
changes made to b73aa8ee1c.
2018-09-12 16:32:28 +10:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
moneromooo-monero c444b1b229
require canonical multi output bulletproof layout 2018-09-11 13:37:39 +00:00
moneromooo-monero 2a8fcb421b
Bulletproof aggregated verification and tests
Also constrains bulletproofs to simple rct, for simplicity
2018-09-11 13:37:37 +00:00
moneromooo-monero bacf0a1e2f
bulletproofs: add aggregated verification
Ported from sarang's java code
2018-09-11 13:37:32 +00:00
jcktm 0796630ffa
Merge pull request #197 from Doy-lee/BlockchainPopBlocksCommand
Blockchain pop_blocks command
2018-09-11 18:07:55 +10:00
Doyle 25292b3e86 Version 0.4.0 Release Candidate (#216)
* core: submit uptime proof immediately after registering

* Increase visibility of autostaking prompts

* quorum_cop: changed uptime proof prune timeout to 2 hours 10 minutes

* cleanup: removed scope limiting block

* check_tx_inputs: fix deregister double spend test to include deregisters from other heights

* config: new testnet network id, genesis tx, and version bump

* wallet2: fix testnet wallet blockheight approximation

* Fix change in address format in RPC which broke parsing and pooling contributors (#184)

* Fix service node endpoints for RPC to also use stdout (#185)

* fixed some further rct core tests (#180)

* Fix service node state by calling detached hooks on failure to switch to alt chain (#188)

* fixed block verification core tests (#186)

* fixed block verification core tests

* core tests: removed gen_block_miner_tx_out_is_small which is only relevant to hardfork version 1

*  Don't consider expired deregistrations when filling block template

* Add unit tests for getting staking requirement (#191)

* First service node test (#190)

* core_tests: added service node tests

* core_tests: check balance after registration tx

* Fix underflow for popping rollback events (#189)

* Move deregistration age check into check_tx_inputs

* Zero initialise rct_signatures member txnFee is a uint64_t and has uninit values

* Enforce that deregisters must be 0 fee since we skip checks

* Add unit tests for vote validation (#193)

* Add unit tests for deregistration validation (#194)

* Mainnet checkpoint 86535, testnet 3591, 4166

* Bump version number

* Add print_sr for getting staking requirement (#198)

* Misc bugfixes (#203)

* removed unnecessary cast to double during txfee+coinbase calculation

* simplewallet: increased autostaking interval from 2 minutes to 40

* Fix casting issues from uint to int (#204)

* core_tests: check service node registration and expiration (#195)

* core_tests: check service node registration and deregistration

* core_tests for service nodes:

- include service nodes rewards when calculating account's balance
- check that service nodes rewards have been received

* fixed namespace error; reduced the scope of staking requirement constants

* On blockchain inc/dec mark deregisters relayble based on age (#201)

* Service nodes restore only 1 rollback bug (#206)

* Fix restore 1 rollback event, ensure prevent rollback is always added

* Remove adding prevent_rollback event at init

It gets called in on block added generic anyway.

* Log db exception, fix relation operators for vote/deregister lifetime (#207)

* Filter relayable deregisters w/ check_tx_inputs instead of blockchain callbacks

* Bump version to 0.3.7-beta

* fix build with GCC 8.1.0 (#211)

* Add temp hardfork rule in testnet for deregister lifetimes (#210)

* Update testnet, remove testnet forks, remove checkpoints, update blockheight estimate (#212)

* Don't ban peers for a bad vote, just drop their connection (#213)

* Update to version 0.3.0 release candidate (#215)
2018-09-07 17:42:48 +10:00
Doyle T 54d91548de Merge branch 'dev' into LokiMergeUpstream 2018-09-05 12:07:29 +10:00
Doyle T 3273e02670 Add pop blocks command which is helpful for "unstucking" your chain 2018-09-04 19:38:16 +10:00
Doyle 7a39586536
Log db exception, fix relation operators for vote/deregister lifetime (#207) 2018-09-04 19:17:17 +10:00
Doyle T c9e7a68c6d Mainnet checkpoint 86535, testnet 3591, 4166 2018-08-31 13:26:25 +10:00
Maxim Shishmarev 93302c19ff First service node test (#190)
* core_tests: added service node tests

* core_tests: check balance after registration tx
2018-08-29 15:53:13 +10:00
jcktm d95d69d3c2 cleanup: removed scope limiting block 2018-08-23 16:11:59 +10:00
jcktm de78b6d5cd core: submit uptime proof immediately after registering 2018-08-22 20:47:32 +10:00
moneromooo-monero ccb0a48ca3 core: lock incoming tx lock when checking the txpool and chain
This gets rid of an innocuous race trying to add the same tx
twice to the txpool
2018-08-21 12:59:04 +10:00
moneromooo-monero e517a7c720 core: remove threadpool dependency from header 2018-08-21 12:59:04 +10:00
Doyle T b8e0a65ba5 Merge branch 'dev' into LokiMergeUpstream 2018-08-21 12:45:50 +10:00
Doyle T 1f8e81afe3 Move error logging of verfication context to one function 2018-08-20 14:21:56 +10:00
jcktm a29c3a8eb3 simplewallet: added autostaking 2018-08-17 16:21:03 +10:00
jcktm 96b395574a
Merge pull request #156 from tewinget/loki-store-service-node-data
Loki store service node data
2018-08-17 12:22:23 +10:00
Doyle T 97b4ed900b Merge commit '13d73d9' into LokiMergeUpstream 2018-08-17 11:47:44 +10:00
Doyle f3b43dd8c3 Fix assigning the last voter as the deregistration voter 7 times (#157) 2018-08-16 16:28:12 +10:00
Thomas Winget 06b6c738a7 Revert "Revert "Store Service Node State to DB as Blob (#125)" (#127)"
This reverts commit c4988f5a1f.

This un-reverts the changes to store the service node info in the
database.  This could easily just be its own commit instead of a
revert, but doing a revert is amusing (and easier in this case).
2018-08-15 23:38:06 -04:00
Doyle f55b9b1b82
Service Nodes States Endpoint (#145)
* Add get_service_node_list_state command for analytics

* Update service_node_list_state to search particular pubkey

* Service node list state sorts display results by longest waiting

* Fix up leftover todos/unused data structures

* Change get_service_node_list_state to print_sn
2018-08-15 12:59:05 +10:00
jcktm a0e6cee7fe changed invalid vote message from error to info (#136) 2018-08-13 10:51:27 +10:00
moneromooo-monero b278b83860
core: sync database based on bytes added, not blocks added
Blocks have a very wide range, whereas actual size is the relevant
quantity to consider when syncing
2018-08-12 16:13:46 +00:00
jcktm c4988f5a1f Revert "Store Service Node State to DB as Blob (#125)" (#127)
This reverts commit 591fda78f0.
2018-08-08 18:51:14 +10:00
Doyle 591fda78f0 Store Service Node State to DB as Blob (#125)
* store service node state as a blob in db

* add height to service node list storage
2018-08-08 16:31:20 +10:00
Doyle T 5435e3327e Add RPC call for getting snode register command 2018-08-03 13:52:09 +10:00
jcktm bffd7c2d34
Per output unlock time rebased (#114)
* add per-output unlock time field to transaction class

* get output unlock time (and relevant const fixes)

* move output unlocked check to separate function

* tx unlocked -> output unlocked in Blockchain

* per output unlock in tx creation; needs fork rules and testing

* per output unlock in tx prefix so it is signed...

also fix a couple typos/goofs

* wallet: check if using per output unlock time

* add rules.h and rules.cpp.  git woopsie.

* update test for BlockchainDB changes

* Change tx v3 deregister to be a bool in tx header

* service_node_list: handle per output unlock times in contribution txs

* transaction: added verification of unlock_times.size()
2018-08-03 11:39:28 +10:00
jcktm 71ca8a8fc9 tvc: added missing auto val init for tvc 2018-08-03 10:55:37 +10:00
jcktm ace26fc0cd quorum_cop: added quorum cop and service node keys to lokid
Submit deregistration autonomously, prune uptime_proofs

Move pruner to relayer, fix inf. loop, quorum participation bool return

find_if, fix reorg logic, make 2hrs check a variable

Add iterator assign on erase, adjust detached check

qacop: review iteration, changed warnings and std::find call

Accept proofs excluding the added time buffer
2018-08-02 18:58:19 +10:00
jcktm dcf1cc54d9 pooled staking: renamed contributor cut to portions 2018-07-31 15:18:37 +10:00
jcktm aab30bb9e0 service node registration: misc bugfixes and pooled registration contributions 2018-07-31 15:18:37 +10:00
jcktm 41103edbcd service node registration: add signatures from service node pubkey to registration 2018-07-28 10:49:56 +10:00
Doyle T b43c207462 Check that inputs/outputs size is 0 for deregister 2018-07-25 13:11:56 +10:00
luigi1111 025187e6c9
Merge pull request #3854
149da42 db_lmdb: enable batch transactions by default (stoffu)
34cb6b4 add --regtest and --fixed-difficulty for regression testing (vicsn)
9e1403e update get_info RPC and bump RPC version (vicsn)
207b66e first new functional tests (vicsn)
2018-07-19 13:35:25 -05:00
Doyle fb66b7e00b Service Node Deregister Part 5 (#89)
* Retrieve quorum list from height, reviewed

* Setup data structures for de/register TX

* Submit and validate partial/full deregisters

* Add P2P relaying of partial deregistration votes

* Code review adjustments for deregistration part 1

 - Fix check_tx_semantic
 - Remove signature_pod as votes are now stored as blobs. Serialization
   overrides don't intefere with crypto::signature anymore.

* deregistration_vote_pool - changed sign/verify interface and removed repeated code

* Misc review, fix sign/verify api, vote threshold

* Deregister/tx edge case handling for combinatoric votes

* core, service_node_list: separated address from service node pubkey

* Retrieve quorum list from height, reviewed

* Setup data structures for de/register TX

* Submit and validate partial/full deregisters

* Add P2P relaying of partial deregistration votes

* Code review adjustments for deregistration part 1

 - Fix check_tx_semantic
 - Remove signature_pod as votes are now stored as blobs. Serialization
   overrides don't intefere with crypto::signature anymore.

* deregistration_vote_pool - changed sign/verify interface and removed repeated code

* Misc review, fix sign/verify api, vote threshold

* Deregister/tx edge case handling for combinatoric votes

* Store service node lists for the duration of deregister lifetimes

* Quorum min/max bug, sort node list, fix node to test list

* Change quorum to store acc pub address, fix oob bug

* Code review for expiring votes, acc keys to pub_key, improve err msgs

* Add early out for is_deregistration_tx and protect against quorum changes

* Remove debug code, fix segfault

* Remove irrelevant check for tx v3 in blockchain, fix >= height for pruning quorum states

Incorrect assumption that a transaction can be kept in the chain if it could
eventually become invalid, because if it were the chain would be split and
eventually these transaction would be dropped. But also that we should not
override the pre-existing logic which handles this case anyway.
2018-07-18 12:42:47 +10:00
jcktm 89240e87b4 core, service_node_list: separated address from service node pubkey 2018-07-12 22:36:35 +10:00
victorsintnicolaas 34cb6b4b70 add --regtest and --fixed-difficulty for regression testing
on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest.
Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain
Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'.
Queries hard fork heights info of other network types
2018-06-29 10:06:11 +02:00
jcktm 8a92407f5f
servicenodes: Added service node list 2018-06-29 14:47:00 +10:00
moneromooo-monero 2771a18e85
threadpool: allow leaf functions to run concurrently
Decrease the number of worker threads by one to account
for the fact the calling thread acts as a worker thread now
2018-06-26 22:15:22 +01:00
moneromooo-monero a830db2577
rpc: rework to avoid repeated calculations in get_blocks.bin 2018-06-26 22:14:23 +01:00
moneromooo-monero ed2c81ed95
replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
luigi1111 50bc95519e
Merge pull request #3828
16e209e core: lock incoming tx lock when checking the txpool and chain (moneromooo-monero)
2018-06-19 12:41:07 -05:00
luigi1111 cfd66dae4b
Merge pull request #3691
db55263 threadpool: allow constructing an object, and misc tweaks (moneromooo-monero)
ce173cb core: remove threadpool dependency from header (moneromooo-monero)
3147468 unit_tests: add threadpool unit test (moneromooo-monero)
2018-06-17 22:04:39 -05:00
luigi1111 22c8730261
Merge pull request #3450
3b941be core: add get_earliest_ideal_height_for_version() (stoffu)
2018-06-08 14:31:49 -05:00
jcktm f0740b9a5e Merge remote-tracking branch 'monero/master' into dev 2018-06-08 16:40:07 +10:00
luigi1111 a7ea14dc6a
Merge pull request #3876
740da1b core: fix automatic safe db sync mode switching (moneromooo-monero)
e942d34 protocol: do not switch to unsafe sync mode for just a few blocks (moneromooo-monero)
2018-05-30 15:46:13 -05:00
moneromooo-monero 740da1ba95
core: fix automatic safe db sync mode switching 2018-05-28 12:14:04 +01:00
moneromooo-monero b9389e582e
db_lmdb: save pruned and prunable tx data separately
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-23 22:48:12 +01:00
moneromooo-monero 5f8ffca34d
speed up get_output_distribution (and precalc common case) 2018-05-21 19:51:58 +01:00
moneromooo-monero ce173cbb5b
core: remove threadpool dependency from header 2018-05-20 12:06:07 +01:00
moneromooo-monero 16e209e08d
core: lock incoming tx lock when checking the txpool and chain
This gets rid of an innocuous race trying to add the same tx
twice to the txpool
2018-05-18 09:39:56 +01:00
jcktm a64bc9e325 Merge remote-tracking branch 'monero/master' into merge-upstream 2018-05-15 12:16:43 +10:00
moneromooo-monero 6f859e4328
cryptonote: make sure outPk setup always happens 2018-05-07 19:21:52 +01:00
jcktm 956263a936 Merge remote-tracking branch 'monero/master' into merge-upstream-changes 2018-05-01 12:26:17 +10:00
Doyle T 808c07768c Update cmakelists and misc refs to Loki 2018-04-25 16:13:38 +10:00
Thaer Khawaja dad1077577 Only log an error if fork version is higher AND is not known. 2018-04-22 17:26:44 -07:00
Haafingar c9e51bd178 Merge branch 'master' of https://github.com/monero-project/monero into upstream 2018-04-13 09:52:05 +10:00
Doyle T e9cf61bb3f Update output binaries to loki 2018-04-10 14:51:12 +10:00
Doyle T 161eda3fd1 First pass Monero to Loki refs 2018-04-10 14:49:20 +10:00
moneromooo-monero 11c933e137
fix lambda compile error on openbsd 2018-03-27 14:48:36 +01:00
stoffu 3b941befae
core: add get_earliest_ideal_height_for_version() 2018-03-21 01:53:24 +09:00
moneromooo-monero b1398fff40
core: fix use of uninitialised data 2018-03-18 23:37:00 +00:00
Riccardo Spagni 0f27fc57ac
Merge pull request #3336
57c0b1ed Fix typos in various files (Dimitris Apostolou)
2018-03-16 18:08:07 +02:00
moneromooo-monero 41f727ce42
add RPC to get a histogram of outputs of a given amount 2018-03-16 10:32:26 +00:00
Dimitris Apostolou 57c0b1ed9f Fix typos in various files 2018-03-15 18:25:38 +02:00
stoffu af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
moneromooo-monero 4a78a99f96
cryptonote_core: change wording of fork warning message
An udpate may or may not be available now, but should be soon if not.
This will prevent too many people freaking out.
2018-02-18 23:44:59 +00:00
Riccardo Spagni 6198c816b1
Merge pull request #3170
b3b2d4d2 options: add testnet option dependencies (whythat)
c5f55bb4 common: implement dynamic option dependencies mechanism (whythat)
05a12ccc options: remove testnet-* options (whythat)
c33cb60e common: implement dependent option descriptor (whythat)
2018-02-17 11:51:57 +01:00
whythat b3b2d4d20c options: add testnet option dependencies 2018-02-16 22:32:01 +02:00
whythat 05a12ccc2d options: remove testnet-* options 2018-02-16 22:32:01 +02:00
moneromooo-monero 3607d467f3
core: add --no-fluffy-blocks, and enable fluffy blocks by default 2018-02-16 13:46:46 +00:00
moneromooo-monero bc61ae69bf
tx_pool: add a max pool size, settable with --max-txpool-size 2018-02-07 13:42:12 +00:00
Riccardo Spagni e93ff8f22d
Merge pull request #3143
ba6d2975 cryptonote_core: add --disable-dns-checkpoints flag (moneromooo-monero)
2018-01-27 17:25:33 -08:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero ba6d2975bc
cryptonote_core: add --disable-dns-checkpoints flag 2018-01-17 10:14:48 +00:00
Riccardo Spagni b38f6dcf0b
Merge pull request #2929
ae55bacd resumption support for updates using range requests (moneromooo-monero)
fe0fae50 epee: add a get_file_size function (moneromooo-monero)
2017-12-25 21:20:22 +02:00
moneromooo-monero 24f584d90d
cryptonote_core: remove unused functions with off by one bugs 2017-12-18 15:16:06 +00:00
moneromooo-monero 8e60b81c48
cryptonote_core: fix db leak on error 2017-12-18 15:16:00 +00:00
moneromooo-monero d9b137f161
cryptonote_core: fix blockchain init call after prototype change 2017-12-17 18:47:46 +00:00
Riccardo Spagni 066fd7aced
Merge pull request #2877
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero)
bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero)
4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-17 12:59:44 +02:00
moneromooo-monero 4abf25f3c9
cryptonote_core does not depend on p2p anymore
As a followon side effect, this makes a lot of inline code
included only in particular cpp files (and instanciated
when necessary.
2017-12-16 23:28:38 +00:00
moneromooo-monero 09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
Riccardo Spagni 8da24c2a57
Merge pull request #2878
abebe392 rpc: add offline state in info rpc (moneromooo-monero)
7696e849 core: make --offline also disable DNS lookups (moneromooo-monero)
2017-12-16 23:27:00 +02:00
Riccardo Spagni 7998ffc26b
Merge pull request #2871
2b0a32f8 Small cleanup of daemon synchronization output (xmr-eric)
2017-12-16 23:25:02 +02:00
moneromooo-monero ae55bacd8c
resumption support for updates using range requests 2017-12-15 10:46:23 +00:00
moneromooo-monero c83d0b3ee2
add bulletproofs from v7 on testnet 2017-12-08 13:50:45 +00:00
moneromooo-monero 7696e84952
core: make --offline also disable DNS lookups 2017-11-30 15:35:52 +00:00
xmr-eric 2b0a32f8af Small cleanup of daemon synchronization output
Add period to second sentence
2017-11-27 16:37:20 -05:00
Cifrado 287dde63d8 Added command descriptions 2017-11-26 10:37:37 +01:00
Riccardo Spagni ed2fc4a1ff
Merge pull request #2794
43f27c7d core: warn when free disk space is low (moneromooo-monero)
2017-11-25 19:48:33 +02:00
Riccardo Spagni edebe4e3b6
Merge pull request #2736
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu)
178014c9 split off readline code into epee_readline (moneromooo-monero)
a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero)
437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero)
e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero)
ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero)
082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14 21:31:51 +02:00
moneromooo-monero 082db75f28
move cryptonote command line options to cryptonote_core
Those have no reason to be in a generic module
2017-11-14 17:06:19 +00:00
moneromooo-monero 383ff4f689
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to
build due to:

  struct map *if_memmap;
2017-11-14 16:56:10 +00:00
moneromooo-monero 43f27c7d43
core: warn when free disk space is low 2017-11-14 10:21:34 +00:00
binaryFate 10013e9434 Protect node privacy by proper filtering in restricted-mode RPC answers
This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode.
This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected.
In practice, when running with `--restricted-rpc`:
* get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero.
* get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions
* get_transaction_pool_hashes.bin will not list such transaction
* get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed

The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality.
Fixes #2590.
2017-11-08 13:07:07 +01:00
Riccardo Spagni 344c01c712
Merge pull request #2638
529a6a4a core: guard against a mined block not finding all txes in the pool (moneromooo-monero)
2017-10-15 18:58:57 +02:00
Riccardo Spagni d8bc28cc36
Merge pull request #2552
69ce33f2 core: fix failure to sync when a tx is already in the pool (moneromooo-monero)
2017-10-15 17:31:37 +02:00
Riccardo Spagni 5ea20d6944
Merge pull request #2469
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-15 17:23:50 +02:00
moneromooo-monero 529a6a4af8
core: guard against a mined block not finding all txes in the pool
This can happen for several reasons, but mainly if another block
was received, which took that tx off the pool.
2017-10-11 13:00:49 +01:00
Riccardo Spagni 87d0516f7d
Merge pull request #2513
309290d1 Source updates are in a source subdirectory (moneromooo-monero)
2017-10-02 23:29:25 +04:00
moneromooo-monero 69ce33f217
core: fix failure to sync when a tx is already in the pool 2017-09-29 21:34:10 +01:00
moneromooo-monero cdbbe99c82
checkpoints: add a token checkpoint on testnet (the genesis block) 2017-09-25 21:16:35 +01:00
moneromooo-monero 5d65a75b69
move checkpoints in a separate library 2017-09-25 21:16:26 +01:00
Riccardo Spagni 13be8115e4
Merge pull request #2458
7f2f6ee1 protocol: remove hop count on block propagation (moneromooo-monero)
2017-09-25 17:00:47 +02:00
moneromooo-monero b5faac5304
get_blockchain_top now returns void
It was always returning true, and could not be foreseen to
usefully return errors in the future. This silences CID 162652
as well as saves some checking code in a few places.
2017-09-25 15:48:13 +01:00
moneromooo-monero 309290d1c7
Source updates are in a source subdirectory
rather than in the same directory as the prebuilt versions
2017-09-22 21:48:19 +01:00
moneromooo-monero 7adceee634
precomputed block hashes are now in blocks of N (currently 256)
This shaves a lot of space off binaries
2017-09-18 16:29:00 +01:00
Riccardo Spagni 1a73843cec
Merge pull request #2446
6d0ca7d1 Tweak concurrency limits (Howard Chu)
510d0d47 Use a threadpool (Howard Chu)
2017-09-18 13:19:26 +02:00
Riccardo Spagni 591e53445b
Merge pull request #2044
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget)
77986023 json serialization for rpc-relevant monero types (Thomas Winget)
5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget)
9ac2ad07 DRY refactoring (Thomas Winget)
2017-09-18 13:08:16 +02:00
moneromooo-monero 7f2f6ee1c9
protocol: remove hop count on block propagation
It is unused, as it was apparently a future optimization,
and it leaks some information (though since pools publish
thei blocks they find, that amount seems small).
2017-09-17 10:26:12 +01:00
Howard Chu 510d0d4753
Use a threadpool
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00
Riccardo Spagni 7abdba0a5c
Merge pull request #2438
9443eec1 core: guard against exceptions in tx verification worker threads (moneromooo-monero)
2017-09-14 18:31:46 +02:00
moneromooo-monero 9443eec10f
core: guard against exceptions in tx verification worker threads 2017-09-12 12:07:10 +01:00
Thomas Winget 77986023c3
json serialization for rpc-relevant monero types
Structured {de-,}serialization methods for (many new) types
which are used for requests or responses in the RPC.

New types include RPC requests and responses, and structs which compose
types within those.

# Conflicts:
#	src/cryptonote_core/blockchain.cpp
2017-09-05 12:20:27 -04:00
moneromooo-monero 6ac61100a1
Add a --fluffy-blocks option to relay blocks as fluffy blocks
Defaults to off, but fluffy blocks are forced enabled on testnet
2017-09-03 11:11:11 +01:00
Riccardo Spagni 1e57e48342
Merge pull request #2372
c867357a cryptonote_protocol: error handling on cleanup_handle_incoming_blocks (moneromooo-monero)
ce901fcb Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks (moneromooo-monero)
84fa015e core: guard against exceptions in handle_incoming_{block,tx} (moneromooo-monero)
2017-09-02 11:30:57 +02:00
moneromooo-monero ce901fcb31
Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks 2017-08-29 15:43:32 +01:00
moneromooo-monero 84fa015e77
core: guard against exceptions in handle_incoming_{block,tx}
When one happens, cleanup must be called or the incoming tx
lock will stay locked
2017-08-29 13:01:45 +01:00
moneromooo-monero a95e460c71
move db specific options to BlockchainDB
Avoids common depending on blockchain_db, which can cause
link errors.
2017-08-29 11:43:34 +01:00
Riccardo Spagni 36b978f50e
Merge pull request #2314
c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu)
9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
2017-08-26 23:43:22 +02:00
Riccardo Spagni ff0afc196e
Merge pull request #2313
3dd34a49 Cleanup test impact of moving blockchain_db_types() (Howard Chu)
80344740 More DB support cleanup (Howard Chu)
4c7f8ac0 DB cleanup (Howard Chu)
2017-08-26 23:43:09 +02:00
moneromooo-monero 55bec1f03d
rpc: add a new RPC to get current txpool backlog (sizes and fees) 2017-08-26 16:23:31 +01:00
Howard Chu c22d22e2db
Cleanup test impact of adding safesyncmode() method 2017-08-22 15:11:09 +01:00
Howard Chu 9a859844f4
Toggle SAFE syncmode on and off automatically
If monerod is started with default sync mode, set it to SAFE after
synchronization completes. Set it back to FAST if synchronization
restarts (e.g. because another peer has a longer blockchain).

If monerod is started with an explicit sync mode, none of this
automation takes effect.
2017-08-20 16:30:28 +01:00
Howard Chu 4c7f8ac04f
DB cleanup
Hide LMDB-specific stuff behind blockchain_db.h. Nobody besides blockchain_db.cpp
should ever be including DB-specific headers any more.
2017-08-19 18:11:38 +01:00
Riccardo Spagni 4466b6d1b0
Merge pull request #2303
5a283078 cryptonote_protocol: large block sync size before v4 (moneromooo-monero)
7b747607 cryptonote_protocol: kick idle synchronizing peers (moneromooo-monero)
2017-08-17 21:39:44 +02:00
Riccardo Spagni 4b2cc123ff
Merge pull request #2287
827afcb7 protocol: pass blockchain cumulative difficulty when syncing (moneromooo-monero)
2017-08-17 21:35:02 +02:00
moneromooo-monero 5a283078ec
cryptonote_protocol: large block sync size before v4 2017-08-17 13:11:52 +01:00
moneromooo-monero 827afcb7ea
protocol: pass blockchain cumulative difficulty when syncing
Not used yet.
2017-08-15 21:03:37 +01:00
Riccardo Spagni 3ff67323b7
Merge pull request #2288
c6e200a8 core: add --db-salvage command line flag (moneromooo-monero)
2017-08-15 20:57:26 +02:00
moneromooo-monero c6e200a8ab
core: add --db-salvage command line flag
Use to load the database when the primary meta page is corrupted
2017-08-12 19:04:44 +01:00
moneromooo-monero a1891ebea9
tests: fix tests build
Add get_fork_version and add_ideal_fork_version to core so
cryptonote_protocol does not have to need the Blockchain
class directly, as it's not in its dependencies, and add
those to the fake core classes in tests too.
2017-08-10 11:12:56 +01:00
Riccardo Spagni 62610a3a53
Merge pull request #2225
5d91b26c blockchain: skip checking tx semantics in embedded block hash range (moneromooo-monero)
2017-08-07 22:10:09 +02:00
moneromooo-monero 38756d00ff
core: new API to disable DNS checkpoint lookups 2017-08-07 14:31:06 +01:00
Riccardo Spagni 6db8a60a18
Merge pull request #2149
158c3ecf core: thread most of handle_incoming_tx (moneromooo-monero)
f57ee382 cryptonote_protocol: retry stale spans early (moneromooo-monero)
90df52e1 cryptonote_protocol: light cleanup (moneromooo-monero)
84e23156 cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages (moneromooo-monero)
5be43fcd cryptonote_protocol_handler: sync speedup (moneromooo-monero)
2017-08-07 15:24:58 +02:00
Riccardo Spagni 9b3b7f050b
Merge pull request #2230
5dd722be core: add a message when loading checkpoints at init time (moneromooo-monero)
2017-08-07 15:12:42 +02:00
moneromooo-monero 158c3ecff3
core: thread most of handle_incoming_tx 2017-08-07 09:33:20 +01:00
moneromooo-monero 5dd722beaa
core: add a message when loading checkpoints at init time
This uses DNS, which can take a while, so it's useful to know
this is the culprit when loading pauses
2017-07-31 06:43:13 +01:00
moneromooo-monero 5d91b26c0f
blockchain: skip checking tx semantics in embedded block hash range
If the txes are bad, this'll be picked up by the block hash mismatch
since the tx merkle root is part of the block hash.
2017-07-30 09:48:00 +01:00
moneromooo-monero a5031a7d02
core: forbid duplicate ring members from v6
This avoids someone adding what amounts to mixin 0 rings in
practice, as there is no other good reason to allow this.
2017-07-22 12:33:12 +01:00
moneromooo-monero 0722aea3df
cryptonote_core: initialize checkpoint flag 2017-07-02 18:45:25 +01:00
Riccardo Spagni 3d397325bf
Merge pull request #2063
d17c0fc2 Don't copy blockchain for coinbase_tx_sum (Howard Chu)
2017-06-01 19:33:43 +02:00
Howard Chu 5414970dcd
Speedup print_pool_stats
Since we're just counting txs, there's no reason to deserialize all the blobs.
2017-06-01 17:34:03 +01:00
Howard Chu d17c0fc2d0
Don't copy blockchain for coinbase_tx_sum
Changed Blockchain::for_all_blocks() to for_blocks_range()
Operate on blockchain in-place instead of building a copy first.
2017-06-01 14:14:24 +01:00
Riccardo Spagni 907ce14b18
Merge pull request #2026
a5739201 Update sync time copy (xmr-eric)
2017-05-30 21:20:39 +02:00
Riccardo Spagni 545e2b003c
Merge pull request #1982
b52abd13 Move txpool to the database (moneromooo-monero)
2017-05-30 21:12:44 +02:00
moneromooo-monero b52abd1370
Move txpool to the database
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).

poolstate.bin is now obsolete.
2017-05-25 22:23:37 +01:00
xmr-eric a57392016b Update sync time copy 2017-05-10 14:34:18 -04:00
assylias bff90264b8
Add expected total reward to RPC "getblocktemplate".
Only works from V5 fork onward - returns 0 before that block.
2017-04-19 18:28:16 +01:00
moneromooo-monero 558cfc31ca
core, wallet: faster tx pool scanning
Includes a new RPC to get tx pool hashes fast.
2017-03-23 09:25:22 +00:00
moneromooo-monero a6f1d8fc4c
core: call {prepare|cleanup}_handle_incoming_blocks when adding a mined block
This ensures that a batch can't also be started/stopped out of
sync by another thread and us getting in the middle
2017-03-19 12:40:26 +00:00
moneromooo-monero 74b216a17f
core: don't try to re-relay an empty set of pool transactions 2017-03-12 14:57:58 +00:00
moneromooo-monero 02097c87eb
core: print the "new update found" message in cyan, for visibility 2017-03-05 16:59:36 +00:00
moneromooo-monero f6211322e5
core: make update download cancellable 2017-03-05 16:59:25 +00:00
moneromooo-monero 9effa55311
core: bound the amount of entries in bad tx semantics cache
This is to prevent unbounded memory use. Since I don't think there
is a container that has quick insert, quick lookup, and automatic
FIFO, I use two and swap every N, clearing the oldest one.
2017-02-23 20:34:11 +00:00
moneromooo-monero 5901331669
updates: remove testnet case
It need not be any different
2017-02-22 11:20:44 +00:00
moneromooo-monero 822577eb42
updates: we now have a user URL, and an automatic one
So the user can use https, while the automatic does not have to
2017-02-22 11:20:40 +00:00
moneromooo-monero 9f17b1a30f
updates: s/monerod/monero/ for the main download
Also print download success message as global log
2017-02-22 11:20:37 +00:00
Riccardo Spagni 1a4298685a
Merge pull request #1766
72deb484 updated fallback nodes (Riccardo Spagni)
33329f5b update version to 0.10.2 (Riccardo Spagni)
04a50a7e update checkpoints.dat (Riccardo Spagni)
c3599fa7 update copyright year, fix occasional lack of newline at line end (Riccardo Spagni)
2017-02-22 09:36:11 +02:00
moneromooo-monero 708758b737
core: do not download an update we already downloaded 2017-02-21 22:23:59 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
moneromooo-monero 417b126fc4
Fix core_tests breaking on startup
You're wondering how this fixes core tests, aren't you...

It prevents the miner (initialized by cryptonote::core) from
breaking trying to access arguments that were not added.
Since the tests don't use the miner directly, it makes more
sense to have cryptonote_core add those, since it also uses
the miner.
2017-02-21 15:06:07 +00:00
moneromooo-monero e74b3ab5f7
core: add p2p bind port options from net_node
They're now used by core to determine the data directory to use
for the txpool directory.

This fixes an assert in the core tests, which don't use the RPC
server, which normally initializes the P2P code.
2017-02-21 09:35:23 +00:00
Riccardo Spagni 49efd3add9
Merge pull request #1727
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
2017-02-21 11:27:15 +02:00
moneromooo-monero a5a0a3c894
core: updates can now be downloaded (and SHA256 hash checked) 2017-02-20 22:58:37 +00:00
moneromooo-monero d282cfcc46
core: test key images against validity domain 2017-02-20 22:58:25 +00:00
moneromooo-monero f640512c53
Optionally query moneropulse DNS records to check for updates
It just checks and prints a message if there is a new version
for now.
2017-02-20 22:58:16 +00:00
Howard Chu bed2d9f231
Get rid of directory lock
We don't need it any more. Fixes issue #1633
2017-02-18 22:22:24 +00:00
moneromooo-monero 0288310e3b
blockchain_db: add "raw" blobdata getters for block and transaction
This speeds up operations such as serving blocks to syncing peers
2017-02-13 21:11:37 +00:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Riccardo Spagni fcb299b4ae
Merge pull request #1641
ca94d0a4 Separate data per P2P port (Miguel Herranz)
2017-02-02 22:41:28 +02:00
Riccardo Spagni c3eff820be
Merge pull request #1642
3ae79a59 core: set missing verifivation_failed flag when rejecting a tx (moneromooo-monero)
ea6549e9 core_tests: decrease trace level from trace to debug (moneromooo-monero)
2017-02-02 21:25:30 +02:00
Riccardo Spagni f9e60dcd55
Merge pull request #1617
0644eed7 Remove boost/foreach.cpp includes (Miguel Herranz)
36dd3e23 Replace BOOST_REVERSE_FOREACH with ranged for (Miguel Herranz)
629e3101 Replace BOOST_FOREACH with C++11 ranged for (Miguel Herranz)
2017-02-02 18:16:39 +02:00
Miguel Herranz ca94d0a43c Separate data per P2P port
poolstate.bin and p2pstate.bin are stored in .bitmonero/ if the default
P2P port is being used.

If another port is used both files are stored in
.bitmonero/PORTNUMBER/.
2017-01-28 14:16:06 +01:00
moneromooo-monero 3ae79a59e4
core: set missing verifivation_failed flag when rejecting a tx
This fixes two core rct tests
2017-01-28 09:43:41 +00:00
NanoAkron 98357db400
Update log messages to reflect fact we no longer need to type exit to save database before quitting 2017-01-23 01:21:26 +00:00
Miguel Herranz 0644eed772 Remove boost/foreach.cpp includes 2017-01-22 23:31:34 +01:00
Miguel Herranz 629e3101ab Replace BOOST_FOREACH with C++11 ranged for 2017-01-22 21:38:10 +01:00
Riccardo Spagni 9c06a7fd04
Merge pull request #1615
f0989893 core: cache tx hashes of failing semantics txes (moneromooo-monero)
2017-01-22 11:51:53 -05:00
Riccardo Spagni a3de797e57
Merge pull request #1610
b70ab128 rpc: fix orphan_status when getting blocks (moneromooo-monero)
2017-01-22 11:48:39 -05:00
moneromooo-monero f098989396
core: cache tx hashes of failing semantics txes 2017-01-22 16:13:31 +00:00
moneromooo-monero b70ab128fc
rpc: fix orphan_status when getting blocks
It was always set to false, even for orphan blocks
2017-01-22 12:20:55 +00:00
moneromooo-monero 7c3f79cb9f
core: early out in handle_incoming_tx if already in pool or blockchain 2017-01-21 20:30:10 +00:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.

To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:

This one is (mostly) silent, only outputting fatal errors:

MONERO_LOGS=*:FATAL

This one is very verbose:

MONERO_LOGS=*:TRACE

This one is totally silent (logwise):

MONERO_LOGS=""

This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):

MONERO_LOGS=*:WARNING,verify:FATAL

Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE

Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:

MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE

Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.

Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.

The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
2017-01-16 00:25:46 +00:00
Riccardo Spagni 1207d8ad0d
Merge pull request #1576
ba3968f6 rct: split rct checks between semantics and other (moneromooo-monero)
2017-01-15 14:56:39 -05:00
Riccardo Spagni 10c6afd316
Merge pull request #1571
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15 14:50:10 -05:00
Riccardo Spagni 65e33b1bc5
Merge pull request #1506
3ff54bdd Check for correct thread before ending batch transaction (Howard Chu)
eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu)
c903c554 Don't cache block height, always get from DB (Howard Chu)
eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu)
0693cff9 Use batch transactions when syncing (Howard Chu)
2017-01-15 14:43:12 -05:00
Howard Chu eb1fb6011a
Tweak default db-sync-mode to fast:async:1
fsync the DB asynchronously, to allow block download/verification
to proceed while syncing. Sync after every batch. Note that
"fastest" still defaults to fastest:async:1000.
2017-01-14 22:43:06 +00:00
moneromooo-monero ba3968f6ce
rct: split rct checks between semantics and other
Semantics can be checked early
2017-01-14 21:17:32 +00:00
moneromooo-monero 81c384e408
fix do_not_relay not preventing relaying on a timer
Also print its value when printing pool
2017-01-14 13:07:05 +00:00
Riccardo Spagni 0b6031adbf
Merge pull request #1543
19be7225 Add start_time to get_info methods and show uptime (Miguel Herranz)
2017-01-13 14:35:21 -05:00
Miguel Herranz 19be7225cc Add start_time to get_info methods and show uptime 2017-01-12 00:15:21 +01:00
Miguel Herranz aff28178e6 Remove db-auto-remove-logs 2017-01-10 11:49:45 +01:00
Miguel Herranz 1229c68587 Remove berkeley from db_type initialization 2017-01-10 11:46:12 +01:00
moneromooo-monero 12abe86ac0
core: fix recalculation of emission/fees
It was counting things many, many times
2016-12-21 11:19:04 +00:00
Riccardo Spagni f2ea2afb77
Merge pull request #1398
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04 22:28:22 +02:00
Pierre Boyer f4772bae81 Fix a few minor typos 2016-12-04 14:13:54 +01:00
moneromooo-monero 3f7d6fb57d
Fix delayed exit when syncing 2016-12-04 12:27:45 +00:00
moneromooo-monero 2c0173c722
Add a get_outs (fully text based) version of get_outs.bin 2016-11-22 20:00:40 +00:00
Dion Ahmetaj d61bd8187e add lightweight block propagation ("fluffy blocks")
Added a new command to the P2P protocol definitions to allow querying for support flags.

Implemented handling of new support flags command in net_node. Changed for_each callback template to include support flags. Updated print_connections command to show peer support flags.

Added p2p constant for signaling fluffy block support.

Added get_pool_transaction function to cryptnote_core.

Added new commands to cryptonote protocol for relaying fluffy blocks.

Implemented handling of fluffy block command in cryptonote protocol.

Enabled fluffy block support in node initial configuration.

Implemented get_testnet function in cryptonote_core.

Made it so that fluffy blocks only run on testnet.
2016-11-09 14:24:27 -05:00
moneromooo-monero 1e163666f3
core: notify the txpool when transactions are relayed 2016-10-23 00:32:49 +01:00
Dion Ahmetaj a6bc1103fd patched parameter type bug that was causing failure on 32 bit 2016-10-14 10:37:10 -04:00
Dion Ahmetaj 7db29d6903 print_coinbase_tx_sum now breaks output into fee and emission components 2016-10-10 19:55:18 -04:00
Dion Ahmetaj dd6c44327b changed params from start/end index to height/count 2016-10-10 17:19:36 -04:00
Dion Ahmetaj 412da63622 added print_coinbase_tx_sum option 2016-10-10 15:45:51 -04:00
Riccardo Spagni d60826c0b9
Merge pull request #1133
cec090f Revert "Fix fake 'network synchronized, begin using' messages" (moneromooo-monero)
2016-10-04 12:08:33 +02:00
Riccardo Spagni e34ef4de6c
Merge pull request #1171
6390673 Removed all code related to fast_exit (NanoAkron)
2016-10-04 11:41:41 +02:00
NanoAkron 8ed0d72b12
Moved logging to target functions rather than caller 2016-10-03 22:11:00 +01:00
NanoAkron 6390673137 Removed all code related to fast_exit 2016-10-03 02:06:55 +01:00
NanoAkron 442bfd1600 Added messages at log level 2 to reflect deactivation procedure 2016-10-02 23:00:41 +01:00
moneromooo-monero cec090fc8a
Revert "Fix fake 'network synchronized, begin using' messages"
This reverts commit 78035d2b6c.

The patch doesn't work, and causes constant SYNCHRONIZED OK spam.
2016-09-25 19:08:35 +01:00
moneromooo-monero 5e3e362c85
core: make the sync chunk block count overridable 2016-09-24 17:00:19 +01:00
Riccardo Spagni 011e42f337
fix nigglies, as pointed out by moneromooo-monero 2016-09-03 22:36:09 +02:00
Riccardo Spagni df63e0704a
fix remaining bitmonero and simplewallet bits 2016-09-03 22:03:44 +02:00
Howard Chu b8c03a5f10
Remove blocks_per_sync limits
The code used to cap at 5000 blocks per sync. It also treated 0 as 1.
Remove these checks; if specified as 0 do no periodic syncs at all.
Then the user is responsible for syncing in some external process.
2016-08-31 00:00:19 +01:00
Riccardo Spagni f5b802e684
Merge pull request #999
dc411ea Change default db-sync-mode to fast, not fastest (Howard Chu)
2016-08-28 22:50:18 +02:00
moneromooo-monero cf33e1a52a
rct: do not serialize public keys in outPk
They can be reconstructed from vout
2016-08-28 21:29:43 +01:00
moneromooo-monero f5465d8246
Condition v2 txes on v3 hard fork 2016-08-28 21:29:04 +01:00
moneromooo-monero dc4aad7eb5
add rct to the protocol
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
2016-08-28 21:28:37 +01:00
moneromooo-monero 4258dab4d6
core: new /getrandom_rctouts.bin binary RPC call
to get random ringct outputs to mix with
2016-08-28 21:28:16 +01:00
moneromooo-monero 9e82b694da
remove original Cryptonote blockchain_storage blockchain format 2016-08-28 21:27:32 +01:00
Howard Chu dc411ea3b7 Change default db-sync-mode to fast, not fastest 2016-08-28 16:20:22 +01:00
Thomas Winget 78035d2b6c
Fix fake 'network synchronized, begin using' messages 2016-08-23 22:52:25 -04:00
moneromooo-monero 11dc091464
Fake outs set is now decided by the wallet
This plugs a privacy leak from the wallet to the daemon,
as the daemon could previously see what input is included
as a transaction input, which the daemon hadn't previously
supplied. Now, the wallet requests a particular set of
outputs, including the real one.

This can result in transactions that can't be accepted if
the wallet happens to select too many outputs with non standard
unlock times. The daemon could know this and select another
output, but the wallet is blind to it. It's currently very
unlikely since I don't think anything uses non default
unlock times. The wallet requests more outputs than necessary
so it can use spares if any of the returns outputs are still
locked. If there are not enough spares to reach the desired
mixin, the transaction will fail.
2016-08-11 14:35:27 +01:00
moneromooo-monero 24b3e9007a
Convey tx verification failure reasons to the RPC client
This allows appropriate action to be taken, like displaying
the reason to the user.

Do just that in simplewallet, which should help a lot in
determining why users fail to send.

Also make it so a tx which is accepted but not relayed is
seen as a success rather than a failure.
2016-03-27 12:37:18 +01:00
Riccardo Spagni 0d30b65785 Merge pull request #749
bfd4a28 Update BlockchainDB documentation (Thomas Winget)
797357e Change Doxyfile, Blockchain not blockchain_storage (Thomas Winget)
c835215 remove defunct code from cryptonote::core (Thomas Winget)
50dba6d cryptonote::core doxygen documentation (Thomas Winget)
8ac329d doxygen documentation for difficulty functions (Thomas Winget)
540a76c Move checkpoint functions into checkpoints class (Thomas Winget)
1b0c98e doxygen documentation for checkpoints.{h,cpp} (Thomas Winget)
89c24ac Remove unnecessary or defunct code (Thomas Winget)
ab0ed14 doxygen include private and static members (Thomas Winget)
3a48449 Updated documentation for blockchain.* (Thomas Winget)
2016-03-25 09:12:25 +02:00
Riccardo Spagni 01e0a69c17 Revert "Merge pull request #749"
This reverts commit 7fa63a82a1, reversing
changes made to cb6be986c3.
2016-03-25 08:42:42 +02:00
Thomas Winget c835215ea9
remove defunct code from cryptonote::core 2016-03-24 03:39:58 -04:00
Thomas Winget 50dba6d301
cryptonote::core doxygen documentation 2016-03-24 03:39:55 -04:00
Thomas Winget 540a76c5c2
Move checkpoint functions into checkpoints class
The functions in src/cryptonote_core/checkpoints_create.{h,cpp} should
be member functions of the checkpoints class, if nothing else for the
sake of keeping their documentation together.

This commit covers moving those functions to be member functions of the
checkpoints class as well as documenting those functions.
2016-03-24 03:39:41 -04:00
moneromooo-monero f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
moneromooo-monero 889217381f
core: print "update needed" hard fork notifications in red 2016-02-17 22:57:14 +00:00
moneromooo-monero a333c42cde
core_tests: add tests for hard fork behaviors (MRL-0004)
We also replace the --fakechain option with an optional structure
containing details about configuration for the core/blockchain,
for test purposes. This seems more future friendly.
2016-02-08 18:52:00 +00:00
moneromooo-monero 05bfb51d3e
core: move the db lock to the data directory
Locking just one db turns out to not have been a good idea, since
the pool and p2p state fdles have to be used anyway.

Also ensure the directory exists before tring to lock.
2016-02-04 18:09:45 +00:00
moneromooo-monero 8b3539bc11
core: prevent the database from being used by multiple daemons
A boost lock is used to determine whether more than one process
wants to access the database. The boost file_lock doesn't seem
to like locking directories, so we use an arbitrary file in it.
This allows to still run two daemons if they have different
database directories (ie, LMDB/BDB, different data directories).
2016-01-31 12:58:08 +00:00
moneromooo-monero 3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
Riccardo Spagni b98d88c17e
Merge pull request #587
1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
2015-12-31 22:34:57 +02:00
moneromooo-monero 1e07110a7a
Nicer looking exit when blockchain.bin is found
Do not print the exception message, and write the important bit
in red, since people will only read the last line otherwise.
2015-12-31 17:09:00 +00:00
moneromooo-monero 40f97ce83d
core: do not use the persistent pool state for tests
Fixes intermittent test failures when the pool contains
unexpected transactions that were brought in from the
live pool.
2015-12-31 14:24:06 +00:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00