Commit Graph

787 Commits

Author SHA1 Message Date
Crypto City
86a1517139 Discoveries and research 2019-12-25 20:36:51 +00:00
Crypto City
513b4564b8 tests: fix after recent changes 2019-12-21 17:57:20 +00:00
Crypto City
51d6704a08 cc: connection_squares now also returns direction
of the first building compared to the second building
2019-12-21 17:56:58 +00:00
Crypto City
b9146035de cc: add adjecent squares calc
I'm sure it'll come handy soon
2019-12-21 17:56:58 +00:00
Crypto City
2cc1144b19 cc: slowly increase land tax with distance from the town center 2019-12-17 13:56:16 +00:00
Crypto City
7eeaa75acd cc: disable BUILD_RATIO_ACTIVE_THRESHOLD_PERCENT
It seemed like a good idea to push people to build, but it
might instead push people to build anything quick even if
they don't have a nice idea yet
2019-12-17 13:56:15 +00:00
Crypto City
2fa0400d72 Fixups after monero rebase, and fix tests after other recent changes 2019-12-14 16:40:46 +00:00
Crypto City
87b2d3e165 we can now build below existing blocks 2019-12-13 01:33:06 +00:00
Crypto City
5cc149c89f tests: fix tests after recent emission changes 2019-12-13 01:33:06 +00:00
Crypto City
20d7fdb5a3 unit_tests: fix tests after recent emission changes 2019-12-13 01:33:06 +00:00
Crypto City
11cf7f532b new demolish command
Recovers 20% of the flag budget, and the flag may now be reused
for another building role
2019-12-13 01:33:06 +00:00
Crypto City
349ddcb8b2 change emission parameters
1 minute target
raise tail emission
decrease the number of decimals to 8
4 game updates per day
2019-12-13 01:32:49 +00:00
Crypto City
b185d9127a cc: some more tweaking 2019-12-13 01:32:49 +00:00
Crypto City
d54f907d43 add game subsidy 2019-12-13 01:32:49 +00:00
Crypto City
2041f2e4f0 rework production/requirements some
Will need more
2019-12-13 01:31:56 +00:00
moneromooo-monero
618338363a protocol: request txpool contents when synced
A newly synced Alice sends a (typically quite small) list of
txids in the local tpxool to a random peer Bob, who then uses
the existing tx relay system to send Alice any tx in his txpool
which is not in the list Alice sent
2019-12-13 01:31:56 +00:00
Crypto City
80d2269217 player names are now unique and format restricted 2019-12-13 01:31:25 +00:00
Crypto City
9770001686 Cities can now have a name 2019-12-13 01:31:25 +00:00
Crypto City
d7063d99d8 flags (with a building) can now be named and renamed 2019-12-13 01:31:25 +00:00
Crypto City
761d212b53 cc: save events to the db
This makes them retrievable from a snapshot, after a restart,
and after a reorg that crosses a game update
2019-12-13 01:31:25 +00:00
Crypto City
b89e696a80 flag 0 is now invalid
makes it possible to have a "no flag applies" semantic
2019-12-13 01:31:25 +00:00
Crypto City
8f613351ec daemon: print cc command type in print_pool_sh 2019-12-13 01:31:25 +00:00
Crypto City
3e41959825 players can now select a name when creating an account 2019-12-13 01:31:25 +00:00
Crypto City
be0ebbe148 fix fresh clone build 2019-12-13 01:31:04 +00:00
Crypto City
6b7bb1493b cc: repair command now takes a delta repair
rather than a from/to pair, which avoids it getting invalid if
a game update occurs before it gets mined
2019-12-13 01:31:04 +00:00
Crypto City
c9616f7f83 better error reporting when submitting invalid commands 2019-12-13 01:31:04 +00:00
Crypto City
6d1c0dfcf8 unit_tests: test get_cc_influence does not overflow 2019-12-13 01:30:29 +00:00
Crypto City
b2ce755525 cc: fix get_distance, and add unit tests 2019-12-13 01:30:28 +00:00
Crypto City
c42899adc9 unit_tests: fix missing parameter in flag_t ctor 2019-12-13 01:30:28 +00:00
Crypto City
075119b46b unit_tests: fix overread in influence calculation 2019-12-13 01:28:54 +00:00
Crypto City
c9c91ccb08 cc: add staff (extra payments per building count)
to incentivize richer people towards larger buildings rather
than many small ones
2019-12-13 01:28:54 +00:00
Crypto City
341ed8ed53 rejig repair a bit
Repair is now 0 before anything is built, and goes to 100% when
building. This makes it easier when building anew after a building
got destroyed due to decay
2019-12-13 01:28:54 +00:00
Crypto City
836b362159 fix reverting buy_land after trading flags 2019-12-13 01:28:21 +00:00
Crypto City
210882c66f remove tile data and set repair to 0 for derelict buildings 2019-12-13 01:26:54 +00:00
Crypto City
475ff2dcdb unit_tests: fix cc unit tests build 2019-12-13 01:26:54 +00:00
Crypto City
84106cbcbe allow 50-1000 economic level (in steps of 50) 2019-12-13 01:21:44 +00:00
Crypto City
7c2f33c660 game: display "buildable" zone around generators 2019-12-13 01:21:44 +00:00
Crypto City
e484e3eda8 unit_tests: fix tests 2019-12-13 01:21:44 +00:00
Crypto City
d9176ad644 add repair command and UI 2019-12-13 01:21:44 +00:00
Crypto City
e6b2da4bb9 generators basics 2019-12-13 01:21:44 +00:00
Crypto City
3fb509b796 more work in influence 2019-12-13 01:21:44 +00:00
Crypto City
455c859823 new command to assign items to a flag 2019-12-13 01:21:44 +00:00
Crypto City
445d59c650 city support in game update command 2019-12-13 01:21:04 +00:00
Crypto City
7b26b94e56 make shares 64 bit 2019-12-13 01:21:04 +00:00
Crypto City
346f3e9791 game update 2019-12-13 01:21:04 +00:00
Crypto City
96bbe1857c keep land if a building decays to 0 2019-12-13 01:20:38 +00:00
Crypto City
6e8c42868d more work on influence 2019-12-13 01:20:38 +00:00
Crypto City
13f61e7e16 some work on potential 2019-12-13 01:20:38 +00:00
Crypto City
1795477cdd replace monetary cost by labour cost in building 2019-12-13 01:20:37 +00:00
Crypto City
9b9aed1c56 make blocks and labour items 2019-12-13 01:20:37 +00:00
Crypto City
29a7b2f954 more work on building settings 2019-12-13 01:20:37 +00:00
Crypto City
fb318fbf16 building settings 2019-12-13 01:20:37 +00:00
Crypto City
2bdb7be38c add role flag field 2019-12-13 01:20:37 +00:00
Crypto City
4e1b8e14b9 add cc influence building blocks 2019-12-13 01:20:37 +00:00
Crypto City
70179de428 potential maps 2019-12-13 01:20:37 +00:00
Crypto City
8a9b3f0e66 more work on game update 2019-12-13 01:20:37 +00:00
Crypto City
2dbab85c58 quadtree: move to cc, and use std::shared_ptr instead of Urho3D's 2019-12-13 01:20:37 +00:00
Crypto City
3b318b5bf4 more work on trade command 2019-12-13 01:20:37 +00:00
Crypto City
1248fc2dc7 more work on trade command 2019-12-13 01:20:37 +00:00
Crypto City
33c36e8d8b fix up tests after recent changes 2019-12-13 01:18:57 +00:00
Crypto City
257c6279fc make create_account not a cc_command_base_t subclass 2019-12-13 01:18:57 +00:00
Crypto City
b791566140 trade command, and command overhaul it required 2019-12-13 01:18:19 +00:00
Crypto City
b188f4636d more work on game update command 2019-12-13 01:14:17 +00:00
Crypto City
634e477278 "game" command, for consensus driven changes 2019-12-13 01:12:39 +00:00
Crypto City
98533616d3 add a repair field to flag 2019-12-13 01:12:39 +00:00
Crypto City
9dbb2c2f02 save support for magica models 2019-12-13 01:12:39 +00:00
Crypto City
5d74ba6159 don't accept "short" build commands
It'll increase tx size a bit, but is safer
2019-12-13 01:12:39 +00:00
Crypto City
26b36eb282 union/difference selection 2019-12-13 01:12:39 +00:00
Crypto City
fe57281088 fix unit tests 2019-12-13 01:12:39 +00:00
Crypto City
822d3796a1 buying blocks in game 2019-12-13 01:12:39 +00:00
Crypto City
5e9c11a642 quadtree fixes and unit tests 2019-12-13 01:10:16 +00:00
Crypto City
2369d280dd buy_blocks command 2019-12-13 01:10:16 +00:00
Crypto City
392e0fc84b some more build tests, and adjust build cost curve 2019-12-13 01:10:16 +00:00
Crypto City
917dcd5485 build command 2019-12-13 01:10:16 +00:00
Crypto City
20a2108f94 fix buy land unit test 2019-12-13 01:09:15 +00:00
Crypto City
7b6648b77c buy_land core tests 2019-12-13 01:09:15 +00:00
Crypto City
647734e59b remove address book payment_id left after rebase 2019-12-13 01:08:07 +00:00
Crypto City
24f9900670 cleaner code to handle command specific code
also add the start of a cc consensus rules class
2019-12-13 01:08:07 +00:00
Crypto City
b8df9f7adb even more unit tests 2019-12-13 01:07:45 +00:00
Crypto City
9ba3a6e427 more unit tests 2019-12-13 01:07:45 +00:00
Crypto City
aaf0f5098a remove now obsolete view public key, abortive subaddress support, etc 2019-12-13 01:07:45 +00:00
Crypto City
0a36d2a12b unit tests 2019-12-13 01:07:03 +00:00
Crypto City
a57e103b31 rework cc_command 2019-12-13 01:07:03 +00:00
Crypto City
dc153a504e bare txes 2019-12-13 01:05:08 +00:00
Crypto City
2f135eedbd basic account system and tests 2019-12-13 01:01:05 +00:00
Crypto City
b17da7dd40 transactions can now involved cc accounts (wip) 2019-12-13 01:00:34 +00:00
Crypto City
b9ea0d835c foo! 2019-12-13 00:55:07 +00:00
luigi1111
dad4cf121e
Merge pull request #6018
dce6f05 rpc: Only show version string if it matches expected pattern (ndorf)
3293780 daemon: Use rpc for 'version' command (ndorf)
2019-12-12 13:36:05 -06:00
moneromooo-monero
02b8051339
unit_tests: remove invalid bulletproofs unit test
It was intended to check a case which is actually valid (0 gamma),
but was actually duplicating the bad amount test.

