Commit Graph

1015 Commits

Author SHA1 Message Date
luigi1111
9f6dcbd568
Merge pull request #7308
df2f00f boosted_tcp_server: fix connection lifetime (anon)
3833624 boosted_tcp_server: add segfault demo (anon)
2021-02-15 21:53:43 -05:00
moneromooo-monero
19b228393f
New add_aux_pow RPC to support merge mining 2021-02-09 11:58:21 +00:00
Kevin Barbour
85db1734e7
Remove unused variables in monero codebase
There are quite a few variables in the code that are no longer
(or perhaps never were) in use. These were discovered by enabling
compiler warnings for unused variables and cleaning them up.

In most cases where the unused variables were the result
of a function call the call was left but the variable
assignment removed, unless it was obvious that it was
a simple getter with no side effects.
2021-02-09 08:05:05 +01:00
mj-xmr
dc48de74e8 Reduce compilation time of epee/portable_storage.h 2021-02-06 08:18:42 +01:00
Lee Clagett
bd129849f0 Remove copies from foreach loops (thanks to Clang) 2021-01-28 23:42:40 -05:00
xiphon
a60d3d8ff7 unit_tests: fix wipeable_string parse_hexstr test with latest gtest
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973196
2021-01-27 13:04:08 +00:00
Lee Clagett
08e4497c6e Improve cryptonote (block and tx) binary read performance 2021-01-23 06:23:39 +00:00
anon
3833624ab1 boosted_tcp_server: add segfault demo 2021-01-19 18:15:30 +01:00
Lee Clagett
679d05567d Remove payload copy in all outgoing p2p messages 2021-01-19 02:22:32 +00:00
Crypto City
4956a6aa5e Merge remote-tracking branch 'origin/master' into cc 2021-01-18 01:33:53 +00:00
Lee Clagett
23aae5571b Remove payload copy in all outgoing p2p messages 2021-01-16 22:53:28 +00:00
Alexander Blair
747699541e
Merge pull request #7285
927141bcc Command max_bytes moved from dynamic map to static switch (Lee Clagett)
2021-01-07 17:54:02 -08:00
Lee Clagett
927141bcc4 Command max_bytes moved from dynamic map to static switch 2020-12-22 20:54:16 +00:00
moneromooo-monero
b652d598d1
add a max levin packet size by command type 2021-01-03 14:07:45 +00:00
Alexander Blair
16c780d568
Merge pull request #7250
61b6e4cc6 Add aggressive restrictions to pre-handshake p2p buffer limit (Lee Clagett)
2021-01-01 22:35:59 -08:00
moneromooo-monero
0aa541b361
protocol: more sanity checks in new chain block hashes 2020-12-31 23:33:18 +00:00
moneromooo-monero
bcdc6c62b7
protocol: fix false positives dropping peers
it'd trigger on reorgs
2020-12-27 14:41:19 +00:00
luigi1111
025db3d2b4
Revert "Reject existing claimed blocks in sync mode" 2020-12-27 00:18:05 -05:00
Alexander Blair
609dbe6b92
Merge pull request #7154
cf7e1571d protocol: reject claimed block hashes that already are in the chain (moneromooo-monero)
af0a25544 protocol: drop peers we can't download anything from in sync mode (moneromooo-monero)
2020-12-26 13:40:36 -08:00
Lee Clagett
187b4d7521 Restrict duplicate keys in epee binary format 2020-12-20 03:47:32 +00:00
moneromooo-monero
cf7e1571d3
protocol: reject claimed block hashes that already are in the chain 2020-12-17 02:54:02 +00:00
Lee Clagett
61b6e4cc67 Add aggressive restrictions to pre-handshake p2p buffer limit 2020-12-17 00:36:10 +00:00
Lee Clagett
4978f69d7a Fix byte_stream::put_n 2020-12-14 14:45:24 -05:00
Alexander Blair
28e5e42986
Merge pull request #7110
d660f22ed protocol: drop origin IP if a block fails to verify in sync mode (moneromooo-monero)
2020-12-10 17:41:59 -08:00
Alexander Blair
1e9483a2d5
Merge pull request #7009
7414e2bac Change epee binary output from std::stringstream to byte_stream (Lee Clagett)
2020-12-10 17:34:50 -08:00
Alexander Blair
6bddd54f9d
Merge pull request #7003
08eb0949f Change to more efficient allocation strategy in byte_stream (Lee Clagett)
2020-12-10 17:33:50 -08: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
Crypto City
f62f0b0c6c cc: remove military bonus for production buildings 2020-12-07 11:53:00 +00:00
Crypto City
f13cbdfd16 cc: decrease military influence and penalty 2020-12-03 18:56:38 +00:00
Crypto City
e4d77f0996 fix tests after building size balance changes 2020-11-30 16:45:16 +00:00
Crypto City
4810da6cd1 add a few more city specializations 2020-11-30 16:45:16 +00:00
Crypto City
0446bde62c allow mayors to select who gets styling on runestone messages 2020-11-30 16:45:16 +00:00
Crypto City
c50b571fa9 allow the game account to enable/disable scripts 2020-11-29 23:38:03 +00:00
Crypto City
171858da4c cc: balance changes 2020-11-29 23:38:02 +00:00
luigi1111
36d31ba0be
Merge pull request #7018
a9cd5d9 cryptonote_core: dandelion - use local height or median height if syncing (xiphon)
2020-11-29 01:58:13 -06:00
luigi1111
c041550ffa
Merge pull request #6973
be84f67 Switch to Dandelion++ fluff mode if no out connections for stem mode (Lee Clagett)
2020-11-29 01:54:43 -06:00
luigi1111
7a0334742a
Merge pull request #6937
8a282f6 Add RELINK_TARGETS, monero_add_target_no_relink and use monero_add_executable/monero_add_library where possible (mj-xmr) Add monero_add_minimal_executable and use in tests (mj-xmr)
2020-11-29 01:49:39 -06:00
luigi1111
450f1325ab
Merge pull request #6856
db70af1 Unit Tests: Remove block reward upper bound size checks (TheCharlatan)
2020-11-28 22:35:07 -06:00
Crypto City
1d4273c31e add prestige ranking and bonus from subsidy
also fix a couple bugs in coin collection scoring
2020-11-26 19:48:41 +00:00
xiphon
a9cd5d914e cryptonote_core: dandelion - use local height or median height if syncing 2020-11-25 01:27:42 +00:00
Crypto City
cf6a626937 auction creation and bidding, auction flags on mortgage default 2020-11-22 23:25:50 +00:00
Crypto City
0898e11996 use CC_NO_EXTERNAL_DEPS on all urho3d/boost dependencies 2020-11-22 23:25:49 +00:00
Crypto City
7ef0b0a422 fix off by one between command dry run and block verification 2020-11-22 23:25:49 +00:00
Crypto City
04f467def6 runestones
Currently only a player written message
2020-11-22 15:27:07 +00:00
Howard Chu
91fd634768
Better log message for unusable anon networks 2020-11-16 12:36:37 +00:00
Crypto City
fb04ef804c temperature now drops with altitude 2020-11-10 18:17:43 +00:00
Lee Clagett
be84f678b9 Switch to Dandelion++ fluff mode if no out connections for stem mode 2020-11-03 13:58:14 -05:00
Crypto City
98d4ae7c2b land cost now costs more near the city center and far away
also fix overflows in land/tax cost
2020-11-01 17:34:31 +00:00
mj-xmr
8a282f64c9 Add RELINK_TARGETS, monero_add_target_no_relink and use monero_add_executable/monero_add_library where possible (mj-xmr)
Add monero_add_minimal_executable and use in tests

