Commit graph

255 commits

Author SHA1 Message Date
moneromooo-monero
b52abd1370
Move txpool to the database
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).

poolstate.bin is now obsolete.
2017-05-25 22:23:37 +01:00
Nano Akron
d1db32511c Fix overlooked renaming of Português in the unit tests 2017-05-07 16:36:03 +01:00
Nano Akron
12fff108ea
Change Old_English to English_Old - 'Old English' is actually a language 2017-04-24 20:27:12 +01:00
Riccardo Spagni
e53dd76a49
Merge pull request #1983
72d113dd Amended software licenses for Portuguese and Spanish (Nano Akron)
54bcd260 Added Simplified Chinese electrum word list (Nano Akron)
2017-04-24 10:49:24 +02:00
Nano Akron
54bcd260ff
Added Simplified Chinese electrum word list 2017-04-16 12:06:53 +01:00
Lee Clagett
93e10f1cc4 Simplified the implementation and features of span 2017-04-11 16:35:14 -04:00
Lee Clagett
4a8f96f95d Improvements for epee binary to hex functions:
- Performance improvements
  - Added `span` for zero-copy pointer+length arguments
  - Added `std::ostream` overload for direct writing to output buffers
  - Removal of unused `string_tools::buff_to_hex`
2017-04-11 16:35:00 -04:00
Randi Joseph
933e08f2f3 Replace deprecated tmpnam function. 2017-03-29 22:32:00 -04:00
moneromooo-monero
6e6794786a
mnemonics: sanity checks for word lists
and a test to go with it

Remember to run the test when changing word lists, or simplewallet
will throw uncaught if that word list is used.
2017-03-25 12:14:01 +00:00
moneromooo-monero
f065234b71
core: cache tx and block hashes in the respective classes
An idea from smooth
2017-03-23 09:25:17 +00:00
Lee Clagett
50cd179a60 Removed boost/asio.hpp include from epee/string_tools.h 2017-03-18 22:05:14 -04:00
moneromooo-monero
3396a9f2af
Add intervening v5 fork for increased min block size
Minimum mixin 4 and enforced ringct is moved from v5 to v6.
v5 is now used for an increased minimum block size (from 60000
to 300000) to cater for larger typical/minimum transaction size.

The fee algorithm is also changed to decrease the base per kB
fee, and add a cheap tier for those transactions which we do
not care if they get delayed (or even included in a block).
2017-03-15 08:32:51 +00:00
kenshi84
7d07c64fe5
fix dependency: put HardFork back to cryptonote_basic, made some BlockchainDB functions virtual again to avoid missing symbols error 2017-03-10 11:22:39 +09:00
moneromooo-monero
f75477819c
unit_tests: fix fee tests after quantization change 2017-03-04 22:45:49 +00:00
moneromooo-monero
12adb4a3f3
core: move hardfork back to cryptonote_core
should fix a cross dependency betewen cryptonote_basic and
blockchain_db
2017-02-25 16:41:35 +00:00
Riccardo Spagni
c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni
ecbd3f0798
Merge pull request #1758
5664826a unit_tests: hardfork unit test now needs get_block_blob_from_height (moneromooo-monero)
2017-02-21 17:22:01 +02:00
moneromooo-monero
5664826a84
unit_tests: hardfork unit test now needs get_block_blob_from_height 2017-02-21 14:48:34 +00:00
Howard Chu
80749e59a8
More for PR #1724
Fix unit_tests build (get_output_key API change)
2017-02-21 13:53:13 +00:00
Riccardo Spagni
49efd3add9
Merge pull request #1727
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
2017-02-21 11:27:15 +02:00
Riccardo Spagni
88c752b476
Merge pull request #1721
2cde2c02 switch to boost::thread for mingw build (Lee Clagett)
2017-02-21 11:26:09 +02:00
Riccardo Spagni
565c99f670
Merge pull request #1731
a427235e core: add a missing newline on a string to be logged (moneromooo-monero)
b6a2230e unit_tests: fix minor blockchain_db regression (moneromooo-monero)
c488eca5 hardfork: tone down some logs (moneromooo-monero)
2017-02-21 11:21:57 +02:00
moneromooo-monero
08c3f38031
util: add a vercmp function to compare version numbers
It is simple, supports simple x.y.z type numeric versions,
and does not attempt any kind of validation
2017-02-20 22:58:04 +00:00
Lee Clagett
2cde2c02ca switch to boost::thread for mingw build 2017-02-16 20:10:23 -05:00
moneromooo-monero
b6a2230e6f
unit_tests: fix minor blockchain_db regression
Due to the change in ordering for adding block and tx data
to the database in f2986ccfc1,
adding a block twice now throws TX_EXISTS, not BLOCK_EXISTS.
2017-02-14 18:56:42 +00:00
moneromooo-monero
0288310e3b
blockchain_db: add "raw" blobdata getters for block and transaction
This speeds up operations such as serving blocks to syncing peers
2017-02-13 21:11:37 +00:00
moneromooo-monero
9faef1f83a
cryptonote_protocol: misc fluffy block fixes
- fix wrong block being used when a new block is received between
  a node elaying a fluffy block and sending a new fluffy block
  with txes a peer did not have