Reported by WhatDo_ on IRC.
2019-12-01 15:40:59 +00:00
Lee Clagett
68a6507c3f Fixed bug in ZMQ JSON-RPC method field 2019-11-18 12:59:41 +00:00
Nathan Dorfman
dce6f055f9 rpc: Only show version string if it matches expected pattern 2019-11-12 18:19:24 -07:00
Lee Clagett
70c9cd3c9c Change to Tx diffusion (Dandelion++ fluff) instead of flooding 2019-11-04 09:23:20 +00:00
Lee Clagett
a9bdc6e4c4 Improved performance for epee serialization:
- Removed copy of field names in binary deserialization
  - Removed copy of array values in binary deserialization
  - Removed copy of string values in json deserialization
  - Removed unhelpful allocation in json string value parsing
  - Removed copy of blob data on binary and json serialization
2019-11-04 01:46:41 +00:00
Lee Clagett
5d7ae2d279 Adding support for hidden (anonymity) txpool 2019-11-02 20:36:03 +00:00
moneromooo-monero
1554a7768b
unit_tests: fix use after free 2019-10-30 18:40:20 +00:00
luigi1111
bb2bcf3521
Merge pull request #5972
9447e72 cryptonote: add function to get weight from a pruned tx (moneromooo-monero)
2019-10-22 10:52:14 -05:00
luigi1111
84ce43a239
Merge pull request #5966
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-22 10:08:32 -05:00
moneromooo-monero
be82c40703
Support median block size > 4 GB
add a 128/64 division routine so we can use a > 32 bit median block
size in calculations
2019-10-21 10:41:07 +00:00
moneromooo-monero
c65a221549
unit_tests: fix build after rename 2019-10-15 13:15:19 +00:00
xiphon
d4d2b5c79a p2p+rpc: don't skip p2p or rpc port bind failure by default 2019-10-13 13:27:46 +00:00
moneromooo-monero
9447e7276d
cryptonote: add function to get weight from a pruned tx
The weight of the prunable data is deterministic from the
unpruned data, so it can be determined from a pruned tx
2019-10-11 12:08:36 +00:00
moneromooo-monero
77afe91db6
unit_tests: fix build with boost 1.69 2019-10-11 01:16:03 +00:00
luigi1111
bf525793c7
Merge pull request #5915
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-08 15:55:03 -05:00
luigi1111
0e4ab6091c
Merge pull request #5960
ae34e1b unit_tests: fix ringdb unit tests (moneromooo-monero)
2019-10-08 14:49:57 -05:00
luigi1111
342e7f844f
Merge pull request #5921
2a7d915 Fixed i2p/tor tx flooding bug (white noise disabled) (vtnerd)
2019-10-08 14:31:53 -05:00
moneromooo-monero
ae34e1ba1c
unit_tests: fix ringdb unit tests 2019-10-04 21:11:46 +00:00
luigi1111
40501cc131
Merge pull request #5895
fdc00d0 unit tests: replace global var with lambda returning static local var (stoffu)
2019-09-30 18:46:34 -05:00
moneromooo-monero
8330e772f1
monerod can now sync from pruned blocks
If the peer (whether pruned or not itself) supports sending pruned blocks
to syncing nodes, the pruned version will be sent along with the hash
of the pruned data and the block weight. The original tx hashes can be
reconstructed from the pruned txes and theur prunable data hash. Those
hashes and the block weights are hashes and checked against the set of
precompiled hashes, ensuring the data we received is the original data.
It is currently not possible to use this system when not using the set
of precompiled hashes, since block weights can not otherwise be checked
for validity.