This is done in order not to have to relink targets, when just an .so changed, but not its interface.
2020-10-28 20:08:26 +01:00
Crypto City
08433773e1 cc: make bonuses/penalties size dependent on role 2020-10-26 13:09:35 +00:00
Crypto City
e40212a683 cc: make marble easier to get 2020-10-26 13:09:35 +00:00
Crypto City
f2808a6a39 more tile size optimization
Tiles are now stored as a single packed byte stream,
including in the game, and unpacked/repacked as necessary
2020-10-25 18:47:26 +00:00
Crypto City
34a4d2b618 fixes after monero merge 2020-10-19 12:17:51 +00:00
Crypto City
43b8112c1e Merge branch 'master' into cc 2020-10-18 00:33:51 +00:00
Crypto City
29fa6c7222 wood can now be chopped into firewood 2020-10-17 23:30:30 +00:00
Crypto City
7b51ad56bc WIP - mortgages 2020-10-17 23:29:26 +00:00
Crypto City
f7bd04fc12 remove custom item amount field, it is now redundant
since we track supply for all items
2020-10-17 23:29:26 +00:00
Crypto City
9586a32958 WIP - mortgages 2020-10-17 23:29:26 +00:00
Crypto City
b033e75db0 add more user data space to custom items 2020-10-17 23:28:43 +00:00
Crypto City
5710bb74dd WIP - scripts 2020-10-17 23:28:43 +00:00
Lee Clagett
08eb0949f3 Change to more efficient allocation strategy in byte_stream 2020-10-13 15:10:54 +00:00
Lee Clagett
249eae5f4a Allow byte_stream->byte_slice conversion to shrink unused buffer space 2020-10-13 15:09:18 +00:00
xiphon
a12a8174e0 Dandelion++: skip desynced peers in stem phase 2020-10-12 13:44:06 +00:00
Lee Clagett
7414e2bac1 Change epee binary output from std::stringstream to byte_stream 2020-10-10 15:28:40 +00:00
TheCharlatan
db70af1bbc
Unit Tests: Remove block reward upper bound size checks
Tests running after being compiled with `make debug-test` failed with
```
[  FAILED  ] block_reward_and_current_block_weight.fails_on_huge_median_size
[  FAILED  ] block_reward_and_current_block_weight.fails_on_huge_block_weight
```

