Commit graph

111 commits

Author SHA1 Message Date
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
moneromooo-monero
eb56d0f994
blockchain_db: add functions for adding/removing/getting rct commitments 2016-08-28 21:28:11 +01:00
Shen Noether
53cdf4df5e
tests: new ringct test for checking H2 values
Ported from Shen's RingCT repo
2016-08-28 21:28:01 +01:00
moneromooo-monero
720ac85553
tests: zero inputs/outputs are in fact supposed to be accepted 2016-08-28 21:27:52 +01:00
moneromooo-monero
84948eabae
ringct: add a test for prooveRange being non deterministic 2016-08-28 21:27:50 +01:00
moneromooo-monero
700248f59e
tests: more ringct range proof tests 2016-08-28 21:27:43 +01:00
moneromooo-monero
57779abe27
tests: add some more ringct building block tests 2016-08-28 21:27:26 +01:00
moneromooo-monero
2d6303fb2c
tests: add Shen Noether's basic ringct tests 2016-08-28 21:27:19 +01:00
moneromooo-monero
11dc091464
Fake outs set is now decided by the wallet
This plugs a privacy leak from the wallet to the daemon,
as the daemon could previously see what input is included
as a transaction input, which the daemon hadn't previously
supplied. Now, the wallet requests a particular set of
outputs, including the real one.

This can result in transactions that can't be accepted if
the wallet happens to select too many outputs with non standard
unlock times. The daemon could know this and select another
output, but the wallet is blind to it. It's currently very
unlikely since I don't think anything uses non default
unlock times. The wallet requests more outputs than necessary
so it can use spares if any of the returns outputs are still
locked. If there are not enough spares to reach the desired
mixin, the transaction will fail.
2016-08-11 14:35:27 +01:00
moneromooo-monero
46188734f6
tests: fix a bitflag test typo 2016-07-26 22:40:46 +01:00
moneromooo-monero
89e68d778d
unit_tests: check adding checkpoints succeeded 2016-07-26 22:40:38 +01:00
moneromooo-monero
d7b681cd65
remove hf_starting_height db
It's not really needed, it used to be an optimization for when
that code was not using the db and needed to recalculate things
fast on startup.
2016-07-13 21:38:34 +01:00
moneroexample
de030d99a5 fix: error: -Werror=misleading-indentation
Compilation of bitmonero on Arch with gcc 6.1 results in the following
error:

/home/mwo/bitmonero/tests/unit_tests/hardfork.cpp: In member function ‘virtual void TestDB::set_hard_fork_version(uint64_t, uint8_t)’:
/home/mwo/bitmonero/tests/unit_tests/hardfork.cpp:132:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
     if (versions.size() <= height) versions.resize(height+1); versions[height] = version;

This can be fixed by simply unfolding this line into three lines.
2016-05-18 10:54:41 -04:00
Riccardo Spagni
e54e4d96a4
Merge pull request #831
9ef8c7b tests: fix tests broken by the removal of the block reward accumulation loop (moneromooo-monero)
a6e717e cn_deserialize: deserialize tx_extra too (moneromooo-monero)
3eff37f unit_tests: add a write_varint/read_varint test (moneromooo-monero)
7a66387 unit_tests: fix UNBOUND_LIBRARIES/UNBOUND_LIBRARY typo (moneromooo-monero)
d6bce4b core: move tx_extra parsing errors to log level 1 (moneromooo-monero)
2016-05-17 19:07:28 +02:00
moneromooo-monero
3eff37f931
unit_tests: add a write_varint/read_varint test 2016-05-01 11:42:31 +01:00
moneromooo-monero
7a663873ce
unit_tests: fix UNBOUND_LIBRARIES/UNBOUND_LIBRARY typo 2016-05-01 11:35:14 +01:00
Riccardo Spagni
30dce45643 Merge branch 'performance' of https://github.com/LMDB/bitmonero 2016-04-29 21:41:43 +02:00
Howard Chu
d7ea7d9a23 Merge branch 'performance' into master 2016-04-05 21:13:16 +01:00
Howard Chu
372acee723 Cleanup
drop obsolete remove_output()
fix get_output_key(global), fix crash in blockchain_dump
2016-04-05 21:05:24 +01:00
moneromooo-monero
5092e45e3f
tests: unbound API is only accessible in static builds 2016-04-02 16:02:18 +01:00
moneromooo-monero
34957fcbb9
tests: add test for needed OpenSSL algorithms in unbound
These can be compiled out of libunbound, leading to failure
to check DNSSEC validity.
2016-03-29 17:56:42 +01:00
moneromooo-monero
d5d46e6d6d
tests: obligatory hardfork unit build fix after interface change 2016-03-26 23:44:04 +00:00
moneromooo-monero
600a3cf0c0
New RPC and daemon command to get output histogram
This is a list of existing output amounts along with the number
of outputs of that amount in the blockchain.