- misc a neverending ping pong requesting the same missing txids
  when a new block is received in the meantime, causing the top
  block to not be the one we need
- send the original fluffy block message block height when sending
  a new fluffy block, not the current top height, which might
  have been updated since
- avoid sending back the whole block blob when asking for txes,
  send only the hash instead
- plus misc cleanup and additional debugging logs
2017-02-12 12:33:45 +00:00
Riccardo Spagni
eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Lee Clagett
ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
moneromooo-monero
f9293b69d8
unit_tests: fix missing return after batch_start prototype change 2017-01-21 21:51:07 +00:00
moneromooo-monero
a480bf6b14
fixups in logging init calls, and add missing net context in a log 2017-01-16 10:45:59 +00:00
Riccardo Spagni
b2e1568335
Merge pull request #1579
f5f4109f mnemonics: fix language detection with checksum word (moneromooo-monero)
2017-01-15 14:58:09 -05:00
Riccardo Spagni
c5be70eab4
Merge pull request #1575
b3ca0c62 unit_tests: fix portable serialization tests hardcoded data path (moneromooo-monero)
2017-01-15 14:56:10 -05:00
Riccardo Spagni
10c6afd316
Merge pull request #1571
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15 14:50:10 -05:00
Riccardo Spagni
65e33b1bc5
Merge pull request #1506
3ff54bdd Check for correct thread before ending batch transaction (Howard Chu)
eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu)
c903c554 Don't cache block height, always get from DB (Howard Chu)
eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu)
0693cff9 Use batch transactions when syncing (Howard Chu)
2017-01-15 14:43:12 -05:00
moneromooo-monero
f5f4109f9a
mnemonics: fix language detection with checksum word
If a checksum word is present, language detection would use
just the word prefixes. However, a set of word prefixes may
be found in more than one language, and so the wrong language
may be found first, which could then fail the checksum, since
the check may be done with a different unique prefix length
from the one it was created from.

