Commit graph

210 commits

Author SHA1 Message Date
Riccardo Spagni
f5176cb6e8
Merge pull request #1467
55fa0479 rpc: new function and RPC to get alternative chain info (moneromooo-monero)
2016-12-20 17:44:47 +02:00
kenshi84
2ac8007544 also use portable serializer for boost_serialization_helper.h and net_node.inl, completely adandon boost/archive/binary_oarchive.hpp 2016-12-20 13:04:19 +09:00
moneromooo-monero
55fa0479a0
rpc: new function and RPC to get alternative chain info 2016-12-17 11:28:49 +00:00
moneromooo-monero
dd144b14bc
blockchain: fix reorganizations past a hard fork boundary
After popping blocks from the old chain, the hard fork object's
notion of the current version was not in line with the new height,
causing the first blocks from the new chain to be rejected due
to a false expection of a newer version.
2016-12-13 02:13:23 +00:00
Riccardo Spagni
0f99423080
Merge pull request #1418
dfbb85b6 blockchain: fix setting non trovial alternate chain as invalid (moneromooo-monero)
2016-12-10 14:48:39 +02:00
moneromooo-monero
dfbb85b6fe
blockchain: fix setting non trovial alternate chain as invalid
The wrong iterator was being used.
Also preincrement iterators to avoid possibly invalidating them,
I'm not sure this is necessary, but let's be safe.
2016-12-08 22:26:27 +00:00
luigi1111
648ea6bef1
blockchain: bring the v4 fork height one block forward
This will ensure the early 0.10 daemons will barf at the fork
height, and not a bit later, which could be confusing.
2016-12-06 21:59:08 +00:00
Riccardo Spagni
f2ea2afb77
Merge pull request #1398
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04 22:28:22 +02:00
Riccardo Spagni
8086379680
Merge pull request #1397
3f7d6fb5 Fix delayed exit when syncing (moneromooo-monero)
2016-12-04 22:27:41 +02:00
Riccardo Spagni
416f7fbd5f
Merge pull request #1392
204b1bff blockchain: use high bound block reward on error where appropriate (moneromooo-monero)
2016-12-04 22:23:03 +02:00
Pierre Boyer
f4772bae81 Fix a few minor typos 2016-12-04 14:13:54 +01:00
moneromooo-monero
3f7d6fb57d
Fix delayed exit when syncing 2016-12-04 12:27:45 +00:00
moneromooo-monero
204b1bff62
blockchain: use high bound block reward on error where appropriate
If the block reward to use for the fee calculation can't be
calculated (should not happen in practice), use a high bound,
so we use a fee overestimate that will be accepted by the network.
2016-12-01 16:34:09 +00:00
moneromooo-monero
8f6ec90c83
blockchain: reject invalid pubkeys from v4 2016-11-28 22:32:58 +00:00
moneromooo-monero
2c0173c722
Add a get_outs (fully text based) version of get_outs.bin 2016-11-22 20:00:40 +00:00
moneromooo-monero
e6deb8abda
rpc: add a dynamic fee estimation RPC call 2016-10-31 08:38:00 +00: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
88faec75fe
wallet: select part of the fake outs from recent outputs
25% of the outputs are selected from the last 5 days (if possible),
in order to avoid the common case of sending recently received
outputs again. 25% and 5 days are subject to review later, since
it's just a wallet level change.
2016-10-15 18:17:16 +01:00
moneromooo-monero
4038e86527
Add performance timers for ringct tx verification 2016-10-10 21:24:21 +01:00
Riccardo Spagni
a8e03344e5
Merge pull request #1177
3644aa9 blockchain: avoid using a reference to a temporary (moneromooo-monero)
2016-10-04 12:17:28 +02:00
Riccardo Spagni
895d20f901
Merge pull request #1123
0d036be blockchain: do not reject chain histories matching only genesis (moneromooo-monero)
2016-10-04 12:05:11 +02:00
moneromooo-monero
3644aa94f3
blockchain: avoid using a reference to a temporary 2016-10-03 23:20:50 +01:00
NanoAkron
8ed0d72b12
Moved logging to target functions rather than caller 2016-10-03 22:11:00 +01:00
moneromooo-monero
0d036bec26
blockchain: do not reject chain histories matching only genesis
This is fine if our local chain is so small that it is entirely
contained within the last jump in the peer's short chain history.
2016-09-24 11:19:00 +01:00
Riccardo Spagni
c2faab5e1a
fix v5 height 2016-09-18 20:13:47 +02:00
Riccardo Spagni
cebbcf0f64
fix v5 fork date description 2016-09-18 19:35:36 +02:00
Riccardo Spagni
c41098aacf
updated fork heights for v4 and v5 2016-09-18 19:18:16 +02:00
rckngOpossum
e29e8b1b99 compile errors fixed when PER_BLOCK_CHECKPOINT not defined 2016-09-15 15:55:07 -05:00
rckngOpossum
e49c161987 compile errors fixed when DEBUG_CREATE_BLOCK_TEMPLATE defined 2016-09-15 15:36:16 -05:00
Riccardo Spagni
e0d78858e4
Merge pull request #1022
b8c03a5 Remove blocks_per_sync limits (Howard Chu)
2016-09-01 11:32:27 +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
Howard Chu
b8c03a5f10
Remove blocks_per_sync limits
The code used to cap at 5000 blocks per sync. It also treated 0 as 1.
Remove these checks; if specified as 0 do no periodic syncs at all.
Then the user is responsible for syncing in some external process.
2016-08-31 00:00:19 +01:00
moneromooo-monero
91ca0b4065
core: allow empty global indices for txes with empty vout 2016-08-29 09:28:32 +01:00
moneromooo-monero
887db9f936
blockchain: testnet heights for v3, v4, and v5 2016-08-28 21:30:54 +01:00
moneromooo-monero
b951bc8780
wallet: transfer_selected_rct now also selects fake outs 2016-08-28 21:30:34 +01:00
moneromooo-monero
4f887dea6e
increase minimum mixin to 4 on hard fork 5 2016-08-28 21:30:33 +01:00
moneromooo-monero
0815c72df7
core: allow v1 txes after HF 5 when sweeping unmixable outputs 2016-08-28 21:30:31 +01:00
moneromooo-monero
c3b3260ae5
New "Halfway RingCT" outputs for coinbase transactions
When RingCT is enabled, outputs from coinbase transactions
are created as a single output, and stored as RingCT output,
with a fake mask. Their amount is not hidden on the blockchain
itself, but they are then able to be used as fake inputs in
a RingCT ring. Since the output amounts are hidden, their
"dustiness" is not an obstacle anymore to mixing, and this
makes the coinbase transactions a lot smaller, as well as
helping the TXO set to grow more slowly.

Also add a new "Null" type of rct signature, which decreases
the size required when no signatures are to be stored, as
in a coinbase tx.
2016-08-28 21:30:26 +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
0263dd2d23
core: add some locking around pool use 2016-08-28 21:30:08 +01:00
moneromooo-monero
37bdf6ebe3
change fork settings to allow pre-rct txes for one more fork cycle 2016-08-28 21:29:50 +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
a4d4d6194b
integrate simple rct api 2016-08-28 21:29:20 +01:00
moneromooo-monero
c2ec6d35b9
mixable transactions must be rct for v3 2016-08-28 21:29:07 +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
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
ada527558f
Use the supplied hard fork version in validate_miner_transaction
rather than using the current one. No functional changes, but may
save some bugs in the future.
2016-08-28 21:28:51 +01:00