With the introduction of the patch in
be82c40703 (diff-1a57d4e6013984c420da98d1adde0eafL113)
the assertions checking the weight of the median and current block
against a size limit were removed. Since the limit is now enforced by a
long divisor and a uint64_t type, checking in a separate test makes
little sense, so they are removed here.
2020-10-03 02:32:17 +02:00
Crypto City
81ac18db00 rewrite city cost function 2020-09-28 21:09:07 +00:00
Crypto City
31e74fba63 tests: fix a few tests after recent changes 2020-09-28 21:09:07 +00:00
Crypto City
029375c6dc unit_tests: fix influence tests from military after related changes 2020-09-24 19:29:55 +00:00
Crypto City
b7c431c15e remove cost from buy_land command 2020-09-24 19:29:55 +00:00
Crypto City
967ec1957a unit_tests: add another better test for harvest overflow 2020-09-17 02:30:44 +00:00
Crypto City
d8a3c29b67 cc: increase heating requirements a fair bit 2020-09-17 02:30:44 +00:00
Crypto City
a389011f3c add new plant breeding discoveries 2020-09-17 02:30:44 +00:00
Crypto City
fdd27879f1 add merge mining with monero 2020-09-17 02:30:43 +00:00
moneromooo-monero
f11531d046 add_aux_pow now adds aux hashes at fixed slots in the aux merkle tree
To protect against mining multiple blocks of a chain with only one PoW
2020-09-16 22:55:06 +00:00
moneromooo-monero
8cf2bb107e New add_aux_pow RPC to support merge mining 2020-09-13 22:16:07 +00:00
luigi1111
ee0b02d0db
Merge pull request #6757
6a37da8 threadpool: guard against exceptions in jobs, and armour plating (moneromooo-monero)
2020-09-03 12:25:59 -05:00
Crypto City
9c61486243 unit_tests: fix failure due to reading uninitialized city data 2020-09-02 23:07:03 +00:00
Crypto City
b648ed500a new resilient soil city specialization, fix nutrients recovery, add tests 2020-09-02 23:07:03 +00:00
Crypto City
c29d308510 cc: protect against integer overflow in intermediate calculations 2020-09-02 23:07:03 +00:00
Crypto City
3714a4e5b0 fix unbound unit tests link error 2020-09-02 23:07:03 +00:00
Crypto City
7a1ba041e8 tests: fix tests failures now that blockchain init queries cities 2020-09-02 23:07:03 +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
Crypto City
40d58c0c9d add dependencies where appropriate to make -jN work 2020-08-29 12:17:11 +00:00
Alexander Blair
44cd8a13ec
Merge pull request #6769
b641e0a2c Add clear method to byte_stream (Lee Clagett)
2020-08-27 12:05:16 -07:00
Sarang Noether
641b08c920 CLSAG optimizations 2020-08-27 12:44:04 +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
Alexander Blair
bad5d8d6f0
Merge pull request #6690
7175dcb10 replace most boost serialization with existing monero serialization (moneromooo-monero)
2020-08-27 02:54:30 -07:00
Crypto City
3335f8d14f create collectible coins for player count and city levels 2020-08-25 15:27:16 +00:00
Crypto City
61844a1f62 start the year a bit earlier so that we can farm right away 2020-08-25 13:20:15 +00:00
Crypto City
bb9bd2ce50 store command nonce in game events log
and store a nonce in all commands (except none) now
2020-08-25 13:20:14 +00:00
Crypto City
c688079acb commands can now be cancelled
if they're not mined yet, or only partially matched trades
2020-08-25 13:20:14 +00:00
Crypto City
61aa85ad3b add collectible coins 2020-08-21 18:33:02 +00:00
Lee Clagett
b641e0a2c0 Add clear method to byte_stream 2020-08-17 21:30:34 -04:00
luigi1111
765db1ae7a
Revert "Use domain-separated ChaCha20 for in-memory key encryption"
This reverts commit 921dd8dde5.
2020-08-17 14:08:59 -05: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
Alexander Blair
10ad0d7eb2
Merge pull request #6718
85efc88c1 Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with unit test (koe)
2020-08-16 12:53:50 -07:00
Alexander Blair
01b512f3a9
Merge pull request #6716
76c16822d wallet2_api: implement runtime proxy configuration (xiphon)
2020-08-16 12:52:21 -07:00
Alexander Blair
a08df6eb1b
Merge pull request #6603
4e2377995 Change ZMQ-JSON txextra to hex and remove unnecessary base fields (Lee Clagett)
2020-08-16 12:43:38 -07:00
Alexander Blair
009ca6fcd3
Merge pull request #6601
98c151ecb Optimize ZMQ-JSON vector reading; GetBlocksFast reads 24%+ faster (Lee Clagett)
60627c9f2 Switch to insitu parsing for ZMQ-JSON; GetBlocksFast reads 13%+ faster (Lee Clagett)
fe96e66eb Fix pruned tx for ZMQ's GetBlocksFast (Lee Clagett)
2020-08-16 12:43:11 -07:00
Alexander Blair
6d29ee6c52
Merge pull request #6493
921dd8dde Use domain-separated ChaCha20 for in-memory key encryption (Sarang Noether)
2020-08-16 12:39:59 -07:00
Alexander Blair
13549d590e
Merge pull request #6329
6bfcd3101 Updates InProofV1, OutProofV1, and ReserveProofV1 to new V2 variants that include all public proof parameters in Schnorr challenges, along with hash function domain separators. Includes new randomized unit tests. (Sarang Noether)
2020-08-16 12:37:43 -07:00
Crypto City
be0b26ef25 add item groups 2020-08-15 15:12:35 +00:00
Lee Clagett
4e2377995d Change ZMQ-JSON txextra to hex and remove unnecessary base fields 2020-08-14 23:01:00 +00:00
Lee Clagett
fe96e66ebe Fix pruned tx for ZMQ's GetBlocksFast 2020-08-14 19:46:33 +00:00
Sarang Noether
921dd8dde5 Use domain-separated ChaCha20 for in-memory key encryption 2020-08-09 19:11:54 -04:00
Sarang Noether
6bfcd31015 Updates InProofV1, OutProofV1, and ReserveProofV1 to new V2 variants that include all public proof parameters in Schnorr challenges, along with hash function domain separators. Includes new randomized unit tests. 2020-08-09 18:42:15 -04:00
Alexander Blair
c108c5e2f0
Merge pull request #6354
67ade8005 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 (Lee Clagett)
2020-08-09 06:42:49 -07:00
Crypto City
0f364a96d7 cc: prevent building too close to the edges of the world 2020-08-05 14:09:06 +00:00
Crypto City
fb5dd77afa Farming 2020-08-05 14:09:06 +00:00
Crypto City
2a1c79920d speedup terrain generation 2020-08-01 17:05:19 +00:00
Crypto City
031d32d08e cc: make cities grow in cost more slowly 2020-07-26 10:31:37 +00:00
Crypto City
34856d0808 keep track of the item supply 2020-07-25 22:43:58 +00:00
Crypto City
b268c5b8c7 add elevation bonus 2020-07-25 22:43:58 +00:00
Crypto City
c598cfec0a remove building within range of resource generators constraint 2020-07-25 22:43:58 +00:00
Crypto City
664d56f520 Height map 2020-07-25 22:43:53 +00:00
Crypto City
6918004419 cc: fix temperature to heating function 2020-07-24 15:36:50 +00:00
Crypto City
ac171bf477 cc: rewrite potential system and add more potentials 2020-07-24 15:36:50 +00:00
koe
85efc88c1e Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with unit test 2020-07-23 03:36:05 -05:00
xiphon
76c16822d0 wallet2_api: implement runtime proxy configuration 2020-07-20 13:45:12 +00:00
Alexander Blair
3ba6c7fd30
Merge pull request #6516
8656a8c9f remove double includes (sumogr)
2020-07-19 03:34:28 -07:00
Alexander Blair
a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
luigi1111
35e2520115
Merge pull request #6559
15538f7 ByteSlice: Fix persisting ptr to std::moved SSO buffer (Doy-lee)
2020-07-08 17:07:50 -05:00
Crypto City
8c249305f7 unit_tests: don't link to urho3d 2020-06-24 01:06:54 +00:00
Crypto City
23c813cf45 add city specializations 2020-06-14 23:43:30 +00:00
Crypto City
396157b032 Merge remote-tracking branch 'origin/master' into cc 2020-05-30 18:55:11 +00:00
Crypto City
3af586f748 unit_tests: fix missing roles in influence test 2020-05-29 23:20:51 +00:00
Crypto City
c22e54b850 unlock_time is now valid only for coinbase txes 2020-05-29 23:20:50 +00:00
Crypto City
828bb1ba41 allow destroying a flag 2020-05-29 23:20:50 +00:00
Crypto City
0cc8c0c675 game balance updates after all the recent changes 2020-05-29 23:20:50 +00:00
Crypto City
d2949eb3ff Change the address prefix from CC to TF 2020-05-29 23:20:49 +00:00
Crypto City
2f77fc4051 invitations 2020-05-29 23:20:49 +00:00
Crypto City
98ad361d8a firefighting 2020-05-29 23:20:45 +00:00
Crypto City
6a18101b1a add invitation system 2020-05-26 16:22:42 +00:00
Crypto City
b333b92415 move cc_badge.h away from blockchain_db.h 2020-05-26 16:22:42 +00:00
Doyle
15538f7e3f ByteSlice: Fix persisting ptr to std::moved SSO buffer
The Bug:
1. Construct `byte_slice.portion_` with `epee::span(buffer)` which copies a pointer to the SSO buffer to `byte_slice.portion_`
2. It constructs `byte_slice.storage_` with `std::move(buffer)` (normally this swap pointers, but SSO means a memcpy and clear on the original SSO buffer)
3. `slice.data()` returns a pointer from `slice.portion_` that points to the original SSO cleared buffer, `slice.storage_` has the actual string.
2020-05-20 10:13:58 +10:00
Lee Clagett
67ade80055 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 2020-05-15 07:57:35 +00:00
Lee Clagett
29e563bb1e Fixed bugs for take_slice and byte_stream->byte_slice 2020-05-12 01:26:37 -04:00
sumogr
8656a8c9ff remove double includes 2020-05-11 13:53:17 +00:00
SomaticFanatic
5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
Lee Clagett
e5214a2ca2 Adding ZMQ/Pub support for txpool_add and chain_main events 2020-05-04 02:06:35 +00:00
Crypto City
06472348cf WIP - palettes 2020-04-28 15:43:03 +00:00
Crypto City
4863f4684e unit_tests: fix building settings unit test 2020-04-23 13:16:35 +00:00
Crypto City
6ad068d938 make city levels somewhat easier to achieve 2020-04-22 15:14:48 +00:00
Crypto City
3a0571d578 give some slight share/production edge with building age
This should make it somewhat more appealing to build an existing building
rather then buy your own land and build a new building on it, given there
is no land scarcity.
2020-04-21 17:41:07 +00:00
luigi1111
06c81b6527
Merge pull request #6359
f9441c5 Fixed string_ref usage bug in epee::from_hex::vector (vtnerd)
2020-04-21 08:38:21 -05:00
Crypto City
326f4bc3f2 allow repairing many flags in one command 2020-04-15 17:51:31 +00:00
Crypto City
3b87070a5d add hunt system 2020-04-13 17:23:54 +00:00
Crypto City
c7c3944fb0 unit_tests: fix badge score unit tests 2020-04-11 19:11:47 +00:00
Crypto City
bf738e7524 cc: extend the db to store all game events, not just game update ones 2020-04-11 19:02:00 +00:00