Commit graph

639 commits

Author SHA1 Message Date
Thomas Winget c3fa07b44b update comments to reflect changed code 2015-01-04 19:39:43 -08:00
moneromooo-monero 1362846dd7 blockchain_converter: add --testnet for converting testnet blockchain 2015-01-04 19:39:43 -08:00
moneromooo-monero 59d2b0ed1c db_lmdb: do not give the group database write permissions 2015-01-04 19:39:43 -08:00
moneromooo-monero 4c2a45288a db_lmdb: catch attempt to remove block from an empty blockchain
It would probably have thrown when not finding a block at
height 2^64-1, but better make things clear.
2015-01-04 19:39:43 -08:00
moneromooo-monero 3a3459d59b db_lmdb: factor all the log+throw code paths 2015-01-04 19:39:42 -08:00
moneromooo-monero 3fcb8daf6e db_lmdb: factor the MDB_val setup code
It makes the code simpler, avoids possible copy/paste errors
(wrong sizeof, etc), and generally unclutters the calling code.
2015-01-04 19:39:42 -08:00
moneromooo-monero 609cf7fc92 blockchain_converter: a bit more user friendly output 2015-01-04 19:39:42 -08:00
moneromooo-monero 2b9f737872 blockchain_converter: only call data path function once 2015-01-04 19:39:42 -08:00
moneromooo-monero 1860658eec blockchain: do not append "testnet" to the data directory
It is already there (unless overridden via command line).
2015-01-04 19:39:42 -08:00
moneromooo-monero 1c578ad3f8 db_lmdb: remove block timestamp too when removing a block 2015-01-04 19:39:42 -08:00
moneromooo-monero c93a186637 db_lmdb: do not cast const away 2015-01-04 19:39:42 -08:00
moneromooo-monero 198368b2e1 blockchain: fix wallet syncing from scratch
When the wallet syncs from the first block, it is fine to start
at the genesis block.
2015-01-04 19:39:42 -08:00
moneromooo-monero 1d23db220a db_lmdb: do not keep a dangling pointer to stack objects 2015-01-04 19:39:41 -08:00
moneromooo-monero 29b5876ad1 db_lmdb: make cursor internal members private 2015-01-04 19:39:41 -08:00
moneromooo-monero a3157d7b69 blockchain_storage: refactor genesis block creation
The existing assert is kept as it is stricter than the function's
internal assert.
2015-01-04 19:39:41 -08:00
moneromooo-monero 8e41b1e735 blockchain_storage: add consts where appropriate 2015-01-04 19:39:41 -08:00
moneromooo-monero 98bdadcad7 blockchain_converter: delete blockchain on succesful exit
While the dtor implementation does not actually do anything, other
paths do delete it, and the dtor might do someting later.
2015-01-04 19:39:41 -08:00
moneromooo-monero 256162fcd5 checkpoints: add consts where appropriate 2015-01-04 19:39:41 -08:00
moneromooo-monero b7270ab60e blockchain: add consts where appropriate 2015-01-04 19:39:41 -08:00
moneromooo-monero 23f3cb4c0e blockchain_db: add consts where appropriate 2015-01-04 19:39:41 -08:00
moneromooo-monero 10fd6cab6c blockchain_db: factor some exception code
Ideally, the log would go in the exception's ctor, but
two log levels are used, so I'd need to specify the level
in the ctor, which isn't great as it's not really related
to the exception.
2015-01-04 19:39:41 -08:00
moneromooo-monero 11129b9ee4 blockchain_converter: use the actual blockchain location 2015-01-04 19:39:40 -08:00
moneromooo-monero 0886183568 build: add liblmdb to the cmake autodetection system
update for rebase (warptangent 2015-01-04)
  src/cryptonote_core/CMakeLists.txt (edit)
  - replace LMDB_LIBRARIES with LMDB_LIBRARY set from autodetection
2015-01-04 19:39:40 -08:00
Thomas Winget 215e63b79f extraneous semicolon in Blockchain::complete_timestamps_vector
credit here:
https://bitcointalk.org/index.php?topic=583449.msg9562845#msg9562845
2015-01-04 19:39:40 -08:00
Thomas Winget 8e1b7e2ad4 raised maximum mapsize for lmdb to ~16GB 2015-01-04 19:39:40 -08:00
Thomas Winget 6c8b8acfe4 more blockchain height-related fixes, syncing other nodes code this time 2015-01-04 19:39:40 -08:00
Thomas Winget 9455e0cd58 ~ didn't work, need hard path. debug print. 2015-01-04 19:39:40 -08:00
Thomas Winget 4af0918501
very, VERY primitive blockchain converter
hard-coded config folder, hard-coded BlockchainDB subclass.

Needs finessing, but should be testable this way.

update for rebase (warptangent 2015-01-04)
  fix conflicts with upstream CMakeLists.txt files

  src/CMakeLists.txt (edit original commit)
  src/blockchain_converter/CMakeLists.txt (add)
2015-01-04 19:38:56 -08:00
Thomas Winget 26a7db38eb add new checkpointing behavior to Blockchain class 2015-01-04 19:31:20 -08:00
Thomas Winget 006e106ae9 Store output pubkeys separately, bug fixes 2015-01-04 19:31:20 -08:00
Thomas Winget ab7951d99a Minor bugfixes, redundancy removal
Minor bugfixes in block removal

Storing outputs outside their transactions is largely unnecessary, and
thus has been removed.
2015-01-04 19:31:20 -08:00
Thomas Winget 71b18d7166 moar bug fixes, removed debug prints 2015-01-04 19:31:19 -08:00
Thomas Winget 0915913111 BlockchainLMDB seems to be working*!
* - Well, mostly.  Haven't let it sync too far just yet.  Currently
trying to figure out the best way to deal with LMDB/mmap virtual memory
pages.
2015-01-04 19:31:19 -08:00
Thomas Winget 1a546e3222 some bug fixes, but still needs work
There are quite a few debug prints in this commit that will need removed
later, but for posterity (in case someone wants to debug this while I'm
away), I left them in.