We now make a checksum test when we we detect a language from
prefixes only, to make sure we have the correct one.
2017-01-15 11:16:25 +00:00
Howard Chu
0693cff925
Use batch transactions when syncing
Faster throughput while avoiding corruption. I.e., makes
running with --db-sync-mode safe more tolerable.
2017-01-14 22:43:06 +00:00
moneromooo-monero
b3ca0c627a
unit_tests: fix portable serialization tests hardcoded data path 2017-01-14 21:19:33 +00:00
moneromooo-monero
81c384e408
fix do_not_relay not preventing relaying on a timer
Also print its value when printing pool
2017-01-14 13:07:05 +00:00
Lee Clagett
d81cb08704 Added (not yet enabled) HTTP client authentication 2017-01-11 03:21:17 -05:00
Riccardo Spagni
ba9744d400
Merge pull request #1515
ada7c7da portable serializer: tests added (kenshi84)
f390a0e2 portable serializer: make signerd/unsigned tx portable, ignore archive version checking (kenshi84)
2017-01-08 16:41:44 -08:00
Riccardo Spagni
23cf963332
Merge pull request #1493
0478ac68 blockchain: allow marking "tx not found" without an exception (moneromooo-monero)
2017-01-08 16:33:41 -08:00
Riccardo Spagni
ff1bb6bc68
Merge pull request #1460
99580adf make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup (kenshi84)
2017-01-08 16:31:42 -08:00
moneromooo-monero
0478ac6848
blockchain: allow marking "tx not found" without an exception
This is a normal occurence in many cases, and there is no need
to spam the log with those when it is.
2017-01-07 20:52:17 +00:00
kenshi84
ada7c7da8f portable serializer: tests added 2017-01-03 09:14:48 +09:00
Lee Clagett
522ab79e9c Fixed HTTP auth tests for gcc 4.9 2016-12-21 13:23:15 -05:00
kenshi84
99580adf66 make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup 2016-12-21 23:12:15 +09:00
Lee Clagett
d55e2266ca Fixed uninitialized valgrind errors in serialization tests 2016-12-20 12:51:27 -05:00
Lee Clagett
81702b5451 Fixes for google test < 1.8 2016-12-19 20:48:11 -05:00
Riccardo Spagni
29735c8f8f
Merge pull request #1459
b00da61e Preliminary support for DragonFly BSD (Antonio Huete Jimenez)
2016-12-15 14:36:35 +02:00
Antonio Huete Jimenez
b00da61eab Preliminary support for DragonFly BSD
- It builds but no further testing has been done.
2016-12-15 02:27:53 -08:00
Lee Clagett
bdc3d7496f Adding HTTP Digest Auth (but not yet enabled) 2016-12-13 00:19:54 -05:00
luigi1111
46a0dcc1d2
ringct: luigi1111's changes to fix and speedup Borromean sigs 2016-12-04 21:54:16 +00:00
Shen Noether
76958fc75a
ringct: switch to Borromean signatures 2016-12-04 21:54:11 +00:00
Riccardo Spagni
977dd9b76c
Merge pull request #1385
5783dd8c tests: add unit tests for uri parsing (moneromooo-monero)
82ba2108 wallet: add API and RPC to create/parse monero: URIs (moneromooo-monero)
d9001b43 epee: add functions to convert from URL format (ie, %XX values) (moneromooo-monero)
2016-12-04 22:19:06 +02:00
moneromooo-monero
5783dd8c99
tests: add unit tests for uri parsing 2016-11-28 17:54:28 +00:00
Lee Clagett
91ffb61c25 Added command_line::is_yes 2016-11-25 21:57:27 -05:00
Riccardo Spagni
4248d5131c
Merge pull request #1371
8dadf02 Fixed undefined behavior in TestDB (Lee Clagett)
2016-11-24 13:01:05 +02:00
Riccardo Spagni
ce8a2315cf
Merge pull request #1364
f025198 Added task_region - a fork/join task implementation (Lee Clagett)
2016-11-24 12:58:09 +02:00
Lee Clagett
8dadf02c4f Fixed undefined behavior in TestDB 2016-11-23 17:22:35 -05:00
Lee Clagett
f025198f19 Added task_region - a fork/join task implementation 2016-11-23 14:41:25 -05:00
moneromooo-monero
ab7b56e0e2
tests: fix uninitialized data valgrind reports in levin tests 2016-11-20 17:51:17 +00:00
moneromooo-monero
73e8a76d86
tests: fix uninitialized data valgrind reports in serialization tests 2016-11-20 17:25:21 +00:00
moneromooo-monero
18772a3ba9
tests: fix another fee test on 32 bit 2016-11-13 12:21:52 +00:00
moneromooo-monero
2078cb6f2f
tests: fix tests builds after fluffy blocks merge 2016-11-11 18:17:16 +00:00
moneromooo-monero
c27c0feb3d
tests: fix fee unit tests on 32 bit 2016-11-10 20:40:06 +00:00
Riccardo Spagni
0fa6cbef3f
Merge pull request #1276
18f66f4 wallet: use the dynamic per kB fee (moneromooo-monero)
e6deb8a rpc: add a dynamic fee estimation RPC call (moneromooo-monero)
82dbba1 core: dynamic fee algorithm from ArticMine (moneromooo-monero)
2016-11-08 22:33:13 +02:00
moneromooo-monero
82dbba10d4
core: dynamic fee algorithm from ArticMine
The fee will vary based on the base reward and the current
block size limit:

fee = (R/R0) * (M0/M) * F0

R: base reward
R0: reference base reward (10 monero)
M: block size limit
M0: minimum block size limit (60000)
F0: 0.002 monero

Starts applying at v4
2016-10-31 08:37:08 +00:00
moneromooo-monero
ffd8c41f36
ringct: check the size of amount_keys is the same as destinations 2016-10-29 13:33:48 +01:00
moneromooo-monero
1e163666f3
core: notify the txpool when transactions are relayed 2016-10-23 00:32:49 +01:00
moneromooo-monero
4fd56a52bc
unit_tests: fix build after get_output_histogram signature change 2016-10-19 09:34:12 +01:00
Riccardo Spagni
2ef81914b5
Merge pull request #1140
bba6af9 wallet: cold wallet transaction signing (moneromooo-monero)
9872dcb wallet: fix log confusion between bytes and kilobytes (moneromooo-monero)
d9b0bf9 cryptonote_core: make extra field removal more generic (moneromooo-monero)
98f19d4 serialization: add support for serializing std::pair and std::list (moneromooo-monero)
2016-10-04 11:27:38 +02:00
moneromooo-monero
baa3e80140
tests: fix build after addition of cryptonote_core::get_block_sync_size 2016-10-01 10:09:51 +01:00
moneromooo-monero
bba6af9064
wallet: cold wallet transaction signing
This change adds the ability to create a new unsigned transaction
from a watch only wallet, and save it to a file. This file can
then be moved to another computer/VM where a cold wallet may load
it, sign it, and save it. That cold wallet does not need to have
a blockchain nor daemon. The signed transaction file can then be
moved back to the watch only wallet, which can load it and send
it to the daemon.

Two new simplewallet commands to use it:
sign_transfer (on the cold wallet)
submit_transfer (on the watch only wallet)

The transfer command used on a watch only wallet now writes an
unsigned transaction set in a file called 'unsigned_monero_tx'
instead of submitting the tx to the daemon as a normal wallet does.
The signed tx file is called 'signed_monero_tx'.
2016-09-27 07:46:39 +01:00
redfish
e1c7af35d4 cmake: transitive deps and remove deprecated LINK_*
Keep the immediate direct deps at the library that depends on them,
declare deps as PUBLIC so that targets that link against that library
get the library's deps as transitive deps.

Break dep cycle between blockchain_db <-> crytonote_core.
No code refactoring, just hide cycle from cmake so that
it doesn't complain (cycles are allowed only between
static libs, not shared libs).

This is in preparation for supproting BUILD_SHARED_LIBS cmake
built-in option for building internal libs as shared.
2016-09-18 02:56:26 -04:00
moneromooo-monero
7d413f635f
rct: rework serialization to avoid storing vector sizes 2016-09-14 20:23:06 +01:00
redfish
f5d03bb22d tests: block reward: disable 64-bit-only tests on 32-bit systems
Issue #1008
2016-09-04 03:36:10 -04:00
Riccardo Spagni
d3994f1df0
Merge pull request #1018
6cf8ca2 core: faster find_blockchain_supplement (moneromooo-monero)
2016-09-01 11:29:22 +02:00
moneromooo-monero
6cf8ca2a7f
core: faster find_blockchain_supplement
Since this queries block heights for blocks that may or may not
exist, queries for non existing blocks would throw an exception,
and that would slow down the loop a lot. 7 seconds to go through
a 30 hash list.

Fix this by adding an optional return block height to block_exists
and using this instead. Actual errors will still throw an
exception.