This is off by default for now, and is enabled by --sync-pruned-blocks
2019-09-27 00:10:37 +00:00
luigi1111
3f6096867d
Merge pull request #5916
7b076d5 p2p: fix bans taking port into account (moneromooo-monero)
2019-09-24 10:42:29 -05:00
luigi1111
06bee964a8
Merge pull request #5878
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
2019-09-24 10:10:28 -05:00
luigi1111
ee6e849627
Merge pull request #5877
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami)
4ad191f Removed unused boost/value_init header (whyamiroot)
928f4be Make null hash constants constexpr (whyamiroot)
2019-09-24 10:08:44 -05:00
moneromooo-monero
7b076d5170
p2p: fix bans taking port into account 2019-09-16 22:45:45 +00:00
moneromooo-monero
32f725d32f
Properly format multiline logs
As a side effect, colouring on Windows should now work
regardless of version
2019-09-16 16:58:01 +00:00
Jesus Ramirez
f9b3f6ef3b Removed Berkeley DB and db switching logic 2019-09-16 16:18:05 +02:00
luigi1111
d663e1e3db
Merge pull request #5818
f91a06c Dropping cppzmq dependency; adding some zmq utils (vtnerd)
2019-09-14 13:25:14 -05:00
stoffu
fdc00d0906
unit tests: replace global var with lambda returning static local var
Fixes assertion failure (curstate == 1) in random.c in debug mode
2019-09-09 11:44:06 +09:00
luigi1111
d0d76f771a
Merge pull request #5876
a5c7eeb unit_tests: fix build with CLANG 8 and boost 1.69 (moneromooo-monero)
2019-09-08 20:10:44 -05:00
luigi1111
d91393daaf
Merge pull request #5856
f56e160 unit_tests: Fix uninitialized values (liptakmatyas)
2019-09-08 20:06:04 -05:00
moneromooo-monero
0e2fda5bf0
unit_tests: fix levin unit test on big endian 2019-09-04 14:53:58 +00:00
moneromooo-monero
d046ca1db0
difficulty: fix check_hash on big endian 2019-09-04 14:53:53 +00:00
Jesus Ramirez
2cd4fd8972 Changed the use of boost:value_initialized for C++ list initializer 2019-09-02 14:16:29 +02:00
moneromooo-monero
a5c7eebaea
unit_tests: fix build with CLANG 8 and boost 1.69 2019-08-30 11:43:03 +00:00
luigi1111
98af2e954b
Merge pull request #5793
bdfc63a Add ref-counted buffer byte_slice. Currently used for sending TCP data. (vtnerd)
3b24b1d Added support for 'noise' over I1P/Tor to mask Tx transmission. (vtnerd)
2019-08-29 14:36:41 -05:00
luigi1111
85014813cf
Merge pull request #5707
3a0451a MLSAG speedup and additional checks (SarangNoether)
2019-08-28 02:22:00 -05:00
Sarang Noether
3a0451a8be MLSAG speedup and additional checks 2019-08-27 16:22:44 -04:00
Matyas Liptak
f56e160217
unit_tests: Fix uninitialized values
-   Initialize the `hash` in the `get_block_hash()` function of the
    `output_distribution` unit test explicitly, to silence `valgrind`
    warnings.