Currently errors when syncing on the first block that has a "real"
transaction.  Seems to not be able to validate the ring signature, but I
can't for the life of me figure out what's going wrong.
2015-01-04 19:31:19 -08:00
Thomas Winget 006afe2172 Minor bug fixes and debug prints
Blockchain and BlockchainLMDB classes now have a debug print at the
beginning of each function at log level 2.  These can be removed at any
time, but for now are quite useful.

Blockchain runs, and adds the genesis block just fine, but for some
reason isn't getting new blocks.
2015-01-04 19:31:19 -08:00
Thomas Winget 90f402e258 minor fixes to Blockchain.cpp 2015-01-04 19:31:19 -08:00
Thomas Winget 74a1a89e27
Integrate BlockchainDB into cryptonote_core
Probably needs more looking at -- lot of things were done...in a rushed
sort of way.  That said, it all builds and *should* be at least
testable.

update for rebase (warptangent 2015-01-04)
  fix conflicts with upstream CMakeLists.txt files

  src/CMakeLists.txt (remove edits from original commit)
  tests/CMakeLists.txt (remove edits from original commit)
  src/cryptonote_core/CMakeLists.txt (edit)
  - use blockchain db .cpp and .h files
  - add LMDB_LIBRARIES
2015-01-04 19:29:51 -08:00
Thomas Winget d8c570b588 All LMDB BlockchainDB implemented, not tested
All of the functionality for the LMDB implementation of BlockchainDB is
implemented, but only what is in tests/unit_tests/BlockchainDB.cpp has
been tested.  This is basically add a block, see if you can get the
block and a tx from the block.  More tests should be added at some
point.
2015-01-04 19:01:11 -08:00
Thomas Winget e47e343a1c LMDB blockchain: remove outputs and spent keys 2015-01-04 19:01:10 -08:00
Thomas Winget a0af217d9a Adding block data to LMDB BlockchainDB coded
Still needs testing (and need to write a few more unit tests), but
everything should be there.  Lots of unfortunate duplication,
but...well, I can't see a way around it using LMDB.

A couple of other minor changes in this commit, only slightly relevant.
2015-01-04 19:01:10 -08:00
Thomas Winget db00ce0173 Parts of LMDB impl of BlockchainDB done and working
The rest should just be tedious copypasta and modification.
2015-01-04 19:01:10 -08:00
Thomas Winget b98b96489f Initial commit of lmdb BlockchainDB impl 2015-01-04 18:41:44 -08:00
Thomas Winget bc44bc19f4 Initial commit of BlockchainDB tests, other misc
miscellaneous changes to BlockchainDB/blockchain as well, namely
replacing instances of std::list with std::vector
2015-01-04 18:41:44 -08:00
Thomas Winget 07733f98c0 update new blockchain to build with new changes
Still need to add in the new checkpointing functionality, as well as
touch up a few things, but is okay for now.
2015-01-04 18:41:44 -08:00
Thomas Winget 1ffbeb2d2e stupid past me, fixing typos and shit... 2015-01-04 18:41:44 -08:00
Thomas Winget 67515b8b19 missing typedef 2015-01-04 18:41:43 -08:00
Thomas Winget aba548cbf7 import of BlockchainDB files
tried rebasing, tree-filter, and many other things.  at this point,
the history of these files previous to this can live on
in my bc2 branch, as I'm importing them as-is to here.
2015-01-04 18:41:43 -08:00
Riccardo Spagni f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Thomas Winget 1b462261b8
std::atomic_flag has no copy/move constructor, can't have a vector 2014-12-15 17:43:12 -05:00
Thomas Winget df53c0a595
small typo in previous commit 2014-12-15 17:28:11 -05:00
Thomas Winget 4a53898764
DNS seed timeout and fallback 2014-12-15 17:23:42 -05:00
Riccardo Spagni f4675dc05d
Merge pull request #203
583cf0a Document existing function (warptangent)
95eb944 Repeat prompt for wallet path if invalid (warptangent)
2014-12-13 13:52:30 +02:00
Riccardo Spagni c3ec723882
Merge pull request #202
d7aafd5 wallet2::rewrite update to not require bin file (warptangent)
2014-12-13 13:52:03 +02:00
Riccardo Spagni c1bf8fb94b
Merge pull request #201
9b7e0a0 wallet2::load correctly initialize m_blockchain for wallet loaded without bin file (warptangent)
2014-12-13 13:51:42 +02:00
Riccardo Spagni f5c2a5ec9c
Merge pull request #200
cfc8c55 Add simple_wallet::seed_set_language method (warptangent)
26b87df Add wallet2::verify_password method (warptangent)
2014-12-13 13:51:14 +02:00
Riccardo Spagni d5620851f9 onwards to 0.8.8.7
Signed-off-by: Riccardo Spagni <ric@spagni.net>
2014-12-13 13:45:57 +02:00
warptangent 583cf0ad8a Document existing function 2014-12-11 02:55:44 -08:00
warptangent 95eb944ead
Repeat prompt for wallet path if invalid
simplewallet run without a wallet path argument should prompt again if
an invalid path was entered.

Validity here currently means the string isn't empty.
2014-12-11 02:52:48 -08:00
warptangent d7aafd555a
wallet2::rewrite update to not require bin file
Allow pre-JSON wallet format to load without depending on existing bin
file.

Don't write bin file while inside keys rewrite, so bin file write
behavior here matches that of regular wallet load.
2014-12-10 02:56:54 -08:00
warptangent 9b7e0a06b5
wallet2::load correctly initialize m_blockchain for wallet loaded without bin file
Fix for simplewallet loading a wallet with a keys file but no bin file.

  - this situation previously required a user to restart simplewallet
    before it would refresh its blockchain from the server.
