Commit Graph

1251 Commits

Author SHA1 Message Date
moneromooo-monero c89e88eaa1
hardfork: move an assert so it actually works
An unsigned quantity is always >= 0
2015-10-04 13:09:07 +01:00
Riccardo Spagni aac8d36422
Merge pull request #408
1c3643e dns_utils: fix wrong asserts (moneromooo-monero)
2015-09-28 10:11:03 +02:00
Riccardo Spagni 5be3133ddc
Merge pull request #407
d1c3c3b blockchain: on hardfork 2, require mixin 2 at least if possible (moneromooo-monero)
82a38d0 hardfork: make the voting window a week (moneromooo-monero)
4cf3028 hardfork: rescan speedup (moneromooo-monero)
d923639 hardfork: remove use of GNU extension for initializing object (moneromooo-monero)
969c2c8 blockchain: on hardfork 2, allow miners to claim less money than allowed (moneromooo-monero)
a803bef hardfork: change window semantics to not count the newly added block (moneromooo-monero)
9fa0f4a blockchain: use different hard fork settings for testnet and mainnet (moneromooo-monero)
8d67a9a tests: remove leftover debug traces in hardfork test (moneromooo-monero)
2015-09-28 10:10:16 +02:00
moneromooo-monero 1c3643ef35
dns_utils: fix wrong asserts
Braino.
2015-09-27 17:34:52 +01:00
moneromooo-monero d1c3c3ba59
blockchain: on hardfork 2, require mixin 2 at least if possible 2015-09-27 10:06:59 +01:00
moneromooo-monero 82a38d0d3b
hardfork: make the voting window a week 2015-09-26 22:50:10 +01:00
moneromooo-monero 4cf3028ba5
hardfork: rescan speedup
Add a block height before which version 1 is assumed
Use DB transactions
2015-09-26 22:49:52 +01:00
moneromooo-monero d9236396de
hardfork: remove use of GNU extension for initializing object 2015-09-26 22:49:28 +01:00
moneromooo-monero 969c2c8867
blockchain: on hardfork 2, allow miners to claim less money than allowed
So they can avoid dust if they so wish
2015-09-26 22:49:14 +01:00
moneromooo-monero a803befcd3
hardfork: change window semantics to not count the newly added block
This allows knowing the hard fork a block must obey in order to be
added to the blockchain. The previous semantics would use that new
block's version vote to determine this hard fork, which made it
impossible to use the rules to validate transactions entering the
tx pool (and made it impossible to validate a block before adding
it to the blockchain).
2015-09-26 22:48:59 +01:00
moneromooo-monero 9fa0f4aa4c
blockchain: use different hard fork settings for testnet and mainnet 2015-09-26 22:48:44 +01:00
moneromooo-monero 8d67a9abd4
tests: remove leftover debug traces in hardfork test 2015-09-26 22:48:18 +01:00
Riccardo Spagni 8f8e291d97
Merge pull request #406
5b11a89 hardfork: most state now saved to the DB (moneromooo-monero)
0a54c3a hardfork: remove the "parts are copyright cryptonote" notices (moneromooo-monero)
e546f37 Add an RPC call and daemon command to get info on hard fork voting (moneromooo-monero)
d067131 blockchain: force a hardfork recalculation at load time (moneromooo-monero)
a717761 core: add consts where appropriate (moneromooo-monero)
8ffc508 core: moan when we think an update is needed to get latest hard fork info (moneromooo-monero)
f854984 blockchain: use the new hardfork class (moneromooo-monero)
62b1f74 New hardfork class (moneromooo-monero)
bed9a44 blockchain: add a couple missing includes (moneromooo-monero)
2015-09-22 14:47:36 +02:00
Riccardo Spagni 265257e6a0
Merge pull request #403
05968c5 wap_proto: fix warning casting away const (moneromooo-monero)
6d4ec05 monero-rpc-deprecated: misc fixes/improvements (moneromooo-monero)
2015-09-22 14:46:53 +02:00
moneromooo-monero 5b11a89a76
hardfork: most state now saved to the DB
There will be a delay on first load of an existing blockchain
as it gets reparsed for this state data.
2015-09-20 18:42:52 +01:00
moneromooo-monero 0a54c3a553
hardfork: remove the "parts are copyright cryptonote" notices
I coded the whole thing from scratch.
2015-09-20 10:05:15 +01:00
moneromooo-monero e546f3724a
Add an RPC call and daemon command to get info on hard fork voting 2015-09-19 16:47:48 +01:00
moneromooo-monero d06713199e
blockchain: force a hardfork recalculation at load time
Since the state isn't actually saved anywhere, as the archive
code isn't called in the new DB version.
2015-09-19 16:47:42 +01:00
moneromooo-monero a7177610b3
core: add consts where appropriate 2015-09-19 16:47:35 +01:00
moneromooo-monero 8ffc508cef
core: moan when we think an update is needed to get latest hard fork info 2015-09-13 18:09:57 +01:00
moneromooo-monero 05968c53cf
wap_proto: fix warning casting away const 2015-09-13 11:30:45 +01:00
moneromooo-monero 6d4ec05f9d
monero-rpc-deprecated: misc fixes/improvements
- make error constants actually const
- fix client leak when reconnecting after failure to connect
- simplify strncpy bound
- fix user controlled memory writes in getheight
2015-09-13 11:28:32 +01:00
moneromooo-monero f85498422d
blockchain: use the new hardfork class 2015-09-12 11:15:53 +01:00
moneromooo-monero 62b1f74116
New hardfork class
This keeps track of voting via block version, in order to decide
when to enable a particular fork's code.
2015-09-12 11:14:44 +01:00
moneromooo-monero bed9a44e56
blockchain: add a couple missing includes 2015-09-12 11:14:34 +01:00
Riccardo Spagni 3e7c6dfa2b
Merge pull request #401
9b048e0 Add attribution and link to the encrypted payment id design by luigi1111 (moneromooo-monero)
2015-09-07 10:44:17 +02:00
moneromooo-monero 9b048e03da
Add attribution and link to the encrypted payment id design by luigi1111 2015-09-07 09:39:22 +01:00
Riccardo Spagni 66e9f44a63
Merge pull request #397
c434480 unit_tests: fix mnemonics unit test testing invalid seeds (moneromooo-monero)
2015-09-07 10:37:57 +02:00
Riccardo Spagni b0eec52b5a
Merge pull request #396
93aadbd unit_tests: initialize a field to silence a valgrind report (moneromooo-monero)
b0a98b2 unit_tests: initialize enough to silence valgrind (moneromooo-monero)
555d90b berkeleydb: fix delete/free mismatch (moneromooo-monero)
2015-09-07 10:37:14 +02:00
Riccardo Spagni 061a2bda4d
Merge pull request #395
008a54d blockchain: change code to mirror original CN code (moneromooo-monero)
0c85237 blockchain: fix return value on out of range start offset (moneromooo-monero)
a474d66 blockchain: fix offset/height comparisons in get_blocks (moneromooo-monero)
d28ca8e blockchain: make some flag setting code closer to the original code (moneromooo-monero)
d166113 blockchain: rework loop to match the original code in complete_timestamps_vector (moneromooo-monero)
4707ccf blockchain: fix sizing of timestamps and cumulative_difficulty vectors (moneromooo-monero)
5e3d56d blockchain: match original code's error return in switch_to_alternative_blockchain (moneromooo-monero)
a33dcdd blockchain: fix rollback height in failure path (moneromooo-monero)
1208cc8 blockchain: match original code early out in rollback_blockchain_switching (moneromooo-monero)
2015-09-07 10:36:36 +02:00
moneromooo-monero c4344800eb
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.
2015-09-03 15:32:35 +01:00
moneromooo-monero 93aadbd1e4
unit_tests: initialize a field to silence a valgrind report
A memory chunk is split in two, and the concatenation of the
two parts compared to the original, triggering a comparison
with uninitialized (with a copy of itself, but valgrind does
not realize that).
2015-09-02 19:05:02 +01:00
moneromooo-monero b0a98b2cec
unit_tests: initialize enough to silence valgrind 2015-09-02 18:50:30 +01:00
moneromooo-monero 555d90b2c9
berkeleydb: fix delete/free mismatch
Despite being C++, the stats object is allocated by the underlying
C layer using malloc(3).
2015-09-02 18:17:18 +01:00
moneromooo-monero 008a54ddc4
blockchain: change code to mirror original CN code
I'm not quite sure the two are equivalent, so use the original
CN expression for safety and verification purposes.
2015-08-30 16:02:58 +01:00
moneromooo-monero 0c8523711b
blockchain: fix return value on out of range start offset
The original code would go through the normal code and
end up returning true with an empty set.
2015-08-30 16:02:53 +01:00
moneromooo-monero a474d66c98
blockchain: fix offset/height comparisons in get_blocks 2015-08-30 16:02:48 +01:00
moneromooo-monero d28ca8ef41
blockchain: make some flag setting code closer to the original code
It should not matter in practice, but it makes for simpler double
checking when comparing both.
2015-08-30 16:02:42 +01:00
moneromooo-monero d16611360d
blockchain: rework loop to match the original code in complete_timestamps_vector 2015-08-30 16:02:36 +01:00
moneromooo-monero 4707ccf1c3
blockchain: fix sizing of timestamps and cumulative_difficulty vectors 2015-08-30 16:02:31 +01:00
moneromooo-monero 5e3d56d6e3
blockchain: match original code's error return in switch_to_alternative_blockchain 2015-08-30 16:02:24 +01:00
moneromooo-monero a33dcdd400
blockchain: fix rollback height in failure path
The original code rolls back to split_height, which can be
different from the current height if a block was succesfully
added but a subsequent one fails.
2015-08-30 16:02:18 +01:00
moneromooo-monero 1208cc8fa4
blockchain: match original code early out in rollback_blockchain_switching 2015-08-30 16:02:10 +01:00
Riccardo Spagni 6a10ffd4c6 Merge branch 'moneromooo-monero-fd-leak' into development 2015-08-30 16:34:38 +02:00
Riccardo Spagni 48ac53d59c Merge branch 'fd-leak' of https://github.com/moneromooo-monero/bitmonero into moneromooo-monero-fd-leak 2015-08-30 16:34:19 +02:00
Riccardo Spagni cf88e4dd24
Merge pull request #394
3c10239 unbound: use the mini event fallback implementation (moneromooo-monero)
4e138a0 dns_utils: remove unnecessary string conversion (moneromooo-monero)
f928468 dns_utils: factor the fetching code for different DNS record types (moneromooo-monero)
4ef0da1 dns_utils: simplify string handling and fix leak (moneromooo-monero)
ae5f28c dns_utils: add a const where possible (moneromooo-monero)
f43d465 dns_utils: lock access to the singleton (moneromooo-monero)
5990344 dns: make ctor private (moneromooo-monero)
2015-08-30 16:30:35 +02:00
moneromooo-monero 3c10239327
unbound: use the mini event fallback implementation
Using libevent seems to have high peaks of file descriptor use,
which can cause failure to create fds in other parts of bitmonerod.
The fallback implementation seems to run fine in a significantly
tighter file descriptor limit.
2015-08-30 15:21:24 +01:00
moneromooo-monero 4e138a02df
dns_utils: remove unnecessary string conversion 2015-08-30 15:04:18 +01:00
moneromooo-monero f928468b9b
dns_utils: factor the fetching code for different DNS record types 2015-08-30 15:04:09 +01:00
moneromooo-monero 4ef0da184d
dns_utils: simplify string handling and fix leak 2015-08-30 15:03:59 +01:00