Commit graph

6600 commits

Author SHA1 Message Date
moneromooo-monero
72655f78fc
blockchain: fix timestamp/difficulty cache getting out of sync
The cache is discarded when a block is popped, but then gets
rebuilt when the difficulty for next block is requested.
While this is all properly locked, it does not take into account
the delay caused by a database transaction being only committed
(and thus its effects made visible to other threads) later on,
which means another thread could request difficulty between
the pop and the commit, which would end up using stale database
view to build the cache, but that cache would not be invalidated
again when the transaction gets committed, which would cause the
cache to not match the new database data.

To fix this, we now keep track of when the cache is invalidated
so we can invalidate it again upon database transaction commit
to ensure it gets calculated again with fresh data next time it
is nedeed.
2020-06-27 03:58:50 +03:00
Lee Clagett
4be84b7753
Fix D++ block template check 2020-06-27 03:53:37 +03:00
moneromooo-monero
b3847bc194
blockchain: fix total_height in getblocks.bin response 2020-06-27 03:53:19 +03:00
moneromooo-monero
c573ee65f6
rpc: fix loading rpc payment data from file
Got broken after making one of those micro optimizations requested on review..
2020-06-27 03:53:03 +03:00
moneromooo-monero
eb49cb728e
rpc: fix comparison of seconds vs microseconds 2020-06-27 03:52:50 +03:00
moneromooo-monero
da1720ec30
rpc: fix relay_tx error return mixup 2020-06-27 03:52:22 +03:00
moneromooo-monero
6c652ef1ad
daemon: remove time based "update needed" status string 2020-06-27 03:52:09 +03:00
moneromooo-monero
e592a515db
rpc: don't display invalid json errors on default log level
It's not something the user needs to know, and will display
attacker controlled data
2020-06-27 03:51:55 +03:00
François Colas
5df0ffb57c
Fix incorrect lenght of command INS_PREFIX_HASH
buffer_send[4] (LC) is an unsigned char, len should not
exceed 254 (255 - 1 for the option).
2020-06-27 03:51:41 +03:00
Denis Smirnov
d9939ce2fa
fix typo in pick_preferred_rct_inputs 2020-06-27 03:51:27 +03:00
moneromooo-monero
c5d7dd9f18
fix a few typos in error messages
Reported by adrelanos
2020-06-23 07:27:04 +03:00
moneromooo-monero
804c985ecc
rpc: add a sanity limit to a few RPC in restricted mode 2020-05-25 13:09:51 +03:00
moneromooo-monero
1861889b31
rpc: lock access to the rpc payment object 2020-05-25 13:09:37 +03:00
rbrunner7
81f79d900b
[release-v0.16] MMS: New 'config_checksum' subcommand 2020-05-25 13:09:20 +03:00
moneromooo-monero
19f284ddf9
cryptonote_core: remove "We are most likely forked" message
It's time based and we don't have forks every 6 months anymore
2020-05-25 13:05:32 +03:00
moneromooo-monero
9c10229268
protocol: move the "peer claims higher version" warning to debug
Because there's a neverending supply of cunts claiming a wrong
version just to say "look at me" I guess
2020-05-25 13:05:18 +03:00
moneromooo-monero
18cb1753b7
wallet2: fix multisig data clearing stomping on a vector 2020-05-25 13:05:04 +03:00
moneromooo-monero
4eb2f5c2c8
serialization: fix bad rapidjson api usage 2020-05-25 13:04:50 +03:00
moneromooo-monero
e062e1efe3
cryptonote_protocol: stricter limit to number of objects requested
Reported by xnbya
2020-05-25 13:04:32 +03:00
moneromooo-monero
24660441a9
cryptonote_protocol: reject requests/notifications before handshake
Reported by xnbya
2020-05-25 13:04:17 +03:00
moneromooo-monero
1125b332d2
easylogging++: sanitize log payload
Some of it might be coming from untrusted sources

Reported by itsunixiknowthis
2020-05-25 13:04:04 +03:00
moneromooo-monero
009abd48e5
blockchain: detect and log bad difficulty calculations 2020-05-25 13:03:45 +03:00
moneromooo-monero
60cf237210
protocol: don't drop a connection if we can't get a compatible chain
This can now happen if:
- we have a pruned db
- we have not connected to the monero network for a while
- we connect to a node
- that node asks us for history
- we only have a pruned version of the most recent common block

