Commit Graph
100 Commits
Author SHA1 Message Date
moneromooo-monero 19b228393f New add_aux_pow RPC to support merge mining 2021-02-09 11:58:21 +00:00
moneromooo-monero 372754a66e storages: overridable limits for loading portable_storage from binary 2021-01-07 20:24:29 +00:00
moneromooo-monero b9092ddb5c epee: also limit number of strings in portable_storage
They require at least 24 bytes
2021-01-05 17:54:25 +00:00
moneromooo-monero b652d598d1 add a max levin packet size by command type 2021-01-03 14:07:45 +00:00
moneromooo-monero 4e74385a1a fix accessing an network address in a deleted context
Both drop_connection and add_host_fail can drop the connection,
which invalidates the context, and thus the address it contains.

Thanks to wfaressuissia[m] for lots of help and prodding when
debugging this
2021-01-03 13:04:55 +00:00
moneromooo-monero 1e27f7101e blockchain: lock access to m_blocks_hash_of_hashes
it is accessed both when adding and when prevalidating a set
of new hashes from a peer
2021-01-02 22:19:54 +00:00
moneromooo-monero 38a6e6eb26 protocol: handle receiving a block hash we've not added yet 2021-01-02 22:10:31 +00:00
moneromooo-monero 5cd6fda1ee portable_storage: better sanity checking 2021-01-02 12:34:28 +00:00
moneromooo-monero c5c278c339 p2p: only log to global when a blocked IP is not already blocked 2021-01-01 19:54:51 +00:00
moneromooo-monero 0aa541b361 protocol: more sanity checks in new chain block hashes 2020-12-31 23:33:18 +00:00
moneromooo-monero ab5e185140 protocol: fix wrong command in logs
this is not a levin packet, this is just its payload
2020-12-30 21:08:28 +00:00
moneromooo-monero 31c69923ba protocol: don't reset last request time on an idle timer
this prevents losing time of "idle time" for a peer, which could
otherwise be reset by another timed sync command from the peer
2020-12-30 14:22:10 +00:00
moneromooo-monero 1eb14af1a3 rpc: limit the number of txes for get_blocks.bin 2020-12-29 04:31:58 +00:00
moneromooo-monero 353f93ee1a portable_storage: remove array element limit
some people don't want it
2020-12-28 21:04:58 +00:00
moneromooo-monero bcdc6c62b7 protocol: fix false positives dropping peers
it'd trigger on reorgs
2020-12-27 14:41:19 +00:00
moneromooo-monero bc97eb8a33 portable_storage: remove overly aggressive cutoff 2020-12-27 12:44:38 +00:00
moneromooo-monero 4310780c08 cryptonote_basic: guess what got lost porting patches to branches again 2020-12-26 23:43:59 +00:00
moneromooo-monero 95575cda6e epee: fix some issues using connections after shutdown 2020-12-26 14:14:55 +00:00
moneromooo-monero 7f407c0274 portable_storage: add some sanity checks on data size
especially when allocated size is >> serialized data size
2020-12-26 03:22:59 +00:00
moneromooo-monero efe83982d3 protocol: drop nodes if they claim new data but only give stale data
Some joker is spending time actually doing this
2020-12-25 20:30:39 +00:00
moneromooo-monero d2fda6c25f restrict public node checks a little
do not include blocked hosts in peer lists or public node lists by default,
warn about no https on clearnet and about untrusted peers likely being spies
2020-12-22 23:39:07 +00:00
moneromooo-monero 56748e1d74 ban lists may now include subnets 2020-12-22 02:12:41 +00:00
moneromooo-monero e9abfea165 Optional DNS based blocklist
If enabled, pulls IPs to block on blocklist.moneropulse.*, and
blocks then for 8 days (so IPs dropping from the list will
eventually get unblocked, and DNS failures don't result in
instant clearing of the blocklist).

