Commit graph

828 commits

Author SHA1 Message Date
moneromooo-monero
78b2eabc87 Translatable strings for simplewallet
The system is mostly the Qt system, but we don't use Qt to avoid
the dependencies.

See README.i18n for details.
2015-07-14 20:28:25 +01:00
warptangent
fd73d9cc3a
Check and resize if needed at batch transaction start
This currently only affects blockchain_import and blockchain_converter.

When the number of blocks expected for the batch transaction is
provided, make an estimate of the DB space needed. If not enough free
space remains, resize the DB.

The estimate is made based on:
- the average size of the last 500 blocks, or if larger, a min. block
  size of 4k
- a factor for the expanded size a block occupies in the DB across the
  sub-dbs/tables
- a safety factor (1.7) to allow for a "reasonable" average block size
  increase over the batch

Increase the DB size by whichever is greater: the estimated size needed
or a minimum increase size, currently 128 MB.

The conservative factors in the estimate help in testing that the resize
occurs when needed, and without gratuitous size increases. For common
use, the safety factor and minimum increase size could reasonably be
increased.

For testing, setting DEFAULT_MAPSIZE (blockchain_db/lmdb/db_lmdb.h) to 1
<< 27 (128 MB) and recompiling will ensure DB resizes take place sooner
and more frequently.
2015-07-12 00:51:39 -07:00
warptangent
f9e4afd52a
blockchain_utilities: Increase debug statement's log level 2015-07-11 23:54:16 -07:00
warptangent
699e4b3f65
blockchain_utilities: Pass expected number of blocks when starting batch 2015-07-11 23:54:14 -07:00
warptangent
6e170c8b78
Optionally allow DB to know expected number of blocks at batch transaction start
This will assist in a DB resize check.
2015-07-11 23:54:12 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo
5d304cabfd Fix loop bug when calling core::get_block_template, causing calling thread to lock up. 2015-07-10 22:09:21 -07:00
moneromooo-monero
369c7b32f8
blockchain_utilities/README.md: add workaround for resizing in batch mode 2015-07-07 19:06:34 +01:00
moneromooo-monero
26970c7e27 blockchain_utilities/README.md: add high level "what is this about" 2015-07-07 18:50:43 +01:00
Wladimir J. van der Laan
204759f111
mnemonics: fix duplicate symbol error 2015-06-23 09:28:52 +02:00
moneromooo-monero
ea33cadebf
mnemonics: fix prefix extraction with non ASCII text 2015-06-21 11:28:45 +01:00
Riccardo Spagni
1720affbd6
Merge pull request #325
3ade396 Set dnssec_valid value correctly in dns_utils; fix address_from_url test (Rostislav)
2015-06-20 22:41:30 +02:00
Riccardo Spagni
4790db9d04
Merge pull request #324
dc4dbc1 simplewallet: allow creating a wallet from a public address and view secret key (moneromooo-monero)
6a0f61d account: allow creating an account from a public address and view secret key (moneromooo-monero)
e05a58a wallet2: fix write_watch_only_wallet comment description (moneromooo-monero)
4bf6f0d simplewallet: forbid seed commands for watch only wallets (moneromooo-monero)
2015-06-20 22:40:47 +02:00
Rostislav
3ade396406 Set dnssec_valid value correctly in dns_utils; fix address_from_url test 2015-06-20 20:02:13 +00:00
moneromooo-monero
dc4dbc1ceb
simplewallet: allow creating a wallet from a public address and view secret key
The needed information is supplied via a triple:

--generate-from-view-key address:viewkey:filename
2015-06-20 17:33:14 +01:00
moneromooo-monero
6a0f61d800
account: allow creating an account from a public address and view secret key 2015-06-20 17:33:06 +01:00
moneromooo-monero
e05a58aead
wallet2: fix write_watch_only_wallet comment description 2015-06-20 12:30:31 +01:00
moneromooo-monero
4bf6f0d57a
simplewallet: forbid seed commands for watch only wallets
They do not make sense
2015-06-20 12:27:23 +01:00
moneromooo-monero
2952ffd80f
wallet2: use the same exponential splitting for normal txes 2015-06-17 22:00:04 +01:00
moneromooo-monero
7c8d3be656
wallet2: try to split dust sweep txs exponentially
This ensures even massive wallets full of dust can sweep.
2015-06-17 21:31:16 +01:00
moneromooo-monero
f6da25a32e
Fix standard address deserialization 2015-06-16 15:36:20 +01:00
Riccardo Spagni
2d9d6c7621
Merge pull request #321
bbc5475 Fix DNS checkpoint consensus code (moneromooo-monero)
2015-06-14 13:10:18 +02:00
Riccardo Spagni
1595187ae2
Merge pull request #320
f9b361b daemon: fix an exit crash (moneromooo-monero)
2015-06-14 13:09:53 +02:00
Riccardo Spagni
66a5c9e50f
Merge pull request #318
fb20071 simplewallet: allow a different password for the watch-only wallet (moneromooo-monero)
2015-06-14 13:09:16 +02:00
moneromooo-monero
bbc5475418
Fix DNS checkpoint consensus code
It's supposed to load all records and pick one that it finds twice.
2015-06-14 11:05:57 +01:00
moneromooo-monero
f9b361be8a
daemon: fix an exit crash 2015-06-14 00:31:09 +01:00
moneromooo-monero
6f8a6dcb6c Add RPC commands to manipulate integrated addresses 2015-06-13 16:08:00 +01:00
moneromooo-monero
67be2e4b3a
simplewallet: allow integrated_address to generate a random payment id 2015-06-12 16:49:01 +01:00
moneromooo-monero
7bd6efe313
account: add a couple consts 2015-06-12 16:48:52 +01:00
moneromooo-monero
63741d8264
Integrated addresses (standard address plus payment id) 2015-06-12 16:48:41 +01:00
moneromooo-monero
fb2007181e
simplewallet: allow a different password for the watch-only wallet 2015-06-12 16:45:29 +01:00
Riccardo Spagni
d6ba5ef8c5
Merge pull request #312
a9b1f7e dns_utils: simpify smart pointer use, and use for url strings too (moneromooo-monero)
2015-06-11 10:28:22 +02:00
Riccardo Spagni
1b25e8dfc5
Merge pull request #311
d7df08d properly decrement p2p socket count (Thomas Winget)
2015-06-11 10:27:58 +02:00
Riccardo Spagni
f89cf1df87
Merge pull request #308
35b160e fix ^D exit for bitmonerod (moneromooo-monero)
2015-06-11 10:27:36 +02:00
Riccardo Spagni
5bee2d2edf
Merge pull request #303
c882af6 wallet: add watch only wallet support (moneromooo-monero)
f7767c6 account: add a forget_spend_key method (moneromooo-monero)
2015-06-11 10:27:00 +02:00
moneromooo-monero
a9b1f7eb05
dns_utils: simpify smart pointer use, and use for url strings too
OK, I admit I wanted to template this struct for fun too.
2015-06-07 16:58:49 +01:00
Thomas Winget
d7df08d6ec
properly decrement p2p socket count 2015-06-06 13:24:33 -04:00
moneromooo-monero
35b160edea
fix ^D exit for bitmonerod
It uses the async console handler differently than simplewallet,
and wasn't running the same exit code, causing it to never actually
exit after breaking out of the console entry loop.
2015-06-03 22:43:35 +01:00
moneromooo-monero
c882af63c1
wallet: add watch only wallet support
The new save_watch_only saves a copy of the keys file without the
spend key. It can then be given away to be used as a normal keys
file, but with no spend ability.
2015-05-31 15:34:55 +01:00
moneromooo-monero
f7767c6508
account: add a forget_spend_key method 2015-05-31 15:32:54 +01:00
Riccardo Spagni
e01d32e52d
cleaning up, removing redundant files, renaming, fixing incorrect licenses 2015-05-31 13:40:18 +02:00
moneromooo-monero
a62daebba5
wallet_rpc_server: add a sweep_dust RPC command as well 2015-05-30 21:48:05 +01:00
moneromooo-monero
3204f0d536
wallet: add a sweep_dust command
Sends all the dust to your own wallet. May fail (if the fee required
is more than the dust total). May end up paying most of the dust in fees.
Unlocked dust total is now also displayed in "balance".
2015-05-30 21:47:56 +01:00
Riccardo Spagni
6aee052001
Merge pull request #297
5680604 Replace hardcoded value with existing constant of same value (warptangent)
f37ee2f Update database resize behavior (warptangent)
f85cd8e Include database error in more error messages (warptangent)
2015-05-30 22:32:23 +02:00
Riccardo Spagni
26fac96c5d
Merge pull request #294
693a8bf rpc_command_executor: fix mining in testnet mode (moneromooo-monero)
d09be11 core_rpc_server: add a getter for the testnet flag (moneromooo-monero)
754f863 core_rpc_server: log some error messages to the console (moneromooo-monero)
4f0e8cf daemon: remove obsolete daemon_commands_handler.h (moneromooo-monero)
bac366e core_rpc_server: reenable print_pl (moneromooo-monero)
39a9508 net_peerlist: fix grayt/white naming mismatch (moneromooo-monero)
8069b3b blockchain_db: add a few const (moneromooo-monero)
0932476 wallet: add consts where appropriate (moneromooo-monero)
2015-05-30 22:31:31 +02:00
warptangent
5680604437
Replace hardcoded value with existing constant of same value
This was likely the intent.
2015-05-30 09:27:54 -07:00
warptangent
f37ee2f304
Update database resize behavior
On an existing database, don't set LMDB map size to be the initial size
for a new database.