2019-08-27 09:17:34 +02:00
luigi1111
a8e99198bf
Merge pull request #5748
b350726 boost: update obsolete usage of endian API (moneromooo-monero)
2019-08-21 15:18:38 -05:00
luigi1111
f205d28e96
Merge pull request #5727
7b9a420 Replace std::random_shuffle with std::shuffle (tomsmeding)
2019-08-19 17:31:39 -05:00
luigi1111
2da11baecc
Merge pull request #5718
c8709fe wallet: do not print log settings when unset (moneromooo-monero)
7b18e83 unit_tests: check return values on test data parsing (moneromooo-monero)
2019-08-19 17:17:11 -05:00
moneromooo-monero
eeca5ca0c8
epee: support unicode in parsed strings 2019-08-16 17:06:03 +00:00
luigi1111
86ee631212
Merge pull request #5652
f81cb4f unit_tests: add more leeway to the 'same distribution' check (moneromooo-monero)
2019-08-15 17:13:18 -05:00
Tom Smeding
7b9a420787 Replace std::random_shuffle with std::shuffle
According to [1], std::random_shuffle is deprecated in C++14 and removed
in C++17. Since std::shuffle is available since C++11 as a replacement
and monero already requires C++11, this is a good replacement.

A cryptographically secure random number generator is used in all cases
to prevent people from perhaps copying an insecure std::shuffle call
over to a place where a secure one would be warranted. A form of
defense-in-depth.