Enable with --enable-dns-blocklist
2020-12-20 02:09:58 +00:00
moneromooo-monero 5a1ac9c0ef rpc: add a busy_syncing field to get_info
true if and pretty much only if new blocks are being added
2020-12-17 18:03:11 +00:00
moneromooo-monero cf7e1571d3 protocol: reject claimed block hashes that already are in the chain 2020-12-17 02:54:02 +00:00
moneromooo-monero af0a25544e protocol: drop peers we can't download anything from in sync mode
instead of the (incorrect) check for whether we think we might have
a user for it at some point in the near future. We can reconnect.
2020-12-16 20:19:52 +00:00
moneromooo-monero f3c0d4f9df protocol: remove unused (and cunningly uninitialized) field 2020-12-15 01:32:18 +00:00
moneromooo-monero 8e62362cd3 p2p: ifx getting seed nodes for uncommon cases
The code is technically correct, but liable to easily become incorrect with changes
2020-12-15 01:32:15 +00:00
moneromooo-monero 0660db3e7a fuzz_tests: add a test for utf8canonical 2020-12-14 19:40:24 +00:00
moneromooo-monero 9de3787c47 daemon: the ban command can now load IPs from a file (ban @filename) 2020-12-14 12:26:23 +00:00
moneromooo-monero 68637bca3f p2p: remove peers from grey and anchors lists when blocked 2020-12-13 23:27:44 +00:00
moneromooo-monero 58651d16c0 p2p: ignore incoming peer list entries when we have them blocked 2020-12-13 23:14:05 +00:00
moneromooo-monero 543733d42c protocol: include first new block in chain entry response 2020-12-12 01:36:35 +00:00
moneromooo-monero 62e8ca5eaf protocol: revert incoming chain height check against local chain
We can actually request a chain that's further away from what we
have as we buffer more and more
2020-12-11 02:37:15 +00:00
moneromooo-monero cd7e9769d8 protocol: one more sanity check on usable data from a peer 2020-12-10 23:02:06 +00:00
moneromooo-monero d660f22ed1 protocol: drop origin IP if a block fails to verify in sync mode
It would otherwise be possible for a peer to send bad blocks,
then disconnect and reconnect again, escaping bans
2020-12-10 21:59:18 +00:00
moneromooo-monero dd5e689533 protocol: add calls to reserve where appropriate 2020-12-10 20:47:35 +00:00
moneromooo-monero 5dee031b25 protocol: add a sanity check to the number of block hashes sent 2020-12-10 19:26:12 +00:00
moneromooo-monero eb77790dfb protocol: fix asking for pruned blocks for v10
Old format is still alloewd there, this is a two fork update
2020-12-10 18:10:45 +00:00
moneromooo-monero 7f30c49731 simplewallet: don't complain about connecting to the daemon when offline 2020-12-10 17:57:13 +00:00
moneromooo-monero 0f34cabb98 protocol: more restrictive checks on chain entry response 2020-12-10 17:23:50 +00:00
moneromooo-monero 47590fc80b rpc: report target height as 0 when synced
since it only makes sense when syncing, and it confuses people
2020-12-10 17:05:34 +00:00
moneromooo-monero 19f77578e0 protocol: fix switchting to adding blocks if noone's adding the next span 2020-12-10 15:46:48 +00:00
moneromooo-monero 8ee3ec7296 cmake: fix "release" version string on tagged releases
It would not say "release" if we're on a previous tag
2020-12-09 22:18:44 +00:00
moneromooo-monero 281b42a281 p2p: fix race condition accessing a deleted context 2020-12-06 12:40:07 +00:00
moneromooo-monero 14bc5c095c db_lmdb: move spammy "not found in db" message to TRACE
These are functions that check whether a tx is in the db, so whether
it is there or not is really not interesting, and it seems to scare
people from time to time
2020-12-06 01:46:21 +00:00
moneromooo-monero a4e42b2d4c bump my key expiration date by 2 more years 2020-12-05 18:19:56 +00:00
moneromooo-monero bc7cd78870 p2p: drop peers that spam peer lists
There's always some people who just want to abuse things
2020-12-05 13:12:58 +00:00
moneromooo-monero 5ed604fe5b crypto: fix non zero scalar being 0 after reducing 2020-12-04 01:00:03 +00:00
moneromooo-monero 2395e0e678 p2p: add a tor seed node 2020-12-03 23:45:38 +00:00
moneromooo-monero c64b94bd14 p2p: fix endianness when checking IPv6 addresses mapping to IPv4 2020-12-03 00:31:32 +00:00
moneromooo-monero 67f2bec2df p2p: make this work with boost <= 1.65 (pffff) 2020-12-03 00:31:32 +00:00
moneromooo-monero c5f6629f4a epee: tighten the URL parsing regexp a little
fixes massive amounts of time spent on pathological inputs