The daemon command takes:
- no parameters: all outputs with at least 3 instances
- one parameter: all outputs with at least that many instances
- two parameters: all outputs within that many instances

The default starts at 3 to avoid massive spamming of all dust
outputs in the blockchain, and is the current minimum mixin
requirement.

An optional vector of amounts may be passed, to request
histogram only for those outputs.
2016-03-26 21:10:43 +00:00
moneromooo-monero
f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero
fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
warptangent
dfca2ae1b5
unit_tests: fix hard fork unit test compilation
Match changed BlockchainDB function declaration.
2016-03-05 10:01:10 -08:00
Riccardo Spagni
95b3b09e11
Merge pull request #689
5ab33ca unit_tests: update test openalias address (moneromooo-monero)
2016-02-29 17:31:07 -05:00
moneromooo-monero
5ab33cabf6
unit_tests: update test openalias address
It was recently changed
2016-02-23 23:12:55 +00:00
moneromooo-monero
5e3557d2c3
move g_test_dbg_lock_sleep from a global to a function level static
This avoids the need to define that variable in every program
which uses epee.
2016-02-22 19:34:09 +00:00
moneromooo-monero
5cb03a15be
unit_tests: fix blockchain unit test after hard fork import fix 2016-02-08 20:58:43 +00:00
moneromooo-monero
8e4c2e6ebe
unit_tests: fix hard fork unit test compilation 2016-02-08 18:44:27 +00:00
Riccardo Spagni
cea6f6fb9c
Merge pull request #641
7658ac0 blockchain: revert handle_get_objects adding block id on tx not found (moneromooo-monero)
3a0f4d8 berkeleydb: fix delete/free mismatch (moneromooo-monero)
1642be2 minor bugfixes and refactoring (Thomas Winget)
098dcf2 unit_tests: fix mnemonics unit test testing invalid seeds (moneromooo-monero)
2016-02-08 18:31:42 +02:00
moneromooo-monero
098dcf2885
unit_tests: fix mnemonics unit test testing invalid seeds
Some word triplets, such as "mugged names nail", are not valid
results from any 32 bit value. If used to decode a 32 bit value,
the result will therefore encode to a different word triplet.

Fix this by using random words converted from an actual random
bitstring, ensuring we always get valid triplets.
2016-02-01 20:47:03 +00:00
moneromooo-monero
119eb10d7c
unit_tests: fix hard fork unit tests and add a test for major too 2016-02-01 20:07:15 +00:00
me0wmix
28f95eb001 OpenBSD support for Monero. 2016-01-21 11:18:26 -07:00
Howard Chu
4cf6e2b2c3 Fix 30f92f5630
Needed to add the corresponding (dummy) method to unit test hardfork
2016-01-16 16:10:16 +00:00
moneromooo-monero
a8caab1af1
unit_tests: initialize db object in ctor, not open
open isn't actually called in those tests
2016-01-02 11:37:00 +00:00
Riccardo Spagni
de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero
1813736562
unit_tests: remove an unused variable 2015-12-30 17:30:54 +00:00
moneromooo-monero
70dd34634c
unit_tests: fix hardfork test build
The dummy blockchain class needed to have the newly added
is_read_only virtual function.
2015-12-30 17:30:01 +00:00
moneromooo-monero
b90e14d927
tests: add a unit test for canonical decomposed amounts 2015-12-26 11:41:50 +00:00
moneromooo-monero
6c868595b7
unit_tests: fix hard fork tests
A couple stopped passing when the hard fork code was made
to reject incoming hard fork versions it did not know about.
2015-12-24 16:12:03 +00:00
moneromooo-monero
8b0200adf8
unit_tests: new test for IP blocking 2015-12-24 16:05:19 +00:00
moneromooo-monero
eee44e62bc
unit_tests: fix block reward test using post hard fork settings
This would fail, as the post hard fork settings would yield
different data, and the test expects pre hard fork data.
2015-12-13 11:18:59 +00:00
moneromooo-monero
44f1267a39
tests: fix a typo in test name 2015-12-13 11:10:33 +00:00