2014-12-10 02:42:15 -08:00
warptangent cfc8c55036
Add simple_wallet::seed_set_language method
Add simple_wallet::set_variable method to provide top-level "set"
command and support "set seed language" command.
2014-12-08 21:57:54 -08:00
warptangent 26b87dfdc2
Add wallet2::verify_password method
Allows wallet password to be verified without changing wallet state.
2014-12-08 21:57:03 -08:00
Riccardo Spagni efad735145
version bump to 0.8.8.6 2014-12-08 22:55:28 +02:00
Riccardo Spagni ebb117c7b6
Merge pull request #196
f9822c4 wallet JSON update for non-deterministic wallet data (warptangent)
4c6230d Checking and handling for deterministic vs non-deterministic wallet (warptangent)
1beedb9 Extract check for deterministic keys to wallet2::is_deterministic() (warptangent)
359ede3 indentation (warptangent)
2290eff replace lines with call to recently added print_seed() (warptangent)
2014-12-08 21:29:28 +02:00
Riccardo Spagni 1925eeffa8
Merge pull request #183
250254c Exception handling while refreshing in rpc wallet (credits to QCN) (Sammy Libre)
2014-12-08 20:03:39 +02:00
warptangent f9822c483e wallet JSON update for non-deterministic wallet data
wallet2::store_keys() and wallet2::load_keys() should only use the JSON
attribute "seed_language" when applicable. That is only for
deterministic wallets.

 - store_keys()  don't add JSON attribute "seed_language" if
   seed_language is empty

 - load_keys()  don't call set_seed_language if JSON attribute
   "seed_language" not present
2014-12-06 03:15:18 -08:00
warptangent 4c6230d6cf Checking and handling for deterministic vs non-deterministic wallet
simple_wallet::seed()

 - Check that wallet is deterministic.

simple_wallet::new_wallet()

 - Prompt for seed language only if it's a non-deterministic wallet,
   along with previous conditions.

simple_wallet::open_wallet()

 - Fixed check for deterministic wallet (flag based on command line
   non-deterministic argument was used before, but it's inapplicable to
   opening an existing wallet).

 - As with deterministic wallet, non-deterministic also included to be
   rewritten to new JSON format file. That's what's done for newly
   generated non-deterministic wallets, so old versions should be
   updated to same format.