Found by OSS-Fuzz
2020-11-09 13:05:39 +00:00
moneromooo-monero f9527e608e protocol: reject empty incoming block messages 2020-11-03 12:59:36 +00:00
moneromooo-monero 1f04a3186b p2p: use /16 filtering on IPv4-within-IPv6 addresses
IPv6 addresses include a range that can map IPv4 addresses,
which allowed those mapped addresses to bypass filtering.

This filter should be replaced by AS filtering at some point.
2020-11-03 00:46:07 +00:00
moneromooo-monero 19d1b35905 add a convenience script to start monero with inbound tor 2020-10-28 22:38:27 +00:00
moneromooo-monero 874487fed8 blockchain: remove some dead code
This is already done
2020-10-20 16:50:36 +00:00
moneromooo-monero cc034fe0c3 util: fix escaping more than one ?* in glob_to_regex 2020-10-20 16:46:53 +00:00
moneromooo-monero c67fa32496 bump default number of connections from 8 to 12 2020-10-18 13:25:05 +00:00
moneromooo-monero 88fde0309a blockchain: fix sync at v14 boundary
Miners with MLSAG txes which they'd already verified included
a couple in that block, but the consensus rules had changed
in the meantime, so that block is technically invalid and any
node which did not already have those two txes in their txpool
could not sync. Grandfather them in, since it has no effect in
practice.
2020-10-18 11:52:33 +00:00
moneromooo-monero 453b8e267c README: add OSS-fuzz status banner 2020-10-17 16:41:24 +00:00
moneromooo-monero fcbfb0a00a wallet2: fix missing m_state field in wallet serialization 2020-10-12 15:35:52 +00:00
moneromooo-monero 11b20229c9 tx_pool: silence spammy harmless warning till we fix the bug 2020-10-12 14:07:40 +00:00
moneromooo-monero b6c4f8cd54 fix a couple bugs found by OSS-fuzz
- index out of bounds when importing outputs
- accessing invalid CLSAG data
2020-09-24 15:30:38 +00:00
moneromooo-monero 6ee9f12607 fuzz_tests: fix build error in signature fuzz test 2020-09-24 15:17:57 +00:00
moneromooo-monero 0b26d380cd link libzmq against libgssapi_krb5 if found 2020-09-17 14:51:33 +00:00
moneromooo-monero 4971219c2c blockchain: deterministic UNIX time unlock checks
Based on a patch by TheCharlatan <seb.kung@gmail.com>
2020-09-15 11:40:28 +00:00
moneromooo-monero c3f354e6c1 simplewallet fix wrong persistent-rpc-client-id name in help 2020-09-14 20:50:35 +00:00
moneromooo-monero ef4325fd41 wallet2: fix tx sanity check triggering on pre-rct outputs 2020-09-12 17:51:41 +00:00
moneromooo-monero fc2cb224a9 blockchain: fix pow skipping for old blocks without precalc hash 2020-09-07 01:57:19 +00:00
moneromooo-monero 5498142e8f rpc: assume randomx from v13 onwards 2020-09-07 01:13:06 +00:00
moneromooo-monero 1b9fe0761c Revert "unbound: update to get build fixes"
This reverts commit 541a7c81a1.