[1]: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
2019-08-15 16:33:15 +02:00
Lee Clagett
2a7d91523b Fixed i2p/tor tx flooding bug (white noise disabled) 2019-07-29 12:27:00 +00:00
luigi1111
7fc76451a5
Merge pull request #5529
de27651 use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
2019-07-24 14:06:11 -05:00
luigi1111
e3de4aa68b
Merge pull request #5502
25a7cfd add a few checks where it seems appropriate (moneromooo-monero)
1a66a86 remove unused code (moneromooo-monero)
2019-07-24 13:57:06 -05:00
Lee Clagett
f91a06c6d7 Dropping cppzmq dependency; adding some zmq utils 2019-07-22 06:37:16 +00:00
Lee Clagett
3b24b1d082 Added support for "noise" over I1P/Tor to mask Tx transmission. 2019-07-17 14:22:37 +00:00
Lee Clagett
bdfc63ae4d Add ref-counted buffer byte_slice. Currently used for sending TCP data. 2019-07-16 16:30:35 +00:00
moneromooo-monero
65c4004963
allow blocking whole subnets 2019-07-16 11:35:53 +00:00
moneromooo-monero
b350726a5a
boost: update obsolete usage of endian API 2019-07-09 15:07:13 +00:00
moneromooo-monero
c2238327d0
keccak: guard against misaligned memory accesses on ARM
The code generated is exactly the same as the direct access
one on x86_64
2019-07-04 22:13:16 +00:00
moneromooo-monero
7b18e838ea
unit_tests: check return values on test data parsing
Won't trigger in practice, but you never know when that code changes

Coverity 199723, 199685
2019-07-01 15:17:30 +00:00
moneromooo-monero
f81cb4f24b
unit_tests: add more leeway to the "same distribution" check
This is an inherently probabilistic check, which occasionally fails
for a matching distribution
2019-06-16 12:18:28 +00:00
moneromooo-monero
dbecfe7d5d
unit_tests: make the density test a bit less stringent
It's an inherently random test
2019-05-20 10:42:50 +00:00
moneromooo-monero
de27651f80
use crypto::rand instead of libc rand in a few tests
We don't need secure randomness here, but it should shut coverity up
2019-05-10 14:15:35 +00:00
Riccardo Spagni
f64f59627d
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
2019-05-07 17:36:27 +02:00
Riccardo Spagni
97cb1c9436
Merge pull request #5508
1c44e658 wallet2: reject standalone short payment IDs in monero: URI API (moneromooo-monero)
2019-05-07 17:35:28 +02:00
Riccardo Spagni
2d04b0e500
Merge pull request #5499
a4c4a2d8 blockchain: keep a rolling long term block weight median (moneromooo-monero)
2019-05-07 17:31:45 +02:00
Riccardo Spagni
9d91301faa
Merge pull request #5496
0eb0d6b8 rpc: improve get_output_distribution (moneromooo-monero)
2019-05-07 17:30:27 +02:00
moneromooo-monero
a4c4a2d8aa
blockchain: keep a rolling long term block weight median 2019-05-02 09:47:01 +00:00