Commit Graph
68 Commits
Author SHA1 Message Date
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
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
Thomas Winget 145dc19eeb Merge pull request #160 from tewinget/remove_ldns_dep
Remove ldns dependency
2014-09-24 23:50:51 -04: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
Thomas Winget 738357459b libunbound has const correctness issues... 2014-09-24 20:05:34 -04:00
Thomas WingetandRiccardo Spagni 1e193d687d temp commit 2014-09-24 09:13:18 +02:00
Thomas WingetandRiccardo Spagni 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 WingetandRiccardo Spagni 24f325a33d Fixed artifacts from cherry-picking devel->master 2014-09-23 22:59:47 +02:00
Thomas WingetandRiccardo Spagni 5bd343778f Fixed CMake search for libunbound
As it turns out, some of CMake's built-in modules for detecting headers
and libraries don't work if you have certain compiler flags set, such as
-Werror=old-style-definition, as they do "int main()" rather than
"int main(void)".  Having CMake search for libs before compiler flags
are set alleviates this issue, and I believe the underlying issue will
be fixed in future releases of CMake.
2014-09-23 22:58:31 +02:00
Thomas WingetandRiccardo Spagni c14c7e1683 change to allow (at least a bit) for multiple TXT records 2014-09-23 22:58:28 +02:00
Thomas WingetandRiccardo Spagni 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 WingetandRiccardo Spagni 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 WingetandRiccardo Spagni 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 WingetandRiccardo Spagni 9a3b18dbc2 Use the loop iterator, previous version of me. 2014-09-23 22:58:13 +02:00
Thomas WingetandRiccardo Spagni 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 WingetandRiccardo Spagni 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 WingetandRiccardo Spagni 1ae6db25e6 Initial commit of DNS code 2014-09-23 22:57:57 +02:00
Thomas Wingetandfluffypony c05489938f override for get_block_longhash for block 202612 2014-09-06 21:56:18 +02:00
Thomas Wingetandfluffypony 9a16bb9936 added double-check for 202612 block id
if a new block has the same block id as 202612 but the wrong blobdata,
this will tell the caller that the block id is actually null_hash rather
than the 202612 block id.
2014-09-06 21:56:12 +02:00
Thomas Wingetandfluffypony 115f9523fa hex_to_pod needs the destination as an arg, as opposed to it returning the pod 2014-09-06 21:56:06 +02:00
Thomas Wingetandfluffypony a544603a7b Override for block hashing for block 202612
Since we need to fix tree_hash, but doing so would invalidate the block
id for block 202612, this fix should check to see if we're trying to get
the block id for 202612 (if its blob hash matches) and return the "old"
block id, for backwards compatibility.
2014-09-06 21:54:58 +02:00
Thomas Winget 7c0f150a29 Merge pull request #81 from tewinget/restore-fix
restored wallets will have timestamp set to June 8 2014.
2014-08-03 09:58:11 -04:00
Thomas Winget bdac624899 restored wallets will have timestamp set to June 8 2014. 2014-08-03 09:49:31 -04:00
Thomas Winget 55b92e3999 Merge pull request #68 from tewinget/daemon_rpc
daemon rpc get_connections call minor changes
2014-07-23 06:06:33 -04:00
Thomas Winget a99143444c Changed time_t to uint64_t for serialization
time_t is implementation-, architecture-, and apparently
compiler-dependent.  As an example, on my machine if I build a 64-bit
binary, sizeof(time_t) is 8, but for a 32-bit binary it's 4.  uint64_t
is therefore much more consistent for serialization, given that RPC
calls are potentially made between different machines.
2014-07-23 05:59:31 -04:00
Thomas Winget ad4061002c Missed serializing a get_connections RPC response parameter 2014-07-22 20:54:45 -04:00
Thomas Winget 1c33b6cbee Merge pull request #65 from tewinget/daemon_rpc
Added get_connections RPC call to daemon