This also cuts down on log exception spam.
2016-08-31 10:03:32 +01:00
redfish
640a934d5f tests: cmake: fix building with system gtest
Issues #980 #983
2016-08-30 23:04:53 -04:00
moneromooo-monero
d4b62a1e29
rct amount key modified as per luigi1111's recommendations
This allows the key to be not the same for two outputs sent to
the same address (eg, if you pay yourself, and also get change
back). Also remove the key amounts lists and return parameters
since we don't actually generate random ones, so we don't need
to save them as we can recalculate them when needed if we have
the correct keys.
2016-08-28 21:30:19 +01:00
moneromooo-monero
93f5c625f0
rct: rework v2 txes into prunable and non prunable data
Nothing is pruned, but this allows easier changes later.
2016-08-28 21:30:18 +01:00
moneromooo-monero
d93746b6d3
rct: rework the verification preparation process
The whole rct data apart from the MLSAGs is now included in
the signed message, to avoid malleability issues.

Instead of passing the data that's not serialized as extra
parameters to the verification API, the transaction is modified
to fill all that information. This means the transaction can
not be const anymore, but it cleaner in other ways.
2016-08-28 21:30:16 +01:00
moneromooo-monero
3ab2ab3e76
rct: change the simple flag to a type
for future expansion
2016-08-28 21:30:14 +01:00
Shen Noether
c5be4b0bea
rct: avoid the need for the last II element
This element is used in the generation of the MLSAG, but isn't
needed in verification.
Also misc changes in the cryptonote code to match, by mooo.
2016-08-28 21:30:12 +01:00
moneromooo-monero
a47ceee83b
wallet: do not store signatures in the wallet cache
Saves some substantial space.
Also avoid calculating tx hashes we don't need.
2016-08-28 21:30:10 +01:00
moneromooo-monero
b337aea6cc
rct: do not serialize senderPk - it is not used anymore 2016-08-28 21:30:01 +01:00
moneromooo-monero
9b70856ccb
rct: make the amount key derivable by a third party with the tx key
Scheme design from luigi1114.
2016-08-28 21:29:46 +01:00
moneromooo-monero
cf33e1a52a
rct: do not serialize public keys in outPk
They can be reconstructed from vout
2016-08-28 21:29:43 +01:00
moneromooo-monero
ce5de8b430
tests: add tests for wallet output selection 2016-08-28 21:29:34 +01:00
moneromooo-monero
e06faefde4
tests: add basic tests for simple rct api 2016-08-28 21:29:22 +01:00
moneromooo-monero
a4d4d6194b
integrate simple rct api 2016-08-28 21:29:20 +01:00
moneromooo-monero
59a66e209a
move the rct commitments to the output_amounts database
Since these are needed at the same time as the output pubkeys,
this is a whole lot faster, and takes less space. Only outputs
of 0 amount store the commitment. When reading other outputs,
a fake commitment is regenerated on the fly. This avoids having
to rewrite the database to add space for fake commitments for
existing outputs.

This code relies on two things:

- LMDB must support fixed size records per key, rather than
per database (ie, all records on key 0 are the same size, all
records for non 0 keys are same size, but records from key 0
and non 0 keys do have different sizes).

- the commitment must be directly after the rest of the data
in outkey and output_data_t.
2016-08-28 21:29:02 +01:00
moneromooo-monero
6d0e47148b
rct: add the tx prefix hash into the MLSAG
to protect the non-signatures parts of the tx from tampering.
2016-08-28 21:28:58 +01:00
moneromooo-monero
20e50ec7f7
ringct: do not serialize what can be reconstructed
The mixRing (output keys and commitments) and II fields (key images)
can be reconstructed from vin data.
This saves some modest amount of space in the tx.
2016-08-28 21:28:55 +01:00
moneromooo-monero
161551e13b
tests: test for ringct rctSig data sizes
ie, more data or less data than expected in various fields
2016-08-28 21:28:42 +01:00
moneromooo-monero
cc7f449d57
make rct tx serialization work
It may be suboptimal, but it's a pain to have to rebuild everything
when some of this changes.
Also, no clue why there seems to be two different code paths for
serializing a tx...
2016-08-28 21:28:31 +01:00
moneromooo-monero
54f7429cf6
ringct: allow no outputs, and add tests for this and fees 2016-08-28 21:28:27 +01:00
Shen Noether
f8c04ad94f
ringct: txn fee stuff 2016-08-28 21:28:23 +01:00