Commit Graph

269 Commits

Author SHA1 Message Date
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
Thomas Winget 557e27fd21 per kb fees 2014-11-06 22:09:07 -07:00
Zachary Michaels 95a2701ec5 Change testnet prefix 2014-09-15 15:55:07 +02:00
Zachary Michaels d03308734b
Separate testnet address prefix 2014-09-15 15:54:59 +02:00
Zachary Michaels 1e38a02bb5 Add testnet genesis tx as output by CN reference 2014-09-15 15:53:50 +02:00
Zachary Michaels fb4146fa34 Reorganize testnet constants 2014-09-15 15:53:10 +02:00
Zachary Michaels 79862ad1de Add testnet constants 2014-09-15 15:53:10 +02:00
fluffypony 1829966fea quick additional patch 2014-08-23 22:43:13 +02:00
fluffypony db69298b95 quick fee ramp to prevent spam attack 2014-08-23 22:21:18 +02:00
fluffypony 6fc995fe5d License updated to BSD 3-clause 2014-07-23 15:03:52 +02:00
mydesktop eba62452c0 set max block size for gbt 2014-06-26 16:42:24 -04:00
fluffypony 3bc16dc0e6 proper tx_pool handling from CryptoZoidberg / BBR 2014-06-15 09:48:13 +02:00
mydesktop 3a3a817678 0.8.8update 2014-05-25 13:06:40 -04:00
mydesktop 79a4bedc36 mac osx building fixes 2014-04-30 16:50:06 -04:00
thankful_for_today e940386f9a voting stopped 2014-04-30 14:39:49 +04:00
Henry Hartshorne 6ed4507803 Changed block minor version 2014-04-25 22:08:19 +04:00
thankful_for_today 1a8f5ce89a Bitmonero release 2014-04-18 01:21:40 +04:00
Antonio Juarez a401a02ddb Improvements in JSON RPC 2014-04-07 16:02:15 +01:00
Antonio Juarez 29c2859a3e json rpc for wallet and bugfix 2014-04-02 17:00:17 +01:00
Antonio Juarez 296ae46ed8 moved all stuff to github 2014-03-03 22:07:58 +00:00