Commit Graph

12267 Commits

Author SHA1 Message Date
warptangent
0386e9925b
Add README for blockchain converter, importer, and exporter utilities 2015-03-22 15:45:25 -07:00
Thomas Winget
51e3579a80
Fixed bug in static linking boost on MINGW
There was a workaround for linking to boost at all on MINGW, but
unfortunately this workaround would not correctly link to boost
statically.  This workaround for that workaround works around the issue
that that workaround had.
2015-03-22 06:25:53 -04: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
38c54b79fd
Merges PR #35 2015-03-17 19:07:09 -04:00
Thomas Winget
bd9da6d5a5
Merges #33
Because of some github fuckery I had to manually cherry-pick/rebase
fluffypony's 32- and 64-bit lmdb changes, hence this isn't actually a
merge commit.
2015-03-17 18:58:09 -04:00
Thomas Winget
6e9e8ab620
Move db_drivers/ to external/
Also change LMDB Cmake variables to CACHE rather than upgrading them
through several parent scopes.
2015-03-17 18:55:24 -04:00
Riccardo Spagni
56a1bf527b
fixed BUILD_64 option 2015-03-17 18:26:58 -04:00
Riccardo Spagni
c97a685a37
fixed arch_width option 2015-03-17 18:26:48 -04:00
Riccardo Spagni
3a3c07c330
fixed msys2 / mingw folders based on architecture, added license to unbound CMakeList as that is not part of standard Unbound 2015-03-17 18:26:38 -04:00
Riccardo Spagni
3b3da86483
moved 32-bit/64-bit detection into main CMakeLists 2015-03-17 18:26:29 -04:00
Riccardo Spagni
a0cbf733b6
removed findlmdb.cmake, no longer required 2015-03-17 18:26:18 -04:00
Riccardo Spagni
0e8bbdb0bd
32-bit LMDB, removed check for in-system LMDB as it is consensus-critical 2015-03-17 18:25:28 -04:00
Thomas Winget
11e815761f
Revert "Moved db_drivers/ into external/ for consistency"
This reverts commit b21335642e.
2015-03-17 18:03:11 -04:00
Thomas Winget
daf2a8f6cb
Revert "Build fixed, goofed up some CMake"
This reverts commit 8b82f3c57f.
2015-03-17 18:01:25 -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
Thomas Winget
5d2a2b7e69
Fixed includes in BlockchainDB unit tests 2015-03-10 15:17:46 -04:00
Thomas Winget
8b82f3c57f
Build fixed, goofed up some CMake
Forgot that CMake vars set to PARENT_SCOPE will still vanish if that
parent scope goes...out of scope.  LMDB vars elevated one more scope to
compensate for moving db_drivers/ into external/
2015-03-10 12:51:23 -04:00
smooth
02969d69f0 default mix factor in simplewallet 2015-03-10 01:44:46 -07:00
Riccardo Spagni
178b009e90
Merge pull request #238
7e72e94 update checkpoint (smooth)
2015-03-10 10:20:45 +02:00
Thomas Winget
b21335642e
Moved db_drivers/ into external/ for consistency 2015-03-09 15:48:46 -04: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
Riccardo Spagni
8237705964
Merge pull request #237
41a95e7 add comment about avoiding overflow (smooth)
754a785 minimum subsidy for mining incentives, remove unused LEGACY_FEE define (smooth)
2015-03-05 10:56:54 +02: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
Riccardo Spagni
1016712372
markdown formatting fix 2015-03-01 00:03:57 +02:00