2014-12-06 02:24:11 -08:00
warptangent 1beedb9dd4 Extract check for deterministic keys to wallet2::is_deterministic()
It's cleaner for wallet2.cpp and it also allows deterministic check by
simplewallet.cpp.
2014-12-06 02:05:50 -08:00
warptangent 359ede3958 indentation 2014-12-06 01:47:59 -08:00
warptangent 2290eff6d6 replace lines with call to recently added print_seed() 2014-12-06 01:47:05 -08:00
Riccardo Spagni 9f74cc8e19
increased version number for tagged release 2014-12-02 11:42:40 +02:00
Riccardo Spagni a144997c48
fixed CMake version matching 2014-12-02 08:36:01 +02:00
Riccardo Spagni ef2a2b42c9
Merge pull request #186
3300ae5 remove unused display variable (warptangent)
0e0e557 return true on success (warptangent)
2e11eb1 deterministic wallet use of twelve words fixed (warptangent)
21a3c46 ensure that keccak is called on view spend key, not a possibly pre-sc_reduce32 version of it - for deriving view secret key (warptangent)
2014-12-02 07:34:56 +02:00
warptangent 3dd19c4cd4 prompt for seed language and error handling
- "seed" simplewallet command was only displaying seed if wallet was newly generated
2014-12-01 14:36:24 -08:00
warptangent 3300ae5f4e remove unused display variable 2014-12-01 14:08:26 -08:00
warptangent 0e0e55714d return true on success 2014-12-01 13:35:09 -08:00
warptangent 2e11eb1504 deterministic wallet use of twelve words fixed 2014-12-01 13:35:09 -08:00
warptangent 21a3c46a1b ensure that keccak is called on view spend key, not a possibly pre-sc_reduce32 version of it
- for deriving view secret key
2014-12-01 13:35:09 -08:00
Riccardo Spagni affde29754
moved rapidjson to external folder, fixed CMake 2014-12-01 21:15:50 +02:00
Riccardo Spagni 4cd15cdde5
Merge pull request #1
f1eaf88 Prints seed after wallet upgrade. Removed iostream include. (Oran Juice)
70971be Doxygen comments (Oran Juice)
031ca23 Rewrites to old wallet file correctly (Oran Juice)
1f833dc Doxygen comments in (Oran Juice)
0bd88ff Writes seed language while generating wallet. Wallet open fix. (Oran Juice)
09a659e Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility (Oran Juice)
2014-12-01 20:15:06 +02:00
Riccardo Spagni 40971b4ee6
Merge pull request #188
dde7897 Disable legacy fees for now (iamsmooth)
cc74b43 Remove DEFAULT_FEE, add temporary acceptance of too-small per-kb fee >= 0.1, denominations based on DEFAULT_DUST_THRESHOLD, document fee arg to create_transactions as unused, se DEFAULT_DUST_THRESHOLD for wallet dust collection instead of calcualted tx fee (iamsmooth)
2014-11-26 22:45:44 +02:00
Riccardo Spagni ab7c6c07e7
Merge pull request #180
ce71c01 cmake: work around a bug with implicit link directories (Ben Boeckel)
de4fc40 mingw: copy required libraries to the build tree (Ben Boeckel)
ec54e2f cmake: place binaries together in the build tree (Ben Boeckel)
18c56ab msys: don't use LTO (Ben Boeckel)
5680c9c msys: factor out -Werror on msys (Ben Boeckel)
4751542 msys: look in msys' directory for files (Ben Boeckel)
d855fe4 miniupnpc: bump the _POSIX_C_SOURCE feature macro (Ben Boeckel)
c696492 unbound: fix getaddrinfo detection for 32-bit windows (Ben Boeckel)
e377687 cmake: Windows and static builds need this (Ben Boeckel)
01895dd cmake: fix up link lines (Ben Boeckel)
4b6515c unbound: fix type checking (Ben Boeckel)
d43a20f unbound: plumb the libdir up (Ben Boeckel)
7d708e4 cmake: support 2.8.7 (Ben Boeckel)
464c280 cmake: fix up miniupnpc's define (Ben Boeckel)
9689df9 cmake: clean up EXTRA_LIBRARIES (Ben Boeckel)
3b7bdcb cmake: set the project name (Ben Boeckel)
0f0efc4 cmake: prepend to CMAKE_MODULE_PATH (Ben Boeckel)
031e3da cmake: remove scream-make (all-caps functions) (Ben Boeckel)
abbd5c0 unbound: import cmake build system (Ben Boeckel)
e59b5b7 miniupnpc: clean up build system (Ben Boeckel)
475fe20 cmake: minor cleanups (indentation and typos) (Ben Boeckel)
799e8b2 cmake: use option() for STATIC (Ben Boeckel)
c24d22b cmake: clean up if auto-dereferencing (Ben Boeckel)
9ed415a build: inform the build of what generates version.h (Ben Boeckel)
eba180a cmake: support git info in released tarballs (Ben Boeckel)
eeffac6 cmake: fix up BOOST_IGNORE_SYSTEM_PATHS (Ben Boeckel)
a43f1a8 cmake: remove configuration variables (Ben Boeckel)
a87ce09 cmake: factor out error messages (Ben Boeckel)
9aa48b6 miniupnpc: clear out else/endfoo command arguments (Ben Boeckel)
8a86ac8 daemon_tests: update cmake code (Ben Boeckel)
fa3ff75 gtest: support an external gtest (Ben Boeckel)
7bfcffa cmake: put each test executable in its own directory (Ben Boeckel)
f53f047 cmake: handle private vs. public headers (Ben Boeckel)
55ca7d3 cmake: refactor common code with libraries (Ben Boeckel)
c773f46 cmake: refactor common code with executables (Ben Boeckel)
89cff7b cmake: put each library into its own directory (Ben Boeckel)
2014-11-25 21:49:00 +02:00
Ben Boeckel ec54e2f82b cmake: place binaries together in the build tree
This allows Windows to copy binaries to one place rather than to each
executable directory.
2014-11-18 17:02:28 -05:00
iamsmooth dde7897fd4 Disable legacy fees for now 2014-11-11 02:03:00 +00:00
iamsmooth cc74b43651 Remove DEFAULT_FEE, add temporary acceptance of too-small per-kb fee >= 0.1, denominations based on DEFAULT_DUST_THRESHOLD, document fee arg to create_transactions as unused, se DEFAULT_DUST_THRESHOLD for wallet dust collection instead of calcualted tx fee 2014-11-09 10:53:29 +00:00
Thomas Winget d2287d3108 per kb fees not passing correct fee to transfer() 2014-11-06 22:09:23 -07:00
Thomas Winget dc67b12ea9 Should now properly do per-kb fee
I'm an idiot.
2014-11-06 22:09:14 -07:00
Thomas Winget 557e27fd21 per kb fees 2014-11-06 22:09:07 -07:00
Sammy Libre 250254c338 Exception handling while refreshing in rpc wallet (credits to QCN) 2014-11-01 11:30:53 +05:00
Ben Boeckel e3776876af cmake: Windows and static builds need this 2014-10-24 15:52:01 -04:00
Ben Boeckel 01895dd067 cmake: fix up link lines 2014-10-24 15:30:57 -04:00
Ben Boeckel 7d708e4223 cmake: support 2.8.7
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer
versions prefer PUBLIC and PRIVATE instead, but still support the LINK_
prefix.
2014-10-24 15:29:51 -04:00
Ben Boeckel 464c2805e5 cmake: fix up miniupnpc's define
It's only necessary on Windows builds and new versions renamed the
define without any compatibility bridge.
2014-10-23 16:43:00 -04:00
Ben Boeckel c24d22b44e cmake: clean up if auto-dereferencing
CMake will auto-dereference variable names in if statements, so there's
no need to dereference them manually.
2014-10-23 16:42:35 -04:00
Ben Boeckel f53f04724c cmake: handle private vs. public headers 2014-10-23 16:42:34 -04:00
Ben Boeckel 55ca7d3b34 cmake: refactor common code with libraries 2014-10-23 16:42:34 -04:00
Ben Boeckel c773f465ca cmake: refactor common code with executables 2014-10-23 16:42:34 -04:00
Ben Boeckel 89cff7bddc cmake: put each library into its own directory
This cleans up the CMake code and shows patterns more easily (to be
refactored in the next commit).
2014-10-23 16:42:34 -04:00
Riccardo Spagni 699d932461
Merge pull request #182
1795c38 fixed unit tests (Riccardo Spagni)
bc537ac miniupnpc static define change (Riccardo Spagni)
2014-10-23 16:43:39 +02:00
Oran Juice f1eaf88ba6
Prints seed after wallet upgrade. Removed iostream include. 2014-10-19 14:39:45 +05:30
Oran Juice 70971be96b
Doxygen comments 2014-10-19 01:08:21 +05:30
Oran Juice 031ca23ce9
Rewrites to old wallet file correctly 2014-10-19 01:00:18 +05:30
Oran Juice 1f833dcf77
Doxygen comments in 2014-10-18 23:11:05 +05:30
Oran Juice 0bd88ff256
Writes seed language while generating wallet. Wallet open fix. 2014-10-18 23:01:43 +05:30
Oran Juice 09a659edb5
Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility 2014-10-18 02:21:37 +05:30
Riccardo Spagni acb29cdb0f
fixed errant > 2014-10-15 12:21:09 +02:00
Riccardo Spagni 2de2c52c02
Merge pull request #178
b032619 Commented most of src/serialization/ going to read up more on variant's and finish off the job/add last touchs next (jebes)
2014-10-15 12:15:37 +02:00
Riccardo Spagni db5ca73fdd
Merge pull request #176
b94b8cd Added unit test. Fails for Japanese for some reason. (Oran Juice)
4c8a628 Remove iostream header put in during testing (Oran Juice)
9875f5b Variable unique prefix lengths for seed (Oran Juice)
2014-10-15 12:14:49 +02:00
Riccardo Spagni 0790aea6c8
Merge pull request #174
28dfb4b capitalize Keccak everywhere (David G. Andersen)
ce2ad65 typo fix - cryptonight, not cryptonote (David G. Andersen)
2014-10-15 11:32:16 +02:00
Riccardo Spagni 98a592bc44
fixed conflict in tests CMakeLists 2014-10-15 11:10:04 +02:00
jebes b032619a9c Commented most of src/serialization/ going to read up more on variant's and finish off the job/add last touchs next 2014-10-13 16:00:09 -04:00
Oran Juice b94b8cd798
Added unit test. Fails for Japanese for some reason. 2014-10-08 00:44:26 +05:30
Oran Juice 4c8a628de2
Remove iostream header put in during testing 2014-10-07 16:14:03 +05:30
Oran Juice 9875f5b875
Variable unique prefix lengths for seed 2014-10-07 12:49:36 +05:30
Riccardo Spagni bc537ac095
miniupnpc static define change 2014-10-07 00:44:44 +02:00
Riccardo Spagni 6f65ab1904
Merge pull request #175
b419075 added hardcoded checkpoint at block 249380 (Riccardo Spagni)
7c1d3b5 fixed miniupnpc dynamic target (Riccardo Spagni)
26728d9 mingw library tweaks (Riccardo Spagni)
2cf94c1 fix for mingw not playing nicely with libunbound configure, fix for correctly finding static libs on various operating systems (Riccardo Spagni)
b05e27f need to link with -ldl on Linux when building statically (Riccardo Spagni)
e55982a set the winsock variable differently on Windows (Riccardo Spagni)
0586a27 fixed configure_command for libunbound under mingw (Riccardo Spagni)
f8fd036 turns out mingw does actually produce .a libs and not .dll.a (Riccardo Spagni)
6be3d1d added bison/yacc static build dependency (Riccardo Spagni)
1afba73 quieten CMake when it can't find packages (Riccardo Spagni)
735a017 removed required flags from miniupnp and unbound (Riccardo Spagni)
6b7ac4b enforce static libraries when building statically (Riccardo Spagni)
1d5991e include openssl in linbunbound static linking, added errors for openssl and expat (Riccardo Spagni)
6ef8ae8 reference the correct unbound static lib (Riccardo Spagni)
23cc93c added libtool's install command (Riccardo Spagni)
409e9ba use the correct CMake variable for static builds (Riccardo Spagni)
3a0b00a build libunbound correctly (Riccardo Spagni)
75a616f fix missing parentheses (Riccardo Spagni)
59172ee build libunbound from external if no local libunbound or for static builds (Riccardo Spagni)
1dee71a added static build dependency instructions to README (Riccardo Spagni)
ff3a766 added static build dependency instructions to README (Riccardo Spagni)
5829b35 include openssl in linbunbound static linking, added errors for openssl and expat (Riccardo Spagni)
c70fa86 reference the correct unbound static lib (Riccardo Spagni)
954a244 added libtool's install command (Riccardo Spagni)
fd52015 use the correct CMake variable for static builds (Riccardo Spagni)
cc0f6a6 build libunbound correctly (Riccardo Spagni)
8c00098 fix missing parentheses (Riccardo Spagni)
cee8747 build libunbound from external if no local libunbound or for static builds (Riccardo Spagni)
add1a60 added static build dependency instructions to README (Riccardo Spagni)
2014-10-07 00:21:53 +02:00
Riccardo Spagni b41907574a
added hardcoded checkpoint at block 249380 2014-10-07 00:08:47 +02:00
David G. Andersen 28dfb4b178 capitalize Keccak everywhere 2014-10-06 17:44:23 -04:00
David G. Andersen ce2ad65599 typo fix - cryptonight, not cryptonote 2014-10-06 17:42:58 -04:00
Riccardo Spagni 2cf94c1321
fix for mingw not playing nicely with libunbound configure, fix for correctly finding static libs on various operating systems 2014-10-06 22:29:07 +02:00
Riccardo Spagni fd52015a2d use the correct CMake variable for static builds 2014-10-06 18:08:33 +02:00
Riccardo Spagni cee87473ad build libunbound from external if no local libunbound or for static builds 2014-10-06 18:08:32 +02:00
David G. Andersen e4fb913b2d Fix comment start for two functions 2014-10-06 10:15:21 -04:00
moneromooo-monero beecd139a2
core_rpc_server: use do while(0) idiom in macros using if 2014-10-06 14:58:35 +01:00
moneromooo-monero add803be89
core_rpc_server: fix overreads in slow_memmem
It would read data outside the allocated space in a couple cases.
2014-10-06 14:57:49 +01:00
Riccardo Spagni 2c739371ac
Merge pull request #170
46f26ff another typo fix (David G. Andersen)
ac6bc48 fix typo (David G. Andersen)
d744dd1 More documentation (David G. Andersen)
4d493f6 initial doxygen commenting of the CryptoNight proof-of-work code (David G. Andersen)
2014-10-06 10:30:48 +02:00
Riccardo Spagni 664ae0085d
Merge pull request #167
aeaa44f fixed signed-unsigned issue from 166 (Thomas Winget)
2014-10-06 10:27:17 +02:00
Riccardo Spagni 010bfcfd18
minor English wordlist tweaks 2014-10-06 08:47:04 +02:00
David G. Andersen 46f26ffe88 another typo fix 2014-10-05 20:32:49 -04:00
Riccardo Spagni 732493c5cb
split mnemonic printout over 3 lines 2014-10-05 21:19:29 +02:00
David G. Andersen ac6bc4859f fix typo 2014-10-05 14:14:59 -04:00
David G. Andersen d744dd1be5 More documentation 2014-10-05 13:47:13 -04:00
David G. Andersen 4d493f6d4f initial doxygen commenting of the CryptoNight proof-of-work code 2014-10-05 12:33:39 -04:00
Riccardo Spagni e5ac88819a
added other skipped commit 2014-10-05 12:55:59 +02:00
Riccardo Spagni aa6e8a92f6
added skipped commit 2014-10-05 12:52:40 +02:00
Riccardo Spagni a41f23921c
added trim_length to language_base class, added license to langeuage_base 2014-10-05 12:42:40 +02:00
Riccardo Spagni 7e5331e612
new English word list, trim length of 3, average word size of 6 letters, designed to be a bit unusual and thus easier to memorise 2014-10-05 11:44:06 +02:00
Riccardo Spagni 434095d1f7
fixed conflict in CMakeLists 2014-10-05 11:40:25 +02:00
Oran Juice 41948fa2ec
Uses new Japanese file. Gives credit to dabura667. English file indentation tabs to spaces. 2014-10-05 02:41:15 +05:30
Riccardo Spagni 1160505454
fixed checkpointing bug 2014-10-03 21:45:29 +02:00
Riccardo Spagni c4d6658f4c
quick hacky fix for broken TXT reads 2014-10-03 15:10:21 +02:00
Riccardo Spagni 2322a94427
cleaned up OpenAlias messages in simplewallet 2014-10-03 14:21:13 +02:00
Oran Juice 443d46a6f1
Don't show Old English as an available option 2014-10-03 16:25:44 +05:30
Riccardo Spagni 1663089b33
MoneroPulse log wording tweaks 2014-10-03 10:31:36 +02:00
Thomas Winget aeaa44fe86
fixed signed-unsigned issue from 166
Loss of entropy can be discussed at a later time, but is
not deemed a significant issue for now.
2014-10-02 19:12:12 -04:00
Riccardo Spagni 6f7ed13b72 moved checkpoint log level 2014-10-02 19:39:24 +02:00
Riccardo Spagni 3e644c25c4
moved file checkpointing log output to log1 2014-10-02 19:38:28 +02:00
Oran Juice 3e6b6bad2d
Had missed const and had to use .at instead of [] 2014-10-02 22:36:02 +05:30
Riccardo Spagni 18281f4d20 remove dangling upnp port mappings, updated miniupnpc 2014-10-02 18:54:55 +02:00
Riccardo Spagni 8c37823d45 remove pthreads, successfully tested on gcc 4.9.1 without pthreads 2014-10-02 18:54:55 +02:00
Oran Juice b80755063e
Stop copying word list files to build directory 2014-10-02 21:47:49 +05:30
Oran Juice 4498e9efa0
Removed old word list file 2014-10-02 21:46:16 +05:30
Oran Juice d683c8c724
Use reference types on LHS when using language methods 2014-10-02 21:45:31 +05:30
Oran Juice fa723d8af8
Cut short word lists to 1626 words, added attribution to Electrum, some bug fixes 2014-10-02 21:44:26 +05:30
Oran Juice 4517bac7f3
Restructured language sources to be singletons 2014-10-02 21:43:28 +05:30
Oran Juice 6c3b85de21
Separated word lists to header files 2014-10-02 21:41:56 +05:30
Riccardo Spagni 1cf22b27a6
Merge pull request #165
c0bdd51 Daemon should now exit on conflicting checkpoints (Thomas Winget)
f0b4138 various changes to runtime checkpoint updating (Thomas Winget)
7568f89 Fixed segfault with checkpoints loading (Thomas Winget)
b261d92 DNS checkpoint updating added, and daemon flag to enforce them (Thomas Winget)
30caebf reload checkpoints file every ~hr and print if any fail (Thomas Winget)
0e14491 updated DNSResolver/things that use it for DNSSEC (Thomas Winget)
6f2c2e1 Adding an identical existing checkpoint should not error (Thomas Winget)
2014-10-02 16:48:05 +02:00
Riccardo Spagni 0e777d0e65
simplewallet ignoring testnet port in RPC mode 2014-10-01 11:13:46 +02:00
Thomas Winget c0bdd511c3 Daemon should now exit on conflicting checkpoints
If the "enforce DNS checkpoints" flag is not enabled, it should not exit
if DNS checkpoints conflict with the others, but should still print a
warning to the user.
2014-09-30 16:21:37 -04:00
Thomas Winget f0b4138f1f various changes to runtime checkpoint updating
json checkpoints will be checked every 10 minutes, dns every 60.