In that case, it's better to not reply but keep the connection alive,
so we can sync off it.
2020-05-25 12:59:32 +03:00
selsta
7f868fafcc
build: fix boost 1.73 compatibility 2020-05-22 21:27:12 +03:00
wowario
7a545ddc2d
comment out v16 fork 2020-05-19 06:51:48 +03:00
jw
3b1c27db69
Merge pull request #256 from wowario/SHA-3
switch to SHA-3 PoW
2020-05-18 15:03:57 -07:00
wowario
87dcc37776
switch to SHA-3 PoW
Co-authored-by: fuwa <fuwa0529@users.noreply.github.com>
2020-05-15 08:37:36 +03:00
jw
6e43f020ae
Merge pull request #255 from wowario/last
upstream
2020-05-14 08:40:03 -07:00
moneromooo-monero
febb8df4bb
blockchain: fix theoretical race getting bulk timestamps 2020-05-14 18:25:14 +03:00
moneromooo-monero
e74aff06c2
simplewallet: don't complain about incoming payment ids on change 2020-05-14 18:24:45 +03:00
wowario
7e3dbdde05
build: prepare v0.8.0.0 release 2020-05-14 17:44:48 +03:00
jw
116d29906c
Merge pull request #253 from wowario/testforks
add testnet fork heights
2020-05-11 09:22:15 -07:00
wowario
9d31efa09e
add testnet fork heights 2020-05-11 18:37:41 +03:00
wowario
193c15ecce
refactor difficulty for testnet 2020-05-09 23:22:28 +03:00
xiphon
eeadc8b723
p2p: startup speedup, init seed nodes on first 'connect_to_seed()' 2020-05-09 12:14:03 +03:00
moneromooo-monero
3a8f49f79c
cryptonote_core: take out the time based upgrade warning
It doesn't really work anymore since we don't have a fork soon
2020-05-09 11:41:37 +03:00
xiphon
1e981f5be6
wallet2: fix keys file deserialization exception handling 2020-05-09 11:41:04 +03:00
moneromooo-monero
b59ef9a359
cryptonote_protocol: do not request pruned borromean sig txes
We don't have a function to calculate their weight from a pruned
version (yet).
2020-05-09 11:40:31 +03:00
Lee Clagett
e1bba18cc5
Fixes for ZMQ JSON-RPC endpoint names for raw tx 2020-05-09 11:40:06 +03:00
moneromooo-monero
a018e01370
wallet2: fix subaddress expansion when receiving monero 2020-05-09 11:39:42 +03:00
moneromooo-monero
014bc83b5e
message_store: don't print an error when there is no mms file
It confuses people
2020-05-09 11:39:15 +03:00
xiphon
a0048e2a49
rpc: fix 'use_bootstrap_daemon_if_necessary' return value 2020-05-09 11:38:49 +03:00
xiphon
30ed4a23bf
wallet2: check_connection return false on get_version status != OK 2020-05-09 11:38:25 +03:00
Lee Clagett
0e59f26064
Used legacy category to match insert_key_images behavior 2020-05-09 11:38:05 +03:00
moneromooo-monero
0c201ab438
cryptonote: fix reuse of non default tx data when relaying
An automatic tx variable is initialized properly on the first
run through the loop, but not the second. Moving the variable
inside the loop ensures the ctor is called again to init it.
2020-05-09 11:37:19 +03:00
xiphon
4cb99f9365
cryptonote_core: skip dns checkpoints on startup if not enforced 2020-05-09 11:36:53 +03:00
moneromooo-monero
c26c40472d
simplewallet: report timestamp based expected unlock time on balance 2020-05-09 11:36:23 +03:00
moneromooo-monero
9ac662cb14
use memwipe on secret k/alpha values
Reported by UkoeHB_ and sarang
2020-05-09 11:35:47 +03:00
Lee Clagett
0b8e49a0aa
Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON. 2020-05-09 11:35:23 +03:00
jw
f879d48df7
Merge pull request #250 from wowario/upstream
Upstream
2020-05-04 08:27:07 -07:00