Only consists of new functionality and doesn't break build, merging per request.
2014-07-18 19:35:45 -04:00
Thomas Winget 9f88b7ce6b Added get_connections RPC call to daemon 2014-07-18 19:33:03 -04:00
Thomas Winget c6ffd810af Merge pull request #56 from tewinget/master
transaction splitting
2014-07-06 13:13:06 -04:00
Thomas Winget 45bd182363 needed to remove REQUIRED from find_package(Threads) 2014-06-30 07:23:49 -04:00
Thomas Winget d433a696e5 wallet RPC converted to use new transaction semantics
wallet RPC now uses wallet2::create_transactions and wallet2::commit_tx instead
of wallet2::transfer.  This made it possible to add the RPC call /transfer_split, which
will split transactions automatically if they are too large.  The old call to
/transfer will return an error stating to use /transfer_split if multiple
transactions are needed to fulfill the request.
2014-06-30 07:16:50 -04:00
Thomas Winget 2011b50280 removed erroneous printing of newlines 2014-06-30 07:16:50 -04:00
Thomas Winget 7c7696a830 missed removing a debug print 2014-06-30 07:16:50 -04:00
Thomas Winget e5ab98a6f4 removed some debugging code (really stupid printf-style debuggng.. 2014-06-30 07:16:50 -04:00
tom 62109840d6 Transaction splitting *seems* to be working!!! 2014-06-30 07:16:50 -04:00
Thomas Winget 9bfe0b9b6c Added confirmation prompt if transactions are to be split 2014-06-30 07:16:50 -04:00
Thomas Winget 002ce963bf added back successful tx message. oops. 2014-06-30 07:16:50 -04:00
Thomas Winget 8166650ae0 up tx splits limit 5 -> 30 2014-06-30 07:16:50 -04:00
Thomas Winget 2e048a4679 final changes to get transaction splitting building. needs testing. 2014-06-30 07:16:50 -04:00
tom 79e59d155b working on dividing functions in prep for tx splitting 2014-06-30 07:16:50 -04:00
Thomas Winget fc1180bc6c Added comments to wallet functions 2014-06-30 07:16:50 -04:00
Thomas Winget 4c67dbb08e Merge pull request #55 from monero-project/revert-54-master
Revert "Do not fall over when refreshing balance fails"
2014-06-30 06:47:48 -04:00
Thomas Winget 55721da1fd Revert "Do not fall over when refreshing balance fails" 2014-06-30 06:45:20 -04:00
Thomas Winget a521046ff2 Fixed console handler not properly exiting on SIGINT and such 2014-06-13 00:09:09 -04:00
Thomas Winget c49cb04610 changed wallet mnemonic to use cout so it doesn't print to log 2014-06-12 19:39:02 -04:00
tom 205494f0d1 change hash for keygen from blake to keccak 2014-06-12 19:38:56 -04:00
tom 0c85229924 changed text a bit more 2014-06-12 19:38:29 -04:00
tom 305def9493 changed some print messages 2014-06-12 19:38:21 -04:00
Thomas Winget da37b6f15b allow two-random-numbers wallet generation (but not as default) 2014-06-12 19:05:52 -04:00
Thomas Winget b6a4751197 reworked command line args for simplewallet.
--generate-new-wallet and --wallet-file are now properly mutually-exclusive.
2014-06-12 19:05:52 -04:00
Thomas Winget ce352392d5 DRY cin input_line (and test replacement of non-DRY usage) 2014-06-12 19:05:52 -04:00
Thomas Winget 537b911af1 stupid signed arithmetic. 2014-06-12 19:05:52 -04:00
Thomas Winget 8bc032ed09 more pointer-based derp 2014-06-12 19:05:51 -04:00
Thomas Winget 72c3f36ca4 fixed some pointer- and loop-based derps 2014-06-12 19:05:51 -04:00
Thomas Winget d22e458c6c builds, but doesn't link. other than that, electrum-style recovery implemented (but not tested\!) 2014-06-12 19:05:51 -04:00
Thomas Winget 8661f9a970 missing '.at' on two map calls. built on some machines, very strange... 2014-06-12 19:05:51 -04:00
Thomas Winget e89949c766 revert 'dirty hack' change to crypto.h. need a better way for sure. 2014-06-12 19:05:51 -04:00
tom cd63132502 compile issues, resolve later. commiting because switching machines 2014-06-12 19:05:51 -04:00
tom f70bc3a345 defaulted new parameters in modified functions 2014-06-12 19:05:51 -04:00
Thomas Winget 4f382b3830 most functions prototyped/modified for wallet recovery 2014-06-12 19:05:51 -04:00
Thomas Winget 105825b4ce added vim swap files to .gitignore 2014-06-12 19:05:51 -04:00