json checkpoints always enforced, dns still with flag.

conflicting checkpoints is hard fail, but soft if dns enforce flag not
set and dns checkpoints are wonky.
2014-09-30 16:21:37 -04:00
Thomas Winget 7568f89c55 Fixed segfault with checkpoints loading
Bounds checking on blockchain_storage' m_blocks.size() when validating
against checkpoints.  Also moved initial json & DNS checkpoints load to
after blockchain init.
2014-09-30 16:21:37 -04:00
Thomas Winget b261d9207b DNS checkpoint updating added, and daemon flag to enforce them
The daemon should now check for updated checkpoints from
checkpoints.moneropulse.org as well as from the configured json file
every ~1hr (and on launch).

The daemon now has a flag to enable enforcing these checkpoints (rather
    than just printing a warning when they fail).

TODO: an easily configurable list of DNS servers to check for
checkpoints as opposed to the hard-coded "checkpoints.moneropulse.org"
2014-09-30 16:21:37 -04:00
Thomas Winget 30caebfce3 reload checkpoints file every ~hr and print if any fail
also some other minor bug squashing and code formatting
2014-09-30 16:21:37 -04:00
Thomas Winget 0e1449135d updated DNSResolver/things that use it for DNSSEC
Note: DNSResolver does not yet *use* DNSSEC, but rather this commit is
preparation for including DNSSEC validation.  The function in
src/wallet/wallet2.cpp that uses DNSResolver still needs its parameters
updated accordingly.
2014-09-30 16:21:37 -04:00
Thomas Winget 6f2c2e1c27 Adding an identical existing checkpoint should not error
For checkpoints being read at runtime to work correctly, the checkpoint
add code needs to not return false if a checkpoint is added that already
exists.  In this case, instead return false if the checkpoint is for a
height that already has a checkpoint and the hashes are different.
2014-09-30 16:17:26 -04:00
Oran Juice 423bf69dca
Added attribution to Electrum for their word-lists 2014-09-30 23:53:02 +05:30
Oran Juice 4cbf8d4243
Is forgiving of spelling mistakes beyond the 1st 4 characters. 2014-09-30 23:30:27 +05:30
Oran Juice cf70cc7787
Change seed message to '25' words from '24' words 2014-09-30 18:17:56 +05:30
Oran Juice 4f693d715c
Merge with origin/master 2014-09-28 15:52:05 +05:30
Oran Juice 2b60646c9b
Minor comment changes and code clean-up 2014-09-28 14:10:23 +05:30
Oran Juice 473c9644a9
Default to new style English seed 2014-09-28 13:49:47 +05:30
Oran Juice 230b80a5db
Minor code refactor and comment changes 2014-09-28 13:48:52 +05:30
Oran Juice 8f587ba1c8
CRC Checksum for word seed. Gives a new 25 word seed with checksum if one without checksum is passed. Doxygen comment fix. 2014-09-28 02:29:25 +05:30
Oran Juice f31adbc977
Doxygen comments in 2014-09-27 18:20:15 +05:30
Oran Juice 91aa25e055
Informs about old style mnemonics from older wallet and provides a new one. CMakeLists.txt update. 2014-09-27 17:04:23 +05:30
Oran Juice 262e155bab
Throw error when word list file is empty and quick bug fix 2014-09-27 00:55:21 +05:30
Oran Juice 3c0e87e1b6
Supports wallet restoration 2014-09-26 23:34:35 +05:30
Oran Juice a1ac92e185
Accepts seed language choice from user. 2014-09-25 18:04:30 +05:30
Riccardo Spagni 59a8366bb1 Revert "low risk, potentially varint overflow bug patched thanks to BBR"
This reverts commit 4e2b2b942d.
2014-09-25 08:24:42 +02:00
Thomas Winget fab95aef64
Remove LDNS dep and fix a bug in libunbound const correctness fix 2014-09-24 23:45:01 -04:00
Thomas Winget 2248124453 Removed ldns dependency
ldns dependency was only still around for constants defined in ldns/rr.h,
but those constants are RFC specified DNS constants, and to reduce deps
have been replicated in dns_utils.h instead of including ldns/rr.h.
2014-09-24 22:45:17 -04:00
Riccardo Spagni 4e2b2b942d low risk, potentially varint overflow bug patched thanks to BBR 2014-09-24 22:17:33 -04:00
Thomas Winget 738357459b
libunbound has const correctness issues... 2014-09-24 20:05:34 -04:00
Tomer Konforty 06a4578bf2 Added ability to read chechpoint hashes from json file in data folder 2014-09-25 00:00:44 +02:00
iamsmooth 9956b68b18 checkpoint 2014-09-24 23:52:40 +02:00
iamsmooth d19cf1f458 checkpoint 2014-09-24 23:52:31 +02:00
iamsmooth c428c29051 checkpoints 2014-09-24 23:52:26 +02:00
iamsmooth b1d586af4b checkpoint 2014-09-24 23:52:20 +02:00
iamsmooth 400f1016dd checkpoints 2014-09-24 23:52:13 +02:00
Riccardo Spagni bff1f9d4c4
redo FindUnbound.cmake 2014-09-24 20:38:24 +02:00
Oran Juice 26ea53d461
Copies word lists directory to the location of the executable 2014-09-24 22:44:36 +05:30
Riccardo Spagni d1a7f699c6
use boost::asio::ip::address because cross-platform plz 2014-09-24 14:45:54 +02:00
Thomas Winget 1e193d687d temp commit 2014-09-24 09:13:18 +02:00
Thomas Winget 1dece111cc Added function to check syntax of URL for DNS lookup
For now, simply checks for '.' character, but that will be easy to
change in the future if necessary/desired.
2014-09-23 22:59:57 +02:00
Thomas Winget 24f325a33d
Fixed artifacts from cherry-picking devel->master 2014-09-23 22:59:47 +02:00
Thomas Winget c14c7e1683 change to allow (at least a bit) for multiple TXT records 2014-09-23 22:58:28 +02:00
Thomas Winget f437cb58bf Simplewallet should now resolve urls to addresses
Simplewallet should now do a DNS query on an address if it fails to
convert the given string to a binary representation of an address
(base58->binary).  It will prompt the user, telling of what the "url"
passed was, what monero address it translated to, and whether or not
DNSSEC validation was a success, and ask for a confirmation that these
are all acceptable.
2014-09-23 22:58:25 +02:00
Thomas Winget a5757a628f Monero addres from DNS TXT record implemented, tests pass
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23 22:58:21 +02:00
Thomas Winget 3fb0fc020f seed node DNS code updated to use DNSResolver
Also implemented rudimentary IPv6 support, but commented it out because
it's not widely supported by ISPs for now, and thus is not currently
supported by Monero.
2014-09-23 22:58:17 +02:00
Thomas Winget 9a3b18dbc2 Use the loop iterator, previous version of me. 2014-09-23 22:58:13 +02:00
Thomas Winget 578050e91d ipv4 and ipv6 resolution working
IPv4 and IPv6 name resolution working.
Unit tests written (and passing).
net_node.{h,inl} code modified to use DNS seeds.
2014-09-23 22:58:07 +02:00
Thomas Winget dea98df6b1 Updated CMake files -- added libunbound linker flag
CMake config file written, but was unable to test/get it working
properly because of a bug in CMake with functions related to
find_package.  Simple "-lunbound" flag used in its stead for now.  May
not build on non-Linux systems, not sure yet.
2014-09-23 22:58:02 +02:00
Thomas Winget 1ae6db25e6 Initial commit of DNS code 2014-09-23 22:57:57 +02:00
Oran Juice 608572eead
Check for error after opening word list file 2014-09-23 20:48:15 +05:30
Oran Juice 09170b4d3b
Added code to separate old word list to raw input file and support for multiple new languages 2014-09-23 18:34:39 +05:30
Oran Juice 6be139b511
Moved mnemonics code to src/mnemonics 2014-09-23 17:04:04 +05:30
Zachary Michaels 59ab569da1 Give up on brace initializers in initializer lists (MSVC bug) 2014-09-15 23:14:24 +02:00
Riccardo Spagni ffe7bf8c1c
another fix for CMake empty vars 2014-09-15 23:07:47 +02:00
Riccardo Spagni de442fb9ad
Prevent CMake choking on empty vars 2014-09-15 23:04:58 +02:00
Riccardo Spagni 070ff889d2
More robust versioning in CMake, plus comments 2014-09-15 23:01:50 +02:00
Zachary Michaels 9db881864d Fix time_t serialization issue
On 32-bit MinGW-w64, time_t is int32_t.  The existing code was serializing
time_t directly and implicitly assuming that time_t is int64_t.  This commit
formalizes that assumption by serializing int64_t directly and casting to
time_t where appropriate.