It breaks the depends build
2020-09-06 18:15:52 +00:00
moneromooo-monero 541a7c81a1 unbound: update to get build fixes 2020-09-06 11:47:55 +00:00
moneromooo-monero b09cc3d03d hardforks: add v13/v14 for testnet 2020-09-02 17:56:48 +00:00
moneromooo-monero 6a37da837e threadpool: guard against exceptions in jobs, and armour plating
Those would, if uncaught, exit run and leave the waiter to wait
indefinitely for the number of active jobs to reach 0
2020-09-01 14:33:33 +00:00
moneromooo-moneroandSarang Noether 743608ec16 wallet: allow signing a message with spend or view key 2020-08-28 19:25:17 -04:00
moneromooo-monero e6c81c5ea7 ringct: fix CLSAG serialization after boost/epee changes
also fix a an assert message refering t MLSAG
2020-08-28 11:52:54 +00:00
moneromooo-monero 1dc427def9 core_tests: fix failures after v13
v13 enforces claiming the full block reward, so we need to keep
track of tx fees to add them to the coinbase
2020-08-28 00:18:39 +00:00
moneromooo-monero 4a9bd8f70f core_tests: remove hardcoded hf version 2020-08-28 00:14:04 +00:00
moneromooo-monero d20ff4f648 functional_tests: add a large (many randomx epochs) p2p reorg test 2020-08-27 15:13:04 +00:00
moneromooo-monero 6a0b3b1f8a functional_tests: add randomx tests 2020-08-27 15:13:03 +00:00
moneromooo-monero 9d42649d58 core: fix mining from a block that's not the current top 2020-08-27 15:13:00 +00:00
moneromooo-monero 82ee01699c Integrate CLSAGs into monero
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-27 12:44:04 +00:00
moneromooo-monero 8cd1d6df8f unit_tests: add ge_triple_scalarmult_base_vartime test 2020-08-27 12:44:01 +00:00
moneromooo-monero 839e1f4bab functional_tests: add p2p functional tests
Tests tx/block propagation and reorgs
2020-08-26 23:00:27 +00:00
moneromooo-monero 844fb4e940 enforce claiming maximum coinbase amount
Claiming a slightly lesser amount does not yield the size gains
that were seen pre rct, so this closes a fingerprinting vector
2020-08-21 12:36:53 +00:00
moneromooo-monero 7175dcb107 replace most boost serialization with existing monero serialization
This reduces the attack surface for data that can come from
malicious sources (exported output and key images, multisig
transactions...) since the monero serialization is already
exposed to the outside, and the boost lib we were using had
a few known crashers.

For interoperability, a new load-deprecated-formats wallet
setting is added (off by default). This allows loading boost
format data if there is no alternative. It will likely go
at some point, along with the ability to load those.

Notably, the peer lists file still uses the boost serialization
code, as the data it stores is define in epee, while the new
serialization code is in monero, and migrating it was fairly
hairy. Since this file is local and not obtained from anyone
else, the marginal risk is minimal, but it could be migrated
later if needed.

Some tests and tools also do, this will stay as is for now.
2020-08-17 16:23:58 +00:00
moneromooo-monero 55363c5941 Avoid some temporary strings when reading off the database 2020-08-17 14:02:27 +00:00
moneromooo-monero 07442a6059 Fix build with Boost 1.74
Thanks iDunk for testing
2020-08-16 16:23:26 +00:00
moneromooo-monero 85899230d1 simplewallet: allow setting tx keys when sending to a subaddress
The tx key derivation is different then
2020-08-10 21:25:51 +00:00
moneromooo-monero e916201f12 wallet2: fix setting tx keys when another is already set
insert doesn't actually insert if another element with the
same key is already in the map
2020-08-08 14:40:03 +00:00
moneromooo-monero 05ad4fa397 epee: further defending against exceptions in command handlers 2020-08-02 00:22:47 +00:00
moneromooo-monero db5d6e4602 wallet2: fix wrong name when checking RPC cost 2020-07-31 14:17:23 +00:00
moneromooo-monero 13eee1d6ab rpc: reject wrong sized txid
Reporter requested credit to be given to Decred
2020-07-30 22:52:14 +00:00
moneromooo-monero 92e6b7df2c easylogging++: fix crash with reentrant logging 2020-07-30 22:52:13 +00:00
moneromooo-monero 6dd95d5308 epee: guard against exceptions in RPC handlers 2020-07-30 22:52:12 +00:00
moneromooo-monero 90016ad744 blockchain: guard against exceptions in add_new_block/children
Reporter requested credit to be given to Decred
2020-07-30 22:52:11 +00:00
moneromooo-monero c1b03fb1a6 rpc: return empty txid get_outs rather than 00..00 when not requested
It's more obvious there's no txid, and it saves space
2020-07-25 17:01:21 +00:00
moneromooo-monero 8baa7bb238 daemon: don't print "(pruned)" for coinbase txes
Pruned coinbase txes are the same as unpruned ones, so the
prunable data is empty
2020-07-24 13:42:20 +00:00
moneromooo-monero 332d60719a tx_pool: mine stem txes in fake chain mode
This fixes the functional tests, since txes would not be mined
after being sent to the daemon (they'd be waiting for the
dandelion timeout first)
2020-07-09 14:52:13 +00:00