Commit Graph

269 Commits

Author SHA1 Message Date
Lee Clagett 3b24b1d082 Added support for "noise" over I1P/Tor to mask Tx transmission. 2019-07-17 14:22:37 +00:00
Doyle 8dca820ed7
Service node checkpointing soft fork for mainnet (#719)
* Add soft forking for checkpointing on mainnet

* Clear checkpoints on softfork on mainnet

* Move softfork date until we're ready, fix test results and modulo addition

* Only round up delete_height if it's not a multiple of CHECKPOINT_INTERVAL

* Remove unused variable soft fork in service_node_rules (replaced by cryptonote_config)
2019-07-11 16:16:16 +10:00
Doyle 823627a5ad
Improve print quorum state + rpc update (#709)
* print_quorum_state displays checkpointing quorums, remove batched call

* Update the help text for quorum commands

* <= for the max_quorum_type not <

* Handle heights greater than the latest

* Don't repeatedly add partially filled quorums

* Revert get_quorum_state to take a range (common case)

* Update the help text from print_quorum_state
2019-07-09 13:02:10 +10:00
Doyle d0fb04db46
Improved print_checkpoints + json_rpc get_checkpoints call (#708)
* Improved print_checkpoints

* Flesh out print checkpoints and associated RPC call

* Remove debug print checkpoints

* Update help text for print_checkpoints

* Rewrite to fix num_checkpoints != heights as a unit of measurement

* Use GET_ALL_CHECKPOINTS defined value in get_checkpoints_range

* Let T be deduced in parse_if_present, json_rpc_request not rpc_request
2019-07-05 09:34:51 +10:00
Doyle e6b5ef558a
Service node checkpointing deregistration (#672)
* Add deregistration of checkpoints by checking how many votes are missed

Move uptime proofs and add checkpoint counts in the service_node_list
because we typically prune uptime proofs by time, but it seems we want
to switch to a model where we persist proof data until the node expires
otherwise currently we would prune uptime entries and potentially our
checkpoint vote counts which would cause premature deregistration as the
expected vote counts start mismatching with the number of received
votes.

* Revise deregistration

* Fix test breakages

* uint16_t for port, remove debug false, min votes to 2 in integration mode

* Fix integration build
2019-06-27 17:05:44 +10:00
Jason Rhinelander 94b5857a84 Merge remote-tracking branch 'LMDB/randomx' into randomx 2019-06-26 21:50:51 -03:00
Jason Rhinelander 36b06c52e7 Increase fee by 80x at Heimdall fork (#663)
* Increase fee by 80x at Heimdall fork

Loki's current fees are far too cheap, which makes a potential
deanonymization attack (whereby someone floods the network with
transactions that they later use to identify decoys) very cheap.

This commit increases the tx fee by 80x.  Transactions will still be
cheap (a typical tx will go from around 0.00052 LOKI to 0.04 LOKI, which
is around half a US cent at the time of this commit.

This also provides a better estimate for the FEE_PER_BYTE value (both
before and after the fork), which was using a wrong estimate from Monero
(which has 3 extra decimal places!)

Finally this commit removes some related constants from
cryptonode_config.h that have never applied to Loki.

* Remove Loki-impossible values from wallet code
2019-06-25 19:22:43 +10:00
Howard Chu a182df21d0
Bans for RPC connections
Make bans control RPC sessions too. And auto-ban some bad requests.
Drops HTTP connections whenever response code is 500.
2019-06-16 11:38:08 +01:00
Maxim Shishmarev e53922faa8 Require storage server running for uptime proofs (v.2) (#631)
* Require storage server running for uptime proofs (v.2)

* use atomic time_t; reset ping on startup
2019-06-07 17:03:11 +10:00
Doyle cdde63b6ce
Remove non-fluffy blockchain syncing path (#618)
Obsolete since forever, fluffy blocks is by default- it's more space
efficient when syncing the blockchain.
2019-06-04 12:28:56 +10:00
Howard Chu cfe0e9c7c5
RandomX integration
Support RandomX PoW algorithm
2019-06-01 21:40:55 +01:00
Doyle cc0d51078c Merge dev into upstream 2019-05-01 16:01:17 +10:00
moneromooo-monero df83ed74e4
consensus: from v12, enforce >= 2 outputs 2019-04-23 22:09:35 +00:00
Doyle 4778d862c9 Merge commit 'bd42903' into LokiMergeUpstream 2019-04-12 18:37:56 +10:00
Doyle 2fe5ddb2ca Merge commit 'f2f725d8db3535055d1c7e102c0bba75b22a3409' into LokiMergeUpstream 2019-04-12 15:23:01 +10:00
Doyle 892469ded1 Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
Doyle 4f0a729533 Merge commit '4466f4504e8bc41d353a6becce0526df8272bc1d' into LokiMergeUpstream 2019-04-10 09:59:38 +10:00
Doyle 47566c63df Merge commit '973403bc9f54ab0722b67a3c76ab6e7bafbfeedc' 2019-04-09 18:07:13 +10:00
moneromooo-monero 089c7637a6
cryptonote: rework block blob size sanity check
Use the actual block weight limit, assuming that weight is always
greater or equal to size
2019-04-05 09:35:19 +00:00
Doyle 18fe96a054
Fix print_sn displaying all nodes to be staking infinitely (#521)
* Fix print_sn displaying all nodes to be staking infinitely

* Use define for key image unlock height and std array

* Remove unused code
2019-03-27 20:13:22 +11:00
Riccardo Spagni acc7211b5b
Merge pull request #5199
eef164f7 cryptonote_protocol_handler: search for syncing peers in "cruise mode" (moneromooo-monero)
2019-03-19 10:58:38 +02:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
Doyle cc648f4e04 Update governance address for HF11 2019-03-05 13:32:55 +11:00
Riccardo Spagni 4466f4504e
Merge pull request #5091
123fc2a2 i2p: initial support (Jethro Grassie)
2019-03-04 21:20:34 +02:00
moneromooo-monero b8787f4302
ArticMine's new block weight algorithm
This curbs runaway growth while still allowing substantial
spikes in block weight

Original specification from ArticMine:

here is the scaling proposal
Define: LongTermBlockWeight
Before fork:
LongTermBlockWeight = BlockWeight
At or after fork:
LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight)
Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time.
Define:   LongTermEffectiveMedianBlockWeight
LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight))
Change Definition of EffectiveMedianBlockWeight
From (current definition)
EffectiveMedianBlockWeight  = max(300000, MedianOverPrevious100Blocks(BlockWeight))
To (proposed definition)
EffectiveMedianBlockWeight  = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight)
Notes:
1) There are no other changes to the existing penalty formula, median calculation, fees etc.
2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This  is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork.
3) When the  EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty.

Note: the long term block weight is stored in the database, but not in the actual block itself,
since it requires recalculating anyway for verification.
2019-03-04 09:33:58 +00:00
moneromooo-monero eef164f7cc
cryptonote_protocol_handler: search for syncing peers in "cruise mode"
When all our outgoing peer slots are filled, we cycle one peer at
a time looking for syncing peers until we have at least two such
peers. This brings two advantages:

- Peers without incoming connections will find more syncing peers
that before, thereby strengthening network decentralization

- Peers will have more resistance to isolation attacks, as they
are more likely to find a "good" peer than they were before
2019-02-26 12:45:28 +00:00
Doyle bc47ecf05b Update version naming for infinite staking 2019-02-25 18:05:20 +11:00
moneromooo-monero 6cc35100f9 ArticMine's new block weight algorithm
This curbs runaway growth while still allowing substantial
spikes in block weight

Original specification from ArticMine:

here is the scaling proposal
Define: LongTermBlockWeight
Before fork:
LongTermBlockWeight = BlockWeight
At or after fork:
LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight)
Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time.
Define:   LongTermEffectiveMedianBlockWeight
LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight))
Change Definition of EffectiveMedianBlockWeight
From (current definition)
EffectiveMedianBlockWeight  = max(300000, MedianOverPrevious100Blocks(BlockWeight))
To (proposed definition)
EffectiveMedianBlockWeight  = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight)
Notes:
1) There are no other changes to the existing penalty formula, median calculation, fees etc.
2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This  is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork.
3) When the  EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty.
2019-02-20 18:57:58 +11:00
Doyle 43436b081d
Infinite Staking Part 2 (#406)
* Cleanup and undoing some protocol breakages

* Simplify expiration of nodes

* Request unlock schedules entire node for expiration

* Fix off by one in expiring nodes

* Undo expiring code for pre v10 nodes

* Fix RPC returning register as unlock height and not checking 0

* Rename key image unlock height const

* Undo testnet hardfork debug changes

* Remove is_type for get_type, fix missing var rename

* Move serialisable data into public namespace

* Serialise tx types properly

* Fix typo in no service node known msg

* Code review

* Fix == to >= on serialising tx type

* Code review 2

* Fix tests and key image unlock

* Add command to print locked key images

* Update ui to display lock stakes, query in print cmd blacklist

* Modify print stakes to be less slow

* Remove autostaking code

* Refactor staking into sweep functions

It appears staking was derived off stake_main written separately at
implementation at the beginning. This merges them back into a common
code path, after removing autostake there's only some minor differences.

It also makes sure that any changes to sweeping upstream are going to be
considered in the staking process which we want.

* Display unlock height for stakes

* Begin creating output blacklist

* Make blacklist output a migration step

* Implement get_output_blacklist for lmdb

* In wallet output selection ignore blacklisted outputs

* Apply blacklisted outputs to output selection

* Fix broken tests, switch key image unlock

* Fix broken unit_tests

* Begin change to limit locked key images to 4 globally

* Revamp prepare registration for new min contribution rules

* Fix up old back case in prepare registration

* Remove debug code

* Cleanup debug code and some unecessary changes

* Fix migration step on mainnet db

* Fix blacklist outputs for pre-existing DB's

* Remove irrelevant note

* Tweak scanning addresses for locked stakes

Since we only now allow contributions from the primary address we can
skip checking all subaddress + lookahead to speed up wallet scanning

* Define macro for SCNu64 for Mingw

* Fix failure on empty DB

* Add missing error msg, remove contributor from stake

* Improve staking messages

* Flush prompt to always display

* Return the msg from stake failure and fix stake parsing error

* Tweak fork rules for smaller bulletproofs

* Tweak pooled nodes minimum amounts

* Fix crash on exit, there's no need to store on destructor

Since all information about service nodes is derived from the blockchain
and we store state every time we receive a block, storing in the
destructor is redundant as there is no new information to store.

* Make prompt be consistent with CLI

* Check max number of key images from per user to node

* Implement error message on get_output_blacklist failure

* Remove resolved TODO's/comments

* Handle infinite staking in print_sn

* Atoi->strtol, fix prepare_registration, virtual override, stale msgs
2019-02-14 12:12:57 +11:00
Jethro Grassie 123fc2a25a
i2p: initial support 2019-01-30 13:37:45 -05:00
doy-lee bebecbd0a6 Merge branch 'dev' into LokiMergeUpstream 2019-01-30 16:59:47 +11:00
doy-lee 6634d97e29 Merge commit '0daa00e' into LokiMergeUpstream 2019-01-30 13:05:20 +11:00
doy-lee ac4d0469bf Merge commit '4a0e4c7' into LokiMergeUpstream 2019-01-30 12:04:20 +11:00
Lee Clagett 973403bc9f Adding initial support for broadcasting transactions over Tor
- Support for ".onion" in --add-exclusive-node and --add-peer
  - Add --anonymizing-proxy for outbound Tor connections
  - Add --anonymous-inbounds for inbound Tor connections
  - Support for sharing ".onion" addresses over Tor connections
  - Support for broadcasting transactions received over RPC exclusively
    over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28 23:56:33 +00:00
Riccardo Spagni 0daa00e035
Merge pull request #5052
b6534c40 ringct: remove unused senderPk from ecdhTuple (moneromooo-monero)
7d375981 ringct: the commitment mask is now deterministic (moneromooo-monero)
99d946e6 ringct: encode 8 byte amount, saving 24 bytes per output (moneromooo-monero)
cdc3ccec ringct: save 3 bytes on bulletproof size (moneromooo-monero)
f931e16c add a bulletproof version, new bulletproof type, and rct config (moneromooo-monero)
2019-01-28 21:24:55 +02:00
Doyle 3a7b6b59eb
Infinite Staking Part 1 (#387)
* Remove dead branches in hot-path check_tx_inputs

Also renames #define for mixins to better match naming convention

* Shuffle around some more code into common branches

* Fix min/max tx version rules, since there 1 tx v2 on v9 fork

* First draft infinite staking implementation

* Actually generate the right key image and expire appropriately

* Add framework to lock key images after expiry

* Return locked key images for nodes, add request unlock option

* Introduce transaction types for key image unlock

* Update validation steps to accept tx types, key_image_unlock

* Add mapping for lockable key images to amounts

* Change inconsistent naming scheme of contributors

* Create key image unlock transaction type and process it

* Update tx params to allow v4 types and as a result construct_tx*

* Fix some serialisation issues not sending all the information

* Fix dupe tx extra tag causing incorrect deserialisation

* Add warning comments

* Fix key image unlocks parsing error

* Simplify key image proof checks

* Fix rebase errors

* Correctly calculate the key image unlock times

* Blacklist key image on deregistration

* Serialise key image blacklist

* Rollback blacklisted key images

* Fix expiry logic error

* Disallow requesting stake unlock if already unlocked client side

* Add double spend checks for key image unlocks

* Rename get_staking_requirement_lock_blocks

To staking_initial_num_lock_blocks

* Begin modifying output selection to not use locked outputs

* Modify output selection to avoid locked/blacklisted key images

* Cleanup and undoing some protocol breakages

* Simplify expiration of nodes

* Request unlock schedules entire node for expiration

* Fix off by one in expiring nodes

* Undo expiring code for pre v10 nodes

* Fix RPC returning register as unlock height and not checking 0

* Rename key image unlock height const

* Undo testnet hardfork debug changes

* Remove is_type for get_type, fix missing var rename

* Move serialisable data into public namespace

* Serialise tx types properly

* Fix typo in no service node known msg

* Code review

* Fix == to >= on serialising tx type

* Code review 2

* Fix tests and key image unlock

* Add additional test, fix assert

* Remove debug code in wallet

* Fix merge dev problem
2019-01-25 14:15:52 +11:00
moneromooo-monero f931e16c6e
add a bulletproof version, new bulletproof type, and rct config
This makes it easier to modify the bulletproof format
2019-01-22 23:17:24 +00:00
moneromooo-monero b750fb27b0
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.

No other data is currently pruned.

There are three ways to prune a blockchain:

- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility

The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.

The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.

Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2019-01-22 20:30:51 +00:00
Doyle 0b070900d2
Check TX Inputs Refactor (#385)
* Remove dead branches in hot-path check_tx_inputs

Also renames #define for mixins to better match naming convention

* Shuffle around some more code into common branches

* Fix min/max tx version rules, since there 1 tx v2 on v9 fork

* Fix update_output_map incorrectly classifying miner tx

* Remove unused vector, c style for loop in check tx inputs
2019-01-10 10:35:54 +11:00
doy-lee 5c6a7eaa85 Merge commit '84dd674' into LokiMergeUpstream 2018-11-22 14:42:14 +11:00
doy-lee 3afbc0bceb Merge branch 'dev' into LokiMergeUpstream 2018-11-12 15:25:39 +11:00
Doyle fad67eee46
Rotating Governance Schedule (#303)
* Add multiple governance keys

* Batch governance payments to every interval blocks

* Batching of gov rewards and fix breakages in tests

* Add changes to api for working with core tests

* Clean up left over debug stuff

* more cleanup

* Fix uninitialised batched governance value

* Remove dependency on blockchain in tx utils

* Remove redundant vector reserve
2018-11-12 14:02:21 +11:00
RaskaRuby 2bd46065ae Expose limit-rate defaults from command line help 2018-10-31 14:47:20 -07:00
doy-lee 997c0a9991 Merge commit '8f9c381' into LokiMergeUpstream 2018-10-31 17:26:00 +11:00
doy-lee 7375725020 Add minor whitespace/delete dead code after diffing Monero and Loki
Mostly small whitespace changes that make comparing a diff of the
entirety of Loki and Monero less noisy.
2018-10-24 11:33:48 +11:00
xiphon fd62b6e79f blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-22 01:12:00 +03:00
doy-lee 2cd73361a5 Modify per byte fee hardfork to v10 bulletproofs 2018-10-09 20:11:37 +11:00
doy-lee 1e0c4bf4f1 Fix remaining bulletproofs failing core tests 2018-10-09 19:59:21 +11:00
doy-lee c1da4f690d Merge commit '5ffb2ff' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-09 12:31:08 +11:00
Riccardo Spagni ac5674524a
Revert "Merge pull request #4472"
This reverts commit 79d46c4d55, reversing
changes made to c9fc61dbb5.
2018-10-08 21:39:54 +02:00
doy-lee 43d75894f2 Merge commit '869b3bf' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-08 19:51:13 +11:00
xiphon 02d3ef7bda blocks: use auto-generated .c files instead of 'LD -r -b binary' 2018-10-04 00:01:09 +00:00
doy-lee 4caffeff78 Merge branch 'dev' into LokiMergeUpstreamUntil_20180905_fad88e1 2018-10-01 16:48:40 +10:00
Doyle a71b7640d2
Service Nodes Improve Reliability & Feedback (#262)
* If unable to receive own uptime proof, switch to more granular pinging

* Uptime proof simpler solution to repeatedly ping on failure
2018-09-27 18:31:08 +10:00
doy-lee bdbeae8b7c Fix refresh api changes for compilation 2018-09-16 14:27:13 +10:00
doy-lee ed9d21bb9f Merge commit '0cf80ba' into LokiMergeUpstream20180821 2018-09-14 15:51:22 +10:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
moneromooo-monero 7e67c52fa2
Add a define for the max number of bulletproof multi-outputs 2018-09-11 13:37:38 +00:00
Doyle 25292b3e86 Version 0.4.0 Release Candidate (#216)
* core: submit uptime proof immediately after registering

* Increase visibility of autostaking prompts

* quorum_cop: changed uptime proof prune timeout to 2 hours 10 minutes

* cleanup: removed scope limiting block

* check_tx_inputs: fix deregister double spend test to include deregisters from other heights

* config: new testnet network id, genesis tx, and version bump

* wallet2: fix testnet wallet blockheight approximation

* Fix change in address format in RPC which broke parsing and pooling contributors (#184)

* Fix service node endpoints for RPC to also use stdout (#185)

* fixed some further rct core tests (#180)

* Fix service node state by calling detached hooks on failure to switch to alt chain (#188)

* fixed block verification core tests (#186)

* fixed block verification core tests

* core tests: removed gen_block_miner_tx_out_is_small which is only relevant to hardfork version 1

*  Don't consider expired deregistrations when filling block template

* Add unit tests for getting staking requirement (#191)

* First service node test (#190)

* core_tests: added service node tests

* core_tests: check balance after registration tx

* Fix underflow for popping rollback events (#189)

* Move deregistration age check into check_tx_inputs

* Zero initialise rct_signatures member txnFee is a uint64_t and has uninit values

* Enforce that deregisters must be 0 fee since we skip checks

* Add unit tests for vote validation (#193)

* Add unit tests for deregistration validation (#194)

* Mainnet checkpoint 86535, testnet 3591, 4166

* Bump version number

* Add print_sr for getting staking requirement (#198)

* Misc bugfixes (#203)

* removed unnecessary cast to double during txfee+coinbase calculation

* simplewallet: increased autostaking interval from 2 minutes to 40

* Fix casting issues from uint to int (#204)

* core_tests: check service node registration and expiration (#195)

* core_tests: check service node registration and deregistration

* core_tests for service nodes:

- include service nodes rewards when calculating account's balance
- check that service nodes rewards have been received

* fixed namespace error; reduced the scope of staking requirement constants

* On blockchain inc/dec mark deregisters relayble based on age (#201)

* Service nodes restore only 1 rollback bug (#206)

* Fix restore 1 rollback event, ensure prevent rollback is always added

* Remove adding prevent_rollback event at init

It gets called in on block added generic anyway.

* Log db exception, fix relation operators for vote/deregister lifetime (#207)

* Filter relayable deregisters w/ check_tx_inputs instead of blockchain callbacks

* Bump version to 0.3.7-beta

* fix build with GCC 8.1.0 (#211)

* Add temp hardfork rule in testnet for deregister lifetimes (#210)

* Update testnet, remove testnet forks, remove checkpoints, update blockheight estimate (#212)

* Don't ban peers for a bad vote, just drop their connection (#213)

* Update to version 0.3.0 release candidate (#215)
2018-09-07 17:42:48 +10:00
jcktm fa8b034910 tx_pool: prioritize deregister txs to make it into a block, and prune deregisters after 2 hours 2018-08-22 11:17:51 +10:00
jcktm 50faf43f33 config: changed testnet network id 2018-08-20 14:22:06 +10:00
jcktm 78b7fccfbf service nodes: changed portions to 64 bits
also miner fixes to simplewallet behaviour and interactive registration
prompt
2018-08-20 14:20:37 +10:00
jcktm a29c3a8eb3 simplewallet: added autostaking 2018-08-17 16:21:03 +10:00
jcktm ce173c9d44
Begin fixing core tests (#132)
- Difficulty fix to prevent 0 difficulty which is not considered valid.
- CURRENT_BLOCK_MAJOR/MINOR_VERSION is only used for tests it appears
- Core Tests generate a blockchain using the nettype FAKECHAIN, so some
  codepaths need to accept FAKECHAIN as a nettype. FAKECHAIN is essentially the
  mainnet.
- Core Tests uses their own hard-fork data that specifies the current hard-fork
  version and time it forked etc instead of using the data in blockchain.cpp at
  the top. We started from v7, so get_test_options() is updated accordingly.
2018-08-10 10:43:02 +10:00
jcktm ec9e7c16b6 service nodes: update staking lock blocks requirements (#126) 2018-08-08 16:31:20 +10:00
jcktm 21708b0944 config: change network ID for testnet 2018-08-08 16:31:20 +10:00
jcktm 5ff070f53f testnet: updated genesis block for new testnet 2018-08-08 16:31:20 +10:00
jcktm 62f86e837d constants: add some static asserts, and replace magic numbers with constants 2018-08-07 17:01:39 +10:00
jcktm cc48990cdc new and improved contribution system 2018-08-07 17:01:39 +10:00
jcktm ace26fc0cd quorum_cop: added quorum cop and service node keys to lokid
Submit deregistration autonomously, prune uptime_proofs

Move pruner to relayer, fix inf. loop, quorum participation bool return

find_if, fix reorg logic, make 2hrs check a variable

Add iterator assign on erase, adjust detached check

qacop: review iteration, changed warnings and std::find call

Accept proofs excluding the added time buffer
2018-08-02 18:58:19 +10:00
jcktm dcf1cc54d9 pooled staking: renamed contributor cut to portions 2018-07-31 15:18:37 +10:00
jcktm 41103edbcd service node registration: add signatures from service node pubkey to registration 2018-07-28 10:49:56 +10:00
jcktm 003f0709b8 service_node_list: add multiple stakers, reward shares, etc 2018-07-20 14:16:26 +10:00
Doyle fb66b7e00b Service Node Deregister Part 5 (#89)
* Retrieve quorum list from height, reviewed

* Setup data structures for de/register TX

* Submit and validate partial/full deregisters

* Add P2P relaying of partial deregistration votes

* Code review adjustments for deregistration part 1

 - Fix check_tx_semantic
 - Remove signature_pod as votes are now stored as blobs. Serialization
   overrides don't intefere with crypto::signature anymore.

* deregistration_vote_pool - changed sign/verify interface and removed repeated code

* Misc review, fix sign/verify api, vote threshold

* Deregister/tx edge case handling for combinatoric votes

* core, service_node_list: separated address from service node pubkey

* Retrieve quorum list from height, reviewed

* Setup data structures for de/register TX

* Submit and validate partial/full deregisters

* Add P2P relaying of partial deregistration votes

* Code review adjustments for deregistration part 1

 - Fix check_tx_semantic
 - Remove signature_pod as votes are now stored as blobs. Serialization
   overrides don't intefere with crypto::signature anymore.

* deregistration_vote_pool - changed sign/verify interface and removed repeated code

* Misc review, fix sign/verify api, vote threshold

* Deregister/tx edge case handling for combinatoric votes

* Store service node lists for the duration of deregister lifetimes

* Quorum min/max bug, sort node list, fix node to test list

* Change quorum to store acc pub address, fix oob bug

* Code review for expiring votes, acc keys to pub_key, improve err msgs

* Add early out for is_deregistration_tx and protect against quorum changes

* Remove debug code, fix segfault

* Remove irrelevant check for tx v3 in blockchain, fix >= height for pruning quorum states

Incorrect assumption that a transaction can be kept in the chain if it could
eventually become invalid, because if it were the chain would be split and
eventually these transaction would be dropped. But also that we should not
override the pre-existing logic which handles this case anyway.
2018-07-18 12:42:47 +10:00
jcktm 8a92407f5f
servicenodes: Added service node list 2018-06-29 14:47:00 +10:00
stoffu 08b85a8e00
cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X 2018-06-11 20:17:02 +09:00
jcktm 51dbdfa34b config - added testnet genesis tx to cryptonote_config 2018-05-05 17:08:55 +10:00
Doyle 9262a5c14b Update config (#50)
* Reduce mining block unlock time to 1 hour (#19)

* Reduce block unlock time to 1 hour

* Change to release version

* Update cryptonote_config.h

* Update net_node.inl

* Fix genesis and netid values
2018-05-03 12:49:06 +10:00
jcktm 7ad28126e5 cryptonote_config - changed ports 2018-05-01 15:37:25 +10:00
jcktm 1b1c2b479a cryptonote_config - added mainnet genesis tx 2018-05-01 14:33:33 +10:00
Haafingar 9a730c2ca4
Final Stagenet values 2018-04-30 15:05:24 +10:00
jcktm a47fc4bbaf cryptonote_config - redo stagenet genesis tx 2018-04-30 14:20:52 +10:00
jcktm f8bef95c67 cryptonote_config - changed stagenet gov. wallet and premine address to multisig 2018-04-30 13:24:02 +10:00
Haafingar 485d7f02c5
Reduce mining block unlock time to 1 hour (#19) (#41)
* Reduce block unlock time to 1 hour
2018-04-30 10:21:23 +10:00
jcktm fa45217151 cryptonote_config - replace genesis tx with correct one 2018-04-29 19:20:03 +10:00
jcktm ca3e94bb59 cryptonote_config - add genesis tx 2018-04-29 19:09:33 +10:00
jcktm 9b91836f0a cryptonte_config - add governance wallet address 2018-04-29 18:50:58 +10:00
jcktm 40981b9db2 cryptonote_config - change blockchain timestamp window config to 11 2018-04-29 15:08:46 +10:00
jcktm, wowrio, jagerman 594a7f569c merged in efe03eb0379d87d521f6fc86cef39ec06c119f41 - added LWMA
merged in 5b349daf08993c694ff9a05022dee432852832a2 - timestamps median mitigation
2018-04-28 18:12:31 +10:00
Haafingar 9f81ce20b8 modified: src/cryptonote_config.h
modified:   src/p2p/net_node.inl
2018-04-17 17:09:26 +10:00
Thomas Winget 9e2d0f49dd
loki stagenet genesis tx 2018-04-15 20:32:02 -04:00
Haafingar ee65796bf6
Update Testnet ID 2018-04-13 12:00:23 +10:00
Thomas Winget c6549bf351
fixup loki stagenet changes after upstream merge 2018-04-10 15:21:22 -04:00
Thomas Winget 697a51dbfd merge changes from upstream 2018-04-08 19:32:12 -04:00
Thomas Winget 3ae2d210e7
Loki testnet genesis tx 2018-03-21 19:13:44 -04:00
Thomas Winget 170dc26e9e
Loki emission curve 2018-03-21 19:13:36 -04:00
Thomas Winget a81574b937 allow for different versions for mainnet and testnet genesis block 2018-03-20 19:00:15 -04:00
Doyle T 975ab3af80 Add missing closing brace 2018-03-20 19:00:15 -04:00
Haafingar 8de90d6167 Insert correct testnet settings 2018-03-20 19:00:15 -04:00
Haafingar e703cec016 Corrected comment 2018-03-20 19:00:15 -04:00
Doyle f03940976a Change testnet network ID to arbitrary bytes 2018-03-20 19:00:15 -04:00
KeeJef 0cff4560fb 9 Mixin 2018-03-20 19:00:15 -04:00
Thomas Winget fb9b4af3f5 change minimum ring size to 11 (10 + real) 2018-03-20 19:00:14 -04:00
Thomas Winget ac6cdeb036 address prefixes for loki
L - mainnet
T - testnet
2018-03-20 19:00:14 -04:00
Thomas Winget 15b2636677 governance reward split 2018-03-20 19:00:11 -04:00
moneromooo-monero b1398fff40
core: fix use of uninitialised data 2018-03-18 23:37:00 +00:00
moneromooo-monero 38657fd0e9
Bump min ring size from 5 to 7 from v7 2018-03-07 13:19:04 +00:00
stoffu af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
Jean Pierre Dudey 9f9e095a8c
Use `genesis_tx` parameter in `generate_genesis_block`. #3261
* src/cryptnote_config.h: The constant `config::testnet::GENESIS_TX` was
changed to be the same as `config::GENESIS_TX` (the mainnet's transaction)
because the mainnet's transaction was being used for both networks.

* src/cryptonote_core/cryptonote_tx_utils.cpp: The `generate_genesis_block` function
was ignoring the  `genesis_tx` parameter, and instead it was using the `config::GENESIS_TX`
constant. That's why the testnet genesis transaction was changed. Also five lines of unused
code were removed.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-03-05 11:19:01 +09:00
Thomas Winget 86d9d8ce39
loki decimal point and fork version config values 2018-02-28 11:56:41 -05:00
Thomas Winget 6511ce0cc3
Change project name in config to loki 2018-02-28 11:56:39 -05:00
moneromooo-monero bc61ae69bf
tx_pool: add a max pool size, settable with --max-txpool-size 2018-02-07 13:42:12 +00:00
moneromooo-monero 3b4e6b35b3
txpool: increase unmined tx expiry to three days 2018-02-01 22:48:52 +00:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
kenshi84 4dd05a2f9b
subaddress: change prefix so that it starts with 8 2017-10-16 10:35:59 +09:00
Riccardo Spagni 5ea20d6944
Merge pull request #2469
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-15 17:23:50 +02:00
kenshi84 53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
Riccardo Spagni 13be8115e4
Merge pull request #2458
7f2f6ee1 protocol: remove hop count on block propagation (moneromooo-monero)
2017-09-25 17:00:47 +02:00
moneromooo-monero 7adceee634
precomputed block hashes are now in blocks of N (currently 256)
This shaves a lot of space off binaries
2017-09-18 16:29:00 +01:00
moneromooo-monero 7f2f6ee1c9
protocol: remove hop count on block propagation
It is unused, as it was apparently a future optimization,
and it leaks some information (though since pools publish
thei blocks they find, that amount seems small).
2017-09-17 10:26:12 +01:00
Thomas Winget 77986023c3
json serialization for rpc-relevant monero types
Structured {de-,}serialization methods for (many new) types
which are used for requests or responses in the RPC.

New types include RPC requests and responses, and structs which compose
types within those.

# Conflicts:
#	src/cryptonote_core/blockchain.cpp
2017-09-05 12:20:27 -04:00
moneromooo-monero 5a283078ec
cryptonote_protocol: large block sync size before v4 2017-08-17 13:11:52 +01:00
moneromooo-monero 7007bd1489
Change default block sync size from 200 to 20
With the new sync algorithm, the network overhead will be masked
as the thread adding blocks isn't interrupted by network calls
anymore. This should reduce memory usage a lot during sync.
2017-08-08 11:05:11 +01:00
Riccardo Spagni ed09652a17
Merge pull request #1701
8277e67f Add anchor connections (Miguel Herranz)
2017-05-05 11:26:11 +02:00
moneromooo-monero 3396a9f2af
Add intervening v5 fork for increased min block size
Minimum mixin 4 and enforced ringct is moved from v5 to v6.
v5 is now used for an increased minimum block size (from 60000
to 300000) to cater for larger typical/minimum transaction size.

The fee algorithm is also changed to decrease the base per kB
fee, and add a cheap tier for those transactions which we do
not care if they get delayed (or even included in a block).
2017-03-15 08:32:51 +00:00
moneromooo-monero 3153349325
core: quantize per kB fee to 8 decimals 2017-03-03 23:31:56 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Miguel Herranz 8277e67f11 Add anchor connections
Based on https://eprint.iacr.org/2015/263.pdf 4. Anchor connections.

Peer list serialisation version bumped to 5.
2017-02-10 23:28:54 +01:00
Miguel Herranz 95f3e193f0 Update and use blockchain data files defines 2017-01-28 15:55:14 +01:00
Riccardo Spagni 5f568533aa
Merge pull request #1263
d61bd81 add lightweight block propagation ("fluffy blocks") (Dion Ahmetaj)
2016-11-11 12:34:43 +02:00
Dion Ahmetaj d61bd8187e add lightweight block propagation ("fluffy blocks")
Added a new command to the P2P protocol definitions to allow querying for support flags.

Implemented handling of new support flags command in net_node. Changed for_each callback template to include support flags. Updated print_connections command to show peer support flags.

Added p2p constant for signaling fluffy block support.

Added get_pool_transaction function to cryptnote_core.

Added new commands to cryptonote protocol for relaying fluffy blocks.

Implemented handling of fluffy block command in cryptonote protocol.

Enabled fluffy block support in node initial configuration.

Implemented get_testnet function in cryptonote_core.

Made it so that fluffy blocks only run on testnet.
2016-11-09 14:24:27 -05:00
moneromooo-monero 82dbba10d4
core: dynamic fee algorithm from ArticMine
The fee will vary based on the base reward and the current
block size limit:

fee = (R/R0) * (M0/M) * F0

R: base reward
R0: reference base reward (10 monero)
M: block size limit
M0: minimum block size limit (60000)
F0: 0.002 monero

Starts applying at v4
2016-10-31 08:37:08 +00:00
AwfulCrawler 9c73128835 Change default dust threshold to equal fee per kb 2016-10-12 14:04:26 +13:00
moneromooo-monero cd01bae735
Decrease minimum fee from 0.01/kB to 0.002/kB
The wallet will start using that fee about two weeks after hard
fork 3, when most people will likely have updated their daemons.
2016-09-15 09:28:33 +01:00
moneromooo-monero dc4aad7eb5
add rct to the protocol
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
2016-08-28 21:28:37 +01:00
moneromooo-monero 3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
Javier Smooth 75fd96dcda Revert connection limit to more customary 8 2015-12-14 18:45:52 -08:00
Javier Smooth 4cea2b13b2 Add IP blocking for misbehaving nodes (adapted from Boolberry)
With minor cleanup and fixes (spelling, indent) by moneromooo
2015-11-23 18:06:20 +00:00
Javier Smooth baf101ef4a More changes for 2-min blocks
Use the correct block time for realtime fuzz on locktime
Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting)
Lock unit tests to original block time for now
2015-11-13 00:37:35 -08:00
Javier Smooth 4fea1a5fe7 Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block version 2 2015-11-13 00:30:45 -08:00
moneromooo-monero ecbb732faa
Fix leak on real output when using a very recent output
The wallet and the daemon applied different height considerations
when selecting outputs to use. This can leak information on which
input in a ring signature is the real one.

Found and originally fixed by smooth on Aeon.
2015-10-25 16:34:57 +00:00
moneromooo-monero 90ccad1236
from hard fork 2, claim a quantized reward in coinbase
The small leftover is carried forward
2015-10-10 12:28:44 +01:00
moneromooo-monero 63741d8264
Integrated addresses (standard address plus payment id) 2015-06-12 16:48:41 +01:00
smooth 754a785ee1 minimum subsidy for mining incentives, remove unused LEGACY_FEE define 2015-03-04 23:35:04 -08:00
Riccardo Spagni 24ddfa792e
Merge pull request #206
1b46226 std::atomic_flag has no copy/move constructor, can't have a vector (Thomas Winget)
df53c0a small typo in previous commit (Thomas Winget)
4a53898 DNS seed timeout and fallback (Thomas Winget)
2015-01-08 12:18:00 +02:00
Riccardo Spagni f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Thomas Winget 4a53898764
DNS seed timeout and fallback 2014-12-15 17:23:42 -05:00
iamsmooth dde7897fd4 Disable legacy fees for now 2014-11-11 02:03:00 +00:00
iamsmooth cc74b43651 Remove DEFAULT_FEE, add temporary acceptance of too-small per-kb fee >= 0.1, denominations based on DEFAULT_DUST_THRESHOLD, document fee arg to create_transactions as unused, se DEFAULT_DUST_THRESHOLD for wallet dust collection instead of calcualted tx fee 2014-11-09 10:53:29 +00:00