Check if resize is needed at startup.
2015-05-30 09:27:49 -07:00
warptangent
f85cd8e10b
Include database error in more error messages 2015-05-30 09:27:44 -07:00
moneromooo-monero
693a8bf7b1
rpc_command_executor: fix mining in testnet mode 2015-05-28 23:14:58 +01:00
moneromooo-monero
d09be116c6
core_rpc_server: add a getter for the testnet flag 2015-05-28 23:14:37 +01:00
moneromooo-monero
754f863a7e
core_rpc_server: log some error messages to the console
It's helpful when you don't know something failed (especially as
everything ends up returning true, so caller thinks all's fine)
2015-05-28 23:13:32 +01:00
moneromooo-monero
4f0e8cfa92
daemon: remove obsolete daemon_commands_handler.h 2015-05-28 14:10:46 +01:00
moneromooo-monero
bac366e173
core_rpc_server: reenable print_pl 2015-05-28 14:10:39 +01:00
moneromooo-monero
39a9508a20
net_peerlist: fix grayt/white naming mismatch
Looking at how these are called confirms this must have been a mistake
2015-05-28 14:10:26 +01:00
warptangent
10ff75e92e
daemon: Set log file default to use data dir
The log file previously used the default data dir even if --data-dir was
set to something else.

Document data dir and log file path.
2015-05-28 03:52:19 -07:00
warptangent
deacecc15e
simplewallet: Update and add log options
Replace --set_log with --log-level for consistency.

Show default log level in usage.

Add --log-file for specifying log file path.

Document log file path.

Display log file path at startup.
2015-05-28 03:52:08 -07:00
warptangent
f24bcd5199
simplewallet: Don't log view key and spend key
As with display of seed, don't log view key and spend key.
Includes:
- display of viewkey at wallet creation
- "viewkey" command output
- "spendkey" command output
2015-05-28 01:32:49 -07:00
moneromooo-monero
8069b3ba7f
blockchain_db: add a few const 2015-05-27 19:16:37 +01:00
moneromooo-monero
09324764c0
wallet: add consts where appropriate
because const is always appropriate
2015-05-27 19:16:22 +01:00
Riccardo Spagni
8cd6072090
Merge pull request #292
c44755a Build seed node list without duplicates (warptangent)
2015-05-26 10:45:20 +02:00
Riccardo Spagni
e042fad317
Merge pull request #291
6962253 Fix compile for GCC 5.1.0 (warptangent)
2015-05-26 10:45:01 +02:00
Riccardo Spagni
634e367ff5
Merge pull request #289
01076ae Check if LMDB needs resize every 1000 blocks (Thomas Winget)
b0d849e null out batch txn pointer as needed (BlockchainLMDB) (Thomas Winget)
7b7ef73 LMDB should now dynamically resize the mapsize (Thomas Winget)
ac79502 Move mdb_txn_safe implementation to cpp file (Thomas Winget)
2015-05-26 10:44:48 +02:00
warptangent
696225321f
Fix compile for GCC 5.1.0
Add fix for compile error with multiple uses of peerid_type (uint64_t)
variable in lambda expression.
- known GCC issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65843

epee: replace return value of nullptr for expected boolean with false.

Fixes #231.
2015-05-25 22:18:36 -07:00
warptangent
c44755a5e2
Build seed node list without duplicates
The random selection of a node shouldn't favor repeats that occur in the
hardcoded and DNS seed node lists.

Remove hardcoded ":18080" address which gives parse error.

Test: bitmonerod --log-level 2

The seed node list displayed at startup shouldn't show duplicate
addresses (includes port).
2015-05-25 22:11:44 -07:00
Riccardo Spagni
6f15194049
Merge pull request #290
fee8424 Allow name@domain.tld for OpenAlias lookups (warptangent)
a0fe18f Revert "Allow name@domain.tld for OpenAlias lookups" (warptangent)
2015-05-20 14:36:38 +02:00
Riccardo Spagni
38068d07ca
Merge pull request #288
f278fe3 s/terget/target/ (moneromooo-monero)
d8ee0a9 print limits when running limit commands with no arguments (moneromooo-monero)
2015-05-20 14:36:07 +02:00
Riccardo Spagni
2939361d72
Merge pull request #287
d1eac1b Support debugging command --pop-blocks on in-memory blockchain (warptangent)
2015-05-20 14:35:50 +02:00
Riccardo Spagni
53ac50733a
Merge pull request #285
087d7f3 Add spendkey dump to simplewallet (luigi1111)
2015-05-20 14:34:29 +02:00
luigi1111
087d7f33e7 Add spendkey dump to simplewallet 2015-05-19 19:08:37 -05:00
warptangent
fee8424938
Allow name@domain.tld for OpenAlias lookups
Based on tewinget's update.
Make OpenAlias address format independent of existing DNS functions.

Add tests.

Test:

make debug-test
cd build/debug/tests/unit_tests
# test that regular DNS functions work, including IPv4 lookups.
# also test function that converts OpenAlias address format
make && ./unit_tests --gtest_filter=DNSResolver*
# test that OpenAlias addresses like donate@getmonero.org work from
# wallet tools
make && ./unit_tests --gtest_filter=AddressFromURL.Success
2015-05-19 02:56:04 -07:00
warptangent
a0fe18f63a
Revert "Allow name@domain.tld for OpenAlias lookups"
This reverts commit b18368b635.
2015-05-19 02:49:39 -07:00
Thomas Winget
01076ae700
Check if LMDB needs resize every 1000 blocks
(this was 10 for testing purposes)
2015-05-18 06:18:31 -04:00
Thomas Winget
b0d849e0a4
null out batch txn pointer as needed (BlockchainLMDB) 2015-05-18 06:12:54 -04:00
moneromooo-monero
f278fe3883
s/terget/target/ 2015-05-17 13:16:44 +01:00
moneromooo-monero
d8ee0a95c7
print limits when running limit commands with no arguments
It's more user friendly that an error message saying the command
does not exist.
2015-05-17 13:15:09 +01:00
warptangent
d1eac1b71c
Support debugging command --pop-blocks on in-memory blockchain
Add public method blockchain_storage::debug_pop_block_from_blockchain()

Ensure blockchain_import calls destructors before exit.

To test:

DATABASE=memory make release

// create blockchain.bin from blockchain.raw if needed
build/release/bin/blockchain_import --block-stop 1000

// try popping a single block
build/release/bin/blockchain_import --pop-blocks 1
2015-05-16 19:38:52 -07:00
Thomas Winget
7b7ef73c15
LMDB should now dynamically resize the mapsize
Some filesystems (*cough* NTFS *cough*) aren't good with sparse files,
so this makes LMDB dynamically resize its mapsize as needed.  Note: the
check interval is currently every 10 blocks (for testing) and will
probably need to change to 1000 or something.  Default mapsize set to
1GiB.

Blockchain conversion tools using batching will probably segfault, I'll
fix that in the next commit.
2015-05-16 22:05:54 -04:00
warptangent
d35bffb950
Allow BlockchainLMDB to be opened in read-only mode
Have blockchain_export use read-only mode when source is BlockchainLMDB.
2015-05-16 01:34:58 -07:00
Thomas Winget
ac79502308
Move mdb_txn_safe implementation to cpp file 2015-05-15 20:42:47 -04:00
warptangent
73d3511412
Rename "--block-number" option to "--block-stop"
Update help output for this and other options.
2015-05-15 17:26:43 -07:00
warptangent
2b2dbd887d
Check if chunk size is zero instead of negative
This corrects an unnecessary check and fixes compile error on OS X.
2015-05-15 17:23:01 -07:00
Thomas Winget
b1d92bcc37
Fixes changes to sort tx by fee per kb 2015-05-13 20:27:06 -04:00
Riccardo Spagni
1d42deb767
Merge pull request #281
ac011b4 Rename src/blockchain_converter/ to src/blockchain_utilities/ (warptangent)
ed9c639 Add --block-number option to blockchain_import (warptangent)
1eb4c66 Update blockchain utilities with portable bootstrap file format (warptangent)
54bd9c1 Add MDB_NORDAHEAD as a supported LMDB flag for blockchain_import (warptangent)
a52496d Condense #if directives (warptangent)
8c1a188 Add basic "pop blocks" command to blockchain_import for debugging (warptangent)
71af046 Update log statements (warptangent)
2015-05-13 11:21:42 +02:00
Riccardo Spagni
ec5eca699d
Merge pull request #280
2ff0d75 Fix missing virtual destructor (Sergey Kazenyuk)
eb565a1 Suppress 'register storage class is deprecated' warning in boost dependency library (Sergey Kazenyuk)
2015-05-13 11:21:00 +02:00
Riccardo Spagni
a8a5939df3
Merge pull request #277
48926d0 Fix incompatibility with blockchain exporter when source is LMDB (warptangent)
2015-05-13 11:20:28 +02:00
Riccardo Spagni
012164fff8
resolved merge conflict in tx_pool.cpp 2015-05-13 11:18:22 +02:00
Riccardo Spagni
85589274aa
Merge pull request #274
b18368b Allow name@domain.tld for OpenAlias lookups (Thomas Winget)
2015-05-13 11:07:44 +02:00
warptangent
ac011b4312
Rename src/blockchain_converter/ to src/blockchain_utilities/
Update appropriate files (CMakeLists.txt, README.md)
2015-05-08 14:24:51 -07:00
warptangent
ed9c639612
Add --block-number option to blockchain_import
This enables the importer to stop after reaching a specified block
number (zero-based index), before reaching the end of the source
blockchain.
2015-05-08 14:12:30 -07:00
warptangent
1eb4c66ad8
Update blockchain utilities with portable bootstrap file format
Remove repeated coinbase tx in each exported block's data.

Add resume from last exported height to blockchain_export, making it the
default behavior when the file already exists.

Start reorganizing the utilities.

Various cleanup.

Update output, including referring to both height and block numbers as
zero-based instead of one-based. This better matches the block data,
rather than just some parts of the existing codebase.

Use smaller default batch sizes for importer when verifying, so progress
is saved more frequently.

Use small default batch size (1000) for importer on Windows, due to
current issue with big transaction sizes on LMDB.

file format
-----------
[4-byte magic | variable-length header | block data]

header
------
4-byte file_info length
file_info struct
  file format major version
  file format minor version
  header length (includes file_info struct)
[rest of header, padded with 0 bytes up to header length]

block data
----------
4-byte chunk/block_package length
block_package struct
  block
  txs (coinbase/miner tx included already in block)
  block_size
  cumulative_difficulty
  coins_generated
4-byte chunk/block_package length
block_package struct
[...]
2015-05-08 14:12:20 -07:00
warptangent
54bd9c1ed5
Add MDB_NORDAHEAD as a supported LMDB flag for blockchain_import 2015-05-08 14:12:18 -07:00
warptangent
a52496de77
Condense #if directives 2015-05-08 14:12:13 -07:00
warptangent
8c1a1884b5
Add basic "pop blocks" command to blockchain_import for debugging
Usage: blockchain_import --pop-blocks <num_blocks>
2015-05-08 14:12:08 -07:00
warptangent
71af04669c
Update log statements
Use filesystem path conversion to string() instead of c_str().
Windows may otherwise output an address.
2015-05-08 14:12:06 -07:00
warptangent
48926d0eeb
Fix incompatibility with blockchain exporter when source is LMDB
Instantiate BlockchainDB in blockchain exporter to reflect recent
updates.

This applies when blockchain_export.h defines SOURCE_DB as DB_LMDB.
2015-05-08 14:04:37 -07:00
Sergey Kazenyuk
867e98d739 Merge branch 'clang_fixes' into clang_fixes-master 2015-05-06 19:10:51 +03:00
Riccardo Spagni
8005a0c7a1
Merge pull request #269
641d824 Keep memory pool consistent when stuck tx removed (warptangent)
b76857f Add mempool output to daemon via command and RPC (warptangent)
2015-05-06 08:09:31 +02:00
Riccardo Spagni
9598a39578
Merge pull request #268
2717883 DNS Checkpoint updating-related fixes/changes (Thomas Winget)
2015-05-05 13:58:43 +02:00
Thomas Winget
385d7c0495
Sort txs by per-kb-fee for miners 2015-04-30 01:02:12 -04:00
Thomas Winget
1b2614ba83
When removing 'stuck' transactions, don't ignore the first tx in the pool 2015-04-30 00:23:00 -04:00
Thomas Winget
b18368b635
Allow name@domain.tld for OpenAlias lookups 2015-04-29 21:31:34 -04:00
warptangent
641d824f37
Keep memory pool consistent when stuck tx removed
When a stuck tx is removed from memory pool, first remove the associated
spent key images.
2015-04-23 07:04:36 -07:00
warptangent
b76857f9d9
Add mempool output to daemon via command and RPC
This is for the "print_pool" command and "get_transaction_pool" RPC
method.

Add mempool's spent key images to the results.
2015-04-23 07:04:36 -07:00
Thomas Winget
2717883dba
DNS Checkpoint updating-related fixes/changes
Only one thread will be doing the updating.

Two valid responses must match, and the first two that match will be
used.
2015-04-22 04:36:39 -04:00
Sergey Kazenyuk
2ff0d757eb Fix missing virtual destructor 2015-04-20 20:17:11 +03:00
Javier Smooth
1b19ee040f disable non-working optimized slow_hash on 32 bit intel 2015-04-13 16:38:33 -07:00
rfree2monero
32c19c6c3d
[fix] log level change. compilation: dns, tests
old unbound #warning does not block compilation
unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-10 16:54:21 +02:00
Riccardo Spagni
277a207b2f
Merge pull request #259
5b01493 Fixes start_mining in cli interactive mode (Thomas Winget)
2015-04-10 10:08:30 +02:00
Thomas Winget
5b01493047
Fixes start_mining in cli interactive mode 2015-04-10 04:08:04 -04:00
Thomas Winget
ae08be5394
Disable DNS checkpoint updating on testnet 2015-04-08 18:07:46 -04:00
Riccardo Spagni
c41d14b2aa
Merge pull request #256
7d8acd1 explicitly disable AES on ARM (Riccardo Spagni)
4222b37 add arm6 target and flags (Riccardo Spagni)
5675325 new makefile targets for static builds (Riccardo Spagni)
9519526 Only compile BerkeleyDB as an option in non-static (Thomas Winget)
7b14d4a Steps toward multiple dbs available -- working (Thomas Winget)
dbdcf11 blockchain_converter: Add support for resume from last block (warptangent)
4880803 blockchain_import: lengthen string for line clear (warptangent)
7476d2e blockchain_export: show progress during export (warptangent)
4bedd68 Update Blockchain::get_db() to return reference instead of pointer (warptangent)
0386e99 Add README for blockchain converter, importer, and exporter utilities (warptangent)
ead7fad BerkeleyDB implementation of BlockchainDB seems to be working! (Thomas Winget)
ffadb65 blockchain_export: Add compile-time support for BlockchainDB (warptangent)
f6cbfb6 Add blockchain_export utility (warptangent)
275cbd4 Add support for database open with flags (warptangent)
cb862cb Add mdb_flags variable to LMDB database open (warptangent)
260cc56 Add blockchain_import utility (warptangent)
ca75b47 Blockchain: add get_db() accessor, needed for blockchain_import (warptangent)
a3dd9d1 blockchain_converter: Add support for batch transactions (warptangent)
acb5d29 Update and relocate comment that applies class wide (warptangent)
bd9da6d Merges #33 (Thomas Winget)
6e9e8ab Move db_drivers/ to external/ (Thomas Winget)
56a1bf5 fixed BUILD_64 option (Riccardo Spagni)
c97a685 fixed arch_width option (Riccardo Spagni)
3a3c07c fixed msys2 / mingw folders based on architecture, added license to unbound CMakeList as that is not part of standard Unbound (Riccardo Spagni)
3b3da86 moved 32-bit/64-bit detection into main CMakeLists (Riccardo Spagni)
a0cbf73 removed findlmdb.cmake, no longer required (Riccardo Spagni)
0e8bbdb 32-bit LMDB, removed check for in-system LMDB as it is consensus-critical (Riccardo Spagni)
11e8157 Revert "Moved db_drivers/ into external/ for consistency" (Thomas Winget)
daf2a8f Revert "Build fixed, goofed up some CMake" (Thomas Winget)
e146027 BlockchainBDB passes unit tests (Thomas Winget)
43477b7 BerkeleyDB Blockchain building, not working yet (Thomas Winget)
cade0da CMake wiring, minor cleanup, minor test addition (Thomas Winget)
1bc8939 BerkeleyDB BlockchainDB impl copy/paste/modify (Thomas Winget)
5112dc3 Try to not pollute cryptonote namespace (Thomas Winget)
edef0bb Initial commit of BDB BlockchainDB implementation (Thomas Winget)
eee3ee7 BlockchainDB implementations have names now (Thomas Winget)
5d2a2b7 Fixed includes in BlockchainDB unit tests (Thomas Winget)
8b82f3c Build fixed, goofed up some CMake (Thomas Winget)
b213356 Moved db_drivers/ into external/ for consistency (Thomas Winget)
5eab480 Moved BlockchainDB into its own src/ subfolder (Thomas Winget)
0ad0784 Changed log level of debug message -- too spammy (Thomas Winget)
6485dac BlockchainLMDB: Add profiling to tx_exists() (warptangent)
83fb6d8 BlockchainLMDB: Add batch transaction support to tx_exists() (warptangent)
8529c0e BlockchainDB, BlockchainLMDB: Add profiling for DB commits (warptangent)
7a66b8b BlockchainDB: Add virtual function declarations for batch transactions (warptangent)
b7a2d84 BlockchainLMDB: Add check for open database to two functions (warptangent)
58ecc58 BlockchainLMDB: Add support for batch transactions (warptangent)
8909d7d Improve block and tx processing efficiency by less repeat hashing (warptangent)
3676ac5 Add profiling to block and tx processing (warptangent)
ce71abd Move LMDB storage to subfolder (warptangent)
42f8fe5 Fix formatting (warptangent)
aa82f78 Fix log statement (warptangent)
26873db Remove unused variable (warptangent)
4b90fd3 Add log statement (warptangent)
2531aa3 Add and extend log statements (warptangent)
59305d3 Blockchain: match original function declaration from blockchain_storage (warptangent)
cd972bd Update year and formatting in license (warptangent)
b88ab64 Fix Blockchain::get_tail_id() to set parameter to last block number instead of height (warptangent)
963bc09 Revert "Bounds error, should fix #27" (warptangent)
6f1c4b4 Bounds error, should fix #27 (Thomas Winget)
84fe5fb Add compile-time support for both db implementations: in-memory and LMDB (warptangent)
8bd1983 Blockchain: reflect log updates from blockchain_storage (warptangent)
7f9b070 Blockchain: reflect log and assert updates from blockchain_storage (warptangent)
70342ec Blockchain: reflect log level of blockchain_storage (warptangent)
c8d27fb Blockchain: reflect assert behavior of blockchain_storage for get_tx_outputs_gindexs() (warptangent)
d00ee78 Update recently added log statement to fix possible null dereference (warptangent)
acd4c36 Should fix std::min issues related to size_t (Thomas Winget)
3488359 Add in-source lmdb to build process (Thomas Winget)
4e45fae Initial import of lmdb source (Thomas Winget)
800d9b9 Remove code previously made unused and marked unused (warptangent)
0840c2f Fix height assertion in Blockchain::handle_alternative_block() (warptangent)
63051be Fix comparison between main and alternate chain's cumulative difficulty. (warptangent)
909ea81 Remove a have_block() check so alternate block can be processed (warptangent)
4d0a94b Complete implementation of transaction removal (warptangent)
1701c26 Use block index when obtaining block's difficulty for log statement (warptangent)
4eba21f Fix transfers to support mixins (warptangent)
d045dfa Fix transfers (without mixins) (warptangent)
429a740 throw inline functions need to keep exception type (Thomas Winget)
14555ee Fixes segfault in Blockchain::handle_alternative_block (Thomas Winget)
5086ca1 add BlockchainDB tests to new cmake (Thomas Winget)
c5c100c Obtain tx hash and tx output index from amount and output offset (warptangent)
ad8200a db_lmdb: fix global index calculation off by 1 (moneromooo-monero)
57b80c5 db_lmdb: remove redundant checks (moneromooo-monero)
1362846 blockchain_converter: add --testnet for converting testnet blockchain (moneromooo-monero)
c50cd95 Fixes a bug with getting output metadata from BlockchainDB (Thomas Winget)
c3fa07b update comments to reflect changed code (Thomas Winget)
59d2b0e db_lmdb: do not give the group database write permissions (moneromooo-monero)
4c2a452 db_lmdb: catch attempt to remove block from an empty blockchain (moneromooo-monero)
3a3459d db_lmdb: factor all the log+throw code paths (moneromooo-monero)
3fcb8da db_lmdb: factor the MDB_val setup code (moneromooo-monero)
609cf7f blockchain_converter: a bit more user friendly output (moneromooo-monero)
2b9f737 blockchain_converter: only call data path function once (moneromooo-monero)
1860658 blockchain: do not append "testnet" to the data directory (moneromooo-monero)
1c578ad db_lmdb: remove block timestamp too when removing a block (moneromooo-monero)
c93a186 db_lmdb: do not cast const away (moneromooo-monero)
198368b blockchain: fix wallet syncing from scratch (moneromooo-monero)
1d23db2 db_lmdb: do not keep a dangling pointer to stack objects (moneromooo-monero)
29b5876 db_lmdb: make cursor internal members private (moneromooo-monero)
a3157d7 blockchain_storage: refactor genesis block creation (moneromooo-monero)
8e41b1e blockchain_storage: add consts where appropriate (moneromooo-monero)
98bdadc blockchain_converter: delete blockchain on succesful exit (moneromooo-monero)
256162f checkpoints: add consts where appropriate (moneromooo-monero)
b7270ab blockchain: add consts where appropriate (moneromooo-monero)
23f3cb4 blockchain_db: add consts where appropriate (moneromooo-monero)
10fd6ca blockchain_db: factor some exception code (moneromooo-monero)
11129b9 blockchain_converter: use the actual blockchain location (moneromooo-monero)
0886183 build: add liblmdb to the cmake autodetection system (moneromooo-monero)
215e63b extraneous semicolon in Blockchain::complete_timestamps_vector (Thomas Winget)
8e1b7e2 raised maximum mapsize for lmdb to ~16GB (Thomas Winget)
6c8b8ac more blockchain height-related fixes, syncing other nodes code this time (Thomas Winget)
9455e0c ~ didn't work, need hard path.  debug print. (Thomas Winget)
4af0918 very, VERY primitive blockchain converter (Thomas Winget)
26a7db3 add new checkpointing behavior to Blockchain class (Thomas Winget)
767aac2 Remove unused dependency (Thomas Winget)
006e106 Store output pubkeys separately, bug fixes (Thomas Winget)
ab7951d Minor bugfixes, redundancy removal (Thomas Winget)
71b18d7 moar bug fixes, removed debug prints (Thomas Winget)
0915913 BlockchainLMDB seems to be working*! (Thomas Winget)
1a546e3 some bug fixes, but still needs work (Thomas Winget)
006afe2 Minor bug fixes and debug prints (Thomas Winget)
90f402e minor fixes to Blockchain.cpp (Thomas Winget)
74a1a89 Integrate BlockchainDB into cryptonote_core (Thomas Winget)
d8c570b All LMDB BlockchainDB implemented, not tested (Thomas Winget)
e47e343 LMDB blockchain: remove outputs and spent keys (Thomas Winget)
a0af217 Adding block data to LMDB BlockchainDB coded (Thomas Winget)
db00ce0 Parts of LMDB impl of BlockchainDB done and working (Thomas Winget)
1240cf8 BlockchainDB unit tests, lmdb linker flag (Thomas Winget)
b98b964 Initial commit of lmdb BlockchainDB impl (Thomas Winget)
bc44bc1 Initial commit of BlockchainDB tests, other misc (Thomas Winget)
90d6f8b Adding libglim as an external library (Thomas Winget)
07733f9 update new blockchain to build with new changes (Thomas Winget)
1ffbeb2 stupid past me, fixing typos and shit... (Thomas Winget)
67515b8 missing typedef (Thomas Winget)
aba548c import of BlockchainDB files (Thomas Winget)
2015-04-08 23:08:27 +02:00
rfree2monero
9bfa593eee [fix] Network 1.8: unlimited the RPC connections
works for unit tests build, too
2015-04-08 19:54:07 +02:00
Thomas Winget
a8bc7182ea
Merge BlockchainDB into upstream 2015-04-07 17:56:18 -04:00
Thomas Winget
9519526224
Only compile BerkeleyDB as an option in non-static 2015-04-07 15:02:20 -04:00
Riccardo Spagni
b2b612794d
no newline at end of file 2015-04-05 17:29:54 +02:00
Javier Smooth
83ddc942c1 handle unlikely rounding up after sqrt 2015-04-05 04:39:09 -07:00
Javier Smooth
f2e8348be0 triangular distribution to choose recent outputs more often for mixins 2015-04-05 04:01:00 -07:00
Riccardo Spagni
6f0d93097e
Merge pull request #252
618f20c Network 1.7; Quieted the debug a bit. (rfree2monero)
391c7f9 Utils: use const, document dbg. Less default debug (rfree2monero)
44f4234 [fix] mac os x includes std::random... (rfree2monero)
162c993 Network 1.6: network limits, logging, +doxy (rfree2monero)
a3b2226 my changelog (rfree2monero)
2900b1e doxygen files (rfree2monero)
1489310 doxygen related tool (rfree2monero)
f9dba47 added windows_stream.* console colors (rfree2monero)
c511abf remerged; commands JSON. logging upgrade. doxygen (rfree2monero)
f79821a fix locking in count-peers thread (2) (rfree2monero)
0198ffb 2014 network limit 1.3 fix log/path/data +utils (rfree2monero)
ae2a506 2014 network limit 1.2 +utils +toc -doc -drmonero (rfree2monero)
0f06dca fixed size_t on windows (rfree2monero)
39fc63f removed not needed <netinet/in.h> (rfree2monero)
5ce4256 2014 network limit 1.1 +utils +toc -doc -drmonero (rfree2monero)
eabb519 2014 network limit 1.0a +utils +toc -doc -drmonero (rfree2monero)
2015-04-02 17:43:43 +02:00
Riccardo Spagni
ea32a84e45
Merge pull request #251
c0de96f Fixed DNS resolution bug in Windows (Thomas Winget)
2015-04-02 16:31:13 +02:00
rfree2monero
618f20ce49 Network 1.7; Quieted the debug a bit.
Really really finall version of this changes I hope.
2015-04-02 16:27:19 +02:00
Thomas Winget
c0de96f8bd
Fixed DNS resolution bug in Windows
Due to a bug in unbound, we were passing a string containing a null
character to ub_ctx_resolvconf and ub_ctx_hosts rather than a NULL
pointer.  On *nix this wasn't causing headache, but on Windows this was
causing unbound to not correctly load DNS settings from the OS.

Note on the bug: in a Windows-specific code branch in the function
ub_ctx_hosts(), if the hosts file specified was a NULL pointer, a call
to getenv() was stored in a local char* and later freed.  This is
incorrect, as we do not own that data, and caused the program to crash.
2015-04-02 09:22:31 -04:00
Riccardo Spagni
0823c98bbc
update hardcoded fallback seeds 2015-04-02 11:28:20 +02:00
rfree2monero
162c993262 Network 1.6: network limits, logging, +doxy
-dr.monero

and once more again merged all work to current official monero version
2015-04-01 19:34:59 +02:00
rfree2monero
a3b2226394 my changelog 2015-04-01 19:23:24 +02:00
rfree2monero
c511abf005 remerged; commands JSON. logging upgrade. doxygen 2015-04-01 19:00:45 +02:00
rfree2monero
3cbdf198f1 Merge remote-tracking branch 'monero-official/master' into network-1.6-work1 2015-04-01 18:24:45 +02:00
Thomas Winget
94cb295db4
Merge upstream into blockchain 2015-03-29 09:58:18 -04:00
Thomas Winget
a0590d29cd
Restore daemon interactive mode
Daemon interactive mode is now working again.

RPC mapped calls in daemon and wallet have both had connection_context
removed as an argument as that argument was not being used anywhere.
2015-03-27 08:01:30 -04:00
Riccardo Spagni
65d6d36449
Merge pull request #244
e6740ee Enforce DNSSEC for checkpoint updates (Thomas Winget)
dbf46a7 DNSSEC added (hardcoded key) (Thomas Winget)
2015-03-26 13:50:06 +02:00
Riccardo Spagni
c1187fabcf
Merge pull request #242
b43716c Do store transaction's blob size in transaction_chain_entry (Sergey Kazenyuk)
3be518f Use single get_transaction_hash to get both id and blob size (Sergey Kazenyuk)
2015-03-26 13:47:36 +02:00
Riccardo Spagni
8636b95f37
Merge pull request #239
02969d6 default mix factor in simplewallet (smooth)
2015-03-26 13:36:21 +02:00
Thomas Winget
7b14d4a17f
Steps toward multiple dbs available -- working
There will need to be some more refactoring for these changes to be
considered complete/correct, but for now it's working.

new daemon cli argument "--db-type", works for LMDB and BerkeleyDB.

A good deal of refactoring is also present in this commit, namely
Blockchain no longer instantiates BlockchainDB, but rather is passed a
pointer to an already-instantiated BlockchainDB on init().
2015-03-25 12:09:44 -04:00
Thomas Winget
874f48bc82
update berkeleydb branch to blockchain branch 2015-03-25 07:30:23 -04:00
Thomas Winget
5c0bc0050c
Merge upstream updates into blockchain branch 2015-03-25 05:56:36 -04:00
Thomas Winget
e6740ee103
Enforce DNSSEC for checkpoint updates 2015-03-24 06:59:38 -04:00
Thomas Winget
dbf46a721a
DNSSEC added (hardcoded key)
DNSSEC is now implemented with the hardcoded key from unbound.
This will need to be not hardcoded in the future, but is okay for now.

Unit tests updated for DNSSEC (as well as for the fact that, contrary to
previous assumption, example.com does not have a static IP address).
2015-03-24 06:34:15 -04:00
Thomas Winget
8855a32044
Merge upstream to daemonize changes
Preparation for PR
2015-03-24 02:47:15 -04:00
warptangent
dbdcf11778
blockchain_converter: Add support for resume from last block
Add option "--resume <on|off>" where default is on.
2015-03-23 18:52:55 -07:00
warptangent
488080326c
blockchain_import: lengthen string for line clear 2015-03-22 15:45:37 -07:00
warptangent
7476d2e253
blockchain_export: show progress during export 2015-03-22 15:45:37 -07:00
warptangent
4bedd68d2c
Update Blockchain::get_db() to return reference instead of pointer
Where this method is used, a BlockchainDB object is always expected, so
a pointer is unnecessary and less safe.
2015-03-22 15:45:36 -07:00
warptangent
0386e9925b
Add README for blockchain converter, importer, and exporter utilities 2015-03-22 15:45:25 -07:00
Thomas Winget
f78bb00943
Hopefully fixes build on Windows for real this time 2015-03-20 16:56:55 -04:00
Thomas Winget
2b0583b2c6
Hopefully fixes build on Windows 2015-03-20 16:40:54 -04:00
Thomas Winget
ead7fad552
BerkeleyDB implementation of BlockchainDB seems to be working! 2015-03-17 22:12:09 -04:00
Thomas Winget
8e3347f310
Pull blockchain changes into berkeleydb branch 2015-03-17 19:52:53 -04:00
Thomas Winget
e146027acd
BlockchainBDB passes unit tests 2015-03-17 17:18:45 -04:00
warptangent
ffadb6571a
blockchain_export: Add compile-time support for BlockchainDB
This allows an LMDB database to be used as the blockchain to export.

Adjust SOURCE_DB in src/blockchain_converter/blockchain_export.h
depending on needs. Defaults to DB_MEMORY.

DB_MEMORY is a sensible default for users migrating to LMDB, as it
allows the exporter to use the in-memory blockchain while the other
binaries work with LMDB, without recompiling anything.
2015-03-16 11:57:26 -07:00
Thomas Winget
43477b7dac
BerkeleyDB Blockchain building, not working yet
Everything except actually *using* BlockchainBDB is wired up, but the db
itself is not yet working.  Some error about user mem not large enough.
I think I know what this error means, but I can't determine the cause.

Notes: BerkeleyDB does not allow 0-indexing in its recno type databases,
  so block numbers *in the database* will be 1-indexed.  Modifications
  to indexing have been made as needed.
2015-03-16 09:14:51 -04:00
Thomas Winget
cade0da8f1
CMake wiring, minor cleanup, minor test addition
Make Cmake things aware of BerkeleyDB and BlockchainBDB

Make the BlockchainDB unit tests aware of BlockchainBDB
2015-03-16 04:17:53 -04:00
Thomas Winget
1bc89398b4
BerkeleyDB BlockchainDB impl copy/paste/modify
LMDB implementation code copy/paste/modified into the Berkeley DB
implementation.  Need to test if it builds, then if it works, and so on,
but the code is all there.
2015-03-16 04:17:48 -04:00
Thomas Winget
5112dc37d7
Try to not pollute cryptonote namespace 2015-03-16 04:17:44 -04:00
Thomas Winget
edef0bb771
Initial commit of BDB BlockchainDB implementation
Basically verbatim copy of LMDB implementation, but with the guts ripped
out and includes changed, etc.
2015-03-16 04:17:32 -04:00
warptangent
f6cbfb623b
Add blockchain_export utility
Based on work by tomerkon.
See https://github.com/tomerkon/bitmonero
  src/cryptonote_core/bootfilesaver.{h,cpp}
  src/bootfilegen/bootfilegen.cpp
2015-03-16 00:26:59 -07:00
warptangent
275cbd4348
Add support for database open with flags
Add support to:
  - BlockchainDB, BlockchainLMDB
  - blockchain_import utility to open LMDB database with one or more
    LMDB flags.

Sample use:
  $ blockchain_import --database lmdb#nosync
  $ blockchain_import --database lmdb#nosync,nometasync
2015-03-16 00:26:59 -07:00
warptangent
cb862cb81a
Add mdb_flags variable to LMDB database open 2015-03-16 00:26:58 -07:00
warptangent
260cc56fae
Add blockchain_import utility
This imports to the blockchain database from an exported blockchain
file.

It can be used to bootstrap a new database or to add blocks to an
existing one.

Supports:
  - both the in-memory and LMDB implementations
  - optional: batching, verification, testnet

See help for usage.

Based on work by tomerkon.
See https://github.com/tomerkon
  src/cryptonote_core/bootfileloader.{h,cpp}
2015-03-16 00:26:51 -07:00
warptangent
ca75b4789c
Blockchain: add get_db() accessor, needed for blockchain_import
This handling may be changed in the future.
2015-03-15 13:22:52 -07:00
warptangent
a3dd9d10f3
blockchain_converter: Add support for batch transactions
Add log level support.

Add testnet support.

Add command-line options:
  --help
  --data-dir
  --testnet-data-dir
  --testnet
  --log-level
  --batch
  --batch-size
  --block-number

See help for usage. Run at log level 1 to see profiling stats.
2015-03-15 13:22:47 -07:00
warptangent
acb5d291b8
Update and relocate comment that applies class wide 2015-03-15 13:22:32 -07:00
Sergey Kazenyuk
b43716c756 Do store transaction's blob size in transaction_chain_entry 2015-03-15 04:35:34 +03:00
Sergey Kazenyuk
3be518ff40 Use single get_transaction_hash to get both id and blob size 2015-03-15 04:33:34 +03:00
Thomas Winget
eee3ee7073
BlockchainDB implementations have names now
In order to make things more general, BlockchainDB now has get_db_name()
which should return a string with the "name" of that type of db.
This "name" will be the subfolder name that holds that db type's files
within the monero folder.

Small bugfix: blockchain_converter was not correctly appending this in
the prior hard-coded-string implementation of the subfolder data
directory concept.
2015-03-13 21:39:27 -04:00
smooth
02969d69f0 default mix factor in simplewallet 2015-03-10 01:44:46 -07:00
Thomas Winget
5eab480cb1
Moved BlockchainDB into its own src/ subfolder
Ostensibly janitorial work, but should be more relevant later down the
line.  Things that depend on core cryptonote things (i.e.
    cryptonote_core) don't necessarily depend on BlockchainDB and thus
have no need to have BlockchainDB baked in with them.
2015-03-06 15:20:45 -05:00
smooth
7e72e943db update checkpoint 2015-03-06 02:38:06 -08:00
smooth
41a95e7b11 add comment about avoiding overflow 2015-03-05 00:45:54 -08:00
smooth
754a785ee1 minimum subsidy for mining incentives, remove unused LEGACY_FEE define 2015-03-04 23:35:04 -08:00
Riccardo Spagni
c01069f352
fixed English word list issue: 'launchpad' should be 'ourselves' 2015-03-04 15:31:24 +02:00
Riccardo Spagni
10e4132e22
fixed English word list issue: 'incline' should have remained 'inline' 2015-03-04 15:29:20 +02:00
Thomas Winget
9dab105e2e
DNS checkpoint loading for testnet should now be correct 2015-03-01 03:36:46 -05:00
Thomas Winget
52f9629bd7
sending commands to forked daemon works on testnet now 2015-03-01 02:35:33 -05:00
Thomas Winget
76289d0e3b
Fix tests building -- function signatures changed 2015-03-01 02:21:19 -05:00
rfree2monero
f79821ac7e fix locking in count-peers thread (2) 2015-02-24 21:06:02 +01:00
rfree2monero
0198ffb220 2014 network limit 1.3 fix log/path/data +utils
+toc -doc -drmonero

Fixed the windows path, and improved logging and data
(for graph) logging, fixed some locks and added more checks.

Still there is a locking error,
not added by my patches, but present in master version
(locking of map/list of peers).
2015-02-24 20:12:56 +01:00
Thomas Winget
db53e1956a
revert stop_daemon method to use correct exit
This was changed because sometimes the daemon does not complete its exit
routine with this method, but as it does correctly wind most things down
even if it gets stuck I've changed it back.
2015-02-24 00:54:50 -05:00
Thomas Winget
96cbecffd7
RPC calls for background daemon added in
The RPC calls the daemon executable uses to talk to the running daemon
instance have mostly been added back in.  Rate limiting has not been
added in upstream, but is on its way in a separate effort, so those
calls are still NOPed out.
2015-02-24 00:44:36 -05:00
Thomas Winget
9193d6fb5b
Daemonize changes pulled in -- daemon builds
many RPC functions added by the daemonize changes
(and related changes on the upstream dev branch that were not merged)
were commented out (apart from return).  Other than that, this *should*
work...at any rate, it builds, and that's something.
2015-02-24 00:05:19 -05:00
Thomas Winget
0ad0784f46
Changed log level of debug message -- too spammy 2015-02-23 18:28:20 -05:00
warptangent
6485dacc2f
BlockchainLMDB: Add profiling to tx_exists() 2015-02-23 00:33:39 -08:00
warptangent
83fb6d8d07
BlockchainLMDB: Add batch transaction support to tx_exists() 2015-02-23 00:33:38 -08:00
warptangent
8529c0ea9a
BlockchainDB, BlockchainLMDB: Add profiling for DB commits 2015-02-23 00:33:38 -08:00
warptangent
7a66b8bbcf
BlockchainDB: Add virtual function declarations for batch transactions 2015-02-23 00:33:38 -08:00
warptangent
b7a2d84919
BlockchainLMDB: Add check for open database to two functions 2015-02-23 00:33:38 -08:00
warptangent
58ecc58be1
BlockchainLMDB: Add support for batch transactions 2015-02-23 00:33:37 -08:00
warptangent
8909d7d82e
Improve block and tx processing efficiency by less repeat hashing
BlockchainLMDB::add_block()
  BlockchainLMDB::add_transaction_data()

  BlockchainDB::add_transaction()
2015-02-23 00:33:37 -08:00
warptangent
3676ac5841
Add profiling to block and tx processing 2015-02-23 00:33:37 -08:00
warptangent
ce71abd0fe
Move LMDB storage to subfolder 2015-02-23 00:33:37 -08:00
warptangent
42f8fe5c7f
Fix formatting 2015-02-23 00:33:36 -08:00
warptangent
aa82f786c7
Fix log statement 2015-02-23 00:33:36 -08:00
warptangent
26873db199
Remove unused variable 2015-02-23 00:33:36 -08:00
warptangent
4b90fd389d
Add log statement 2015-02-23 00:33:36 -08:00
warptangent
2531aa31f8
Add and extend log statements 2015-02-23 00:33:35 -08:00
warptangent
59305d3137
Blockchain: match original function declaration from blockchain_storage 2015-02-23 00:33:35 -08:00
warptangent
cd972bdcc2
Update year and formatting in license 2015-02-23 00:33:26 -08:00
warptangent
b88ab643ca
Fix Blockchain::get_tail_id() to set parameter to last block number instead of height
This reflects the behavior of blockchain_storage::get_tail_id().

Fixes #27 so that RPC method getlastblockheader works.
2015-02-22 10:41:41 -08:00
warptangent
963bc09087
Revert "Bounds error, should fix #27"
This reverts commit 6f1c4b4c2c.
2015-02-22 10:31:11 -08:00
Thomas Winget
6f1c4b4c2c
Bounds error, should fix #27 2015-02-20 21:09:32 -05:00
rfree2monero
ae2a50659f 2014 network limit 1.2 +utils +toc -doc -drmonero
new update of the pr with network limits

more debug options:
discarding downloaded blocks all or after given height.
trying to trigger the locking errors.

debug levels polished/tuned to sane values.
debug/logging improved.

warning: this pr should be correct code, but it could make
an existing (in master version) locking error appear more often.

it's a race on the list (map) of peers, e.g. between closing/deleting
them versus working on them in net-limit sleep in sending chunk.

the bug is not in this code/this pr, but in the master version.

the locking problem of master will be fixed in other pr.

problem is ub, and in practice is seems to usually cause program abort
(tested on debian stable with updated gcc). see --help for option
to add sleep to trigger the error faster.
2015-02-20 22:28:03 +01:00
rfree2monero
39fc63f48d removed not needed <netinet/in.h> 2015-02-20 22:13:00 +01:00
rfree2monero
5ce4256e3d 2014 network limit 1.1 +utils +toc -doc -drmonero
Update of the PR with network limits

works very well for all speeds
(but remember that low download speed can stop upload
because we then slow down downloading of blockchain
requests too)

more debug options

fixed pedantic warnings in our code
should work again on Mac OS X and FreeBSD
fixed warning about size_t
tested on Debian, Ubuntu, Windows(testing now)

TCP options and ToS (QoS) flag
FIXED peer number limit
FIXED some spikes in ingress/download
FIXED problems when other up and down limit
2015-02-20 22:13:00 +01:00