Thanks go to greatwolf for reporting this issue.

monero-project/bitmonero#88
2014-09-15 22:38:46 +02:00
Zachary Michaels f64a68e7cc
Force CMake to link the runtime statically 2014-09-15 22:36:02 +02:00
Zachary Michaels 45bc24d69b Another preprocessor fix (difficulty.cpp) 2014-09-15 22:33:10 +02:00
Zachary Michaels aba3497fdd More preprocessor fixes for slow-hash 2014-09-15 22:33:10 +02:00
Zachary Michaels cf91545734 Correct includes for mingw in slow-hash
This needs testing
2014-09-15 22:33:10 +02:00
Zachary Michaels 2b76e9d8a3 Change Windows include to windows
mingw is case sensitive
2014-09-15 22:33:10 +02:00
Riccardo Spagni b92a8b53e0
fix CMake for multiplatform versioning 2014-09-15 20:15:26 +02:00
Riccardo Spagni 72a80f6213
fixed incorrect version reference 2014-09-15 15:58:22 +02:00
Zachary Michaels 95a2701ec5 Change testnet prefix 2014-09-15 15:55:07 +02:00
Zachary Michaels 120c84d04f Make P2P use the testnet data dir 2014-09-15 15:55:07 +02:00
Zachary Michaels 23525655fa Replace macro with equivalent function call
Also removed useless bool return
2014-09-15 15:55:07 +02:00
Zachary Michaels d03308734b
Separate testnet address prefix 2014-09-15 15:54:59 +02:00
Zachary Michaels ee1bacc64f Add testnet seed nodes 2014-09-15 15:54:24 +02:00
Zachary Michaels 4a6eb0a016 Create testnet data dir if necessary 2014-09-15 15:54:24 +02:00
Zachary Michaels 018e251cc0
Separate testnet default data dir 2014-09-15 15:54:19 +02:00
Zachary Michaels 3ef7f33300 Add descriptions for RPC command line params 2014-09-15 15:53:50 +02:00
Zachary Michaels 1e38a02bb5 Add testnet genesis tx as output by CN reference 2014-09-15 15:53:50 +02:00
Zachary Michaels 96eed84aad Pass tx and nonce to genesis block constructor 2014-09-15 15:53:50 +02:00
Zachary Michaels 257077a96b Separate network id for testnet 2014-09-15 15:53:50 +02:00
Zachary Michaels 658b6690a3
Separate rpc port for testnet 2014-09-15 15:53:46 +02:00
Zachary Michaels 98ed9a41f7 Separate p2p port for testnet 2014-09-15 15:53:10 +02:00
Zachary Michaels fb4146fa34 Reorganize testnet constants 2014-09-15 15:53:10 +02:00
Zachary Michaels 79862ad1de Add testnet constants 2014-09-15 15:53:10 +02:00
Zachary Michaels 07470fd400
Add testnet flag
Source: cryptonotefoundation
2014-09-15 15:53:01 +02:00
Riccardo Spagni 51011ed960 fix logic in tag check, AND -> OR
Signed-off-by: Riccardo Spagni <ric@spagni.net>
2014-09-15 08:24:32 +02:00
Riccardo Spagni 3129d51eb4 ignore tag check if we haven't pulled tags
Signed-off-by: Riccardo Spagni <ric@spagni.net>
2014-09-15 08:22:52 +02:00
Riccardo Spagni d97191d4f9
new Makefile target: release-static 2014-09-15 08:18:11 +02:00
Riccardo Spagni 9c56b38b16
Merge pull request #136
bb2b606 fix incorrect error message (obvious cut and paste bug from upstream) (iamsmooth)
6b77e83 Change wallet to not try to extract tx public key when tx has no outputs (fixes 202612 tx format messages and is otherwise correct) (iamsmooth)
08205f0 output rng fix from boolberry (iamsmooth)
2014-09-13 10:24:39 +02:00
iamsmooth bb2b606e91 fix incorrect error message (obvious cut and paste bug from upstream) 2014-09-13 08:04:05 +00:00
iamsmooth 6b77e8358c Change wallet to not try to extract tx public key when tx has no outputs (fixes 202612 tx format messages and is otherwise correct) 2014-09-13 04:25:33 +00:00
iamsmooth 08205f01d9 output rng fix from boolberry 2014-09-12 22:57:32 +00:00
Riccardo Spagni 570b90eb43 fixed cmake variable matching 2014-09-12 13:27:30 +02:00
Riccardo Spagni 8334ce0b24 versioning now includes the commit hash, or -final for tagged releases 2014-09-12 13:12:43 +02:00
jebes a13e879251 HOW DO I ENGLISH? 2014-09-11 10:45:05 -04:00
jebes f7900ccfc1 mispelled brief, corrected it 2014-09-11 10:36:39 -04:00
jebes dfed3d39b6 Merge remote-tracking branch 'upstream/master' 2014-09-11 10:20:55 -04:00
jebes 9d6f9335d1 HOW DO I GIT? 2014-09-11 10:20:17 -04:00
jebes a70bf86037 Documented varint 2014-09-11 10:14:05 -04:00
fluffypony d21cf293e1 added license to CMake 2014-09-11 08:25:07 +02:00
fluffypony 8d8b47e69f more dynamic miniupnp fixes 2014-09-10 20:01:30 +02:00