Commit graph

77 commits

Author SHA1 Message Date
Maxim Shishmarev d22055bfcd Implementation of swarms using a queue/buffer (#299)
* Added implementation of swarms using a buffer

* fixed bug in get_new_swarm_id

* use correct hf version

* removed comments
2018-11-16 10:32:56 +11:00
Maxim Shishmarev fdaa45a53a Add API for staking from GUI wallet (#315)
* Enable staking in GUI wallet

* Move more helper functions into service_node_rules.h

* Move validation of arguments for staking into wallet2

* call stake validation from within create_stake_tx
2018-11-15 13:22:14 +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
Doyle cd04e1efa3
Merge pull request #287 from Doy-lee/LokiMergeUpstreamUntil_20181010_77e1ebf
Loki merge upstream until 2018-10-10 #77e1ebf
2018-10-19 14:28:51 +11:00
Doyle ff8d3796fc
Make service node scan from hardfork 9 (#251)
* Make scanning code more robust and compliant with core_tests

* Fix incorrect call to get_hard_fork_version

* On clear, start height from hardfork 9 height.
2018-10-17 11:07:04 +11:00
Doyle 8a5480a2f5
Service Nodes Reregistration Grace Period (#290)
* Allow a grace period to re-register service nodes

* Guard feature behind hardfork 10

* Const iterator, guard rpc height result by hard fork 10
2018-10-16 10:32:35 +11:00
Maxim Shishmarev 87cfb05f55 use a recursive_mutex from boost in service node list (#289) 2018-10-15 12:22:46 +11:00
doy-lee b9fabc269f Merge branch 'dev' into LokiMergeUpstreamUntil_20181010_77e1ebf 2018-10-11 13:21:23 +11:00
Maxim Shishmarev 207c1fa89a Making service nodes list and quorum cop thread-safe (#285)
* Remove dependency on service node list in quorum cop

* making service node list therad-safe

* improve thread-safety of quorum cop
2018-10-10 16:24:01 +11:00
doy-lee 5805b72778 Merge commit '2a8fcb421bc41eb254f95379dd73238915dd509d' into LokiMergeUpstreamUntil_20180911_e6d36c1
Begin fixing broken bulletproof tests in Loki
2018-10-08 13:34:36 +11:00
doy-lee 4caffeff78 Merge branch 'dev' into LokiMergeUpstreamUntil_20180905_fad88e1 2018-10-01 16:48:40 +10:00
Doyle 2022767837
Disallow insufficient stake if you're not a pre-existing contributor (#274) 2018-09-29 19:37:04 +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 fea865537c Merge branch 'dev' into LokiMergeUpstream20180821 2018-09-19 13:29:43 +10:00
doy-lee 3a46efb488 Set m_height to 0, revert didn't revert this. 2018-09-19 13:24:37 +10:00
doy-lee 13d524ee02 Merge branch 'dev' into LokiMergeUpstream20180821 2018-09-19 13:23:56 +10:00
Doyle 2dc9f687ea
Backport master changes to dev (#248)
* updated checkpoints to remove early hardfork chainsplit

* Service Nodes Safe Guard (#246)

* Enforce stake and registration to always be atleast v3

* Scan from hardfork 9 height

* Remove get quorum state URI endpoint, use json rpc only (#199)
2018-09-18 12:14:11 +10:00
Maxim Shishmarev d8944cb5ca core_tests: more tests and some refactoring (#205)
* core_tests: test that deregister tx make it into full blocks

* correct derivation of the service nodes winner in core tests

* core_tests: check deregistrations with non-zero fee declined

* core_tests: linear chain generator refactoring

* core_tests: test deregister safety buffer

* fix build error with const elements

* remote unnecessary const from return type
2018-09-14 14:35:29 +10:00
doy-lee ca464be3bd Merge commit 'ed2c81e' into LokiMergeUpstream20180821 2018-09-13 18:42:49 +10:00
moneromooo-monero 8d769392d9 replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-09-13 18:31:35 +10:00
Maxim Shishmarev d934e5b4d5 unit tests: check portion amount validation (#214)
* unit tests: check portion amount validation

* unit tests: test service nodes rewards proportionate to contributions
2018-09-13 11:49:30 +10: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
Doyle a0e8229928
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.
2018-09-04 18:27:13 +10:00
Maxim Shishmarev dfae8763da 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
2018-09-04 11:41:05 +10:00
Doyle 2ef7d3b923
Fix underflow for popping rollback events (#189) 2018-08-29 16:03:45 +10:00
Maxim Shishmarev 93302c19ff First service node test (#190)
* core_tests: added service node tests

* core_tests: check balance after registration tx
2018-08-29 15:53:13 +10:00
Doyle 4846572f96
Add unit tests for getting staking requirement (#191) 2018-08-29 15:38:55 +10:00
Doyle a48749c699
Fix service node state by calling detached hooks on failure to switch to alt chain (#188) 2018-08-28 12:02:43 +10:00
jcktm 45a15d5a24 check_tx_inputs: fix deregister double spend test to include deregisters from other heights 2018-08-23 16:12:11 +10:00
jcktm 9eba9557fb version: bump version number and decrease service node logs 2018-08-22 15:29:39 +10:00
Doyle T db3bac912e Fix conditional jump on uninitialised valgrind warning 2018-08-20 18:33:23 +10:00
jcktm 939e194755 testnet: remove testnet forks for testnet relaunch 2018-08-20 14:20:48 +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 245e1f769e
Merge pull request #158 from jcktm/autostaking
simplewallet: added autostaking
2018-08-17 17:11:28 +10:00
jcktm a29c3a8eb3 simplewallet: added autostaking 2018-08-17 16:21:03 +10:00
jcktm b417bf1f27 service nodes: add quorum states to db storage 2018-08-17 15:14:45 +10:00
jcktm 95079568dd service nodes: added service node list rescan message back in 2018-08-17 12:25:28 +10:00
Thomas Winget f9e195f09e
minor fixes to service node data storage 2018-08-16 00:13:57 -04:00
Thomas Winget 4f521b69b4 keep track of service node registration height separately 2018-08-15 23:38:06 -04:00
Thomas Winget 06b6c738a7 Revert "Revert "Store Service Node State to DB as Blob (#125)" (#127)"
This reverts commit c4988f5a1f.

This un-reverts the changes to store the service node info in the
database.  This could easily just be its own commit instead of a
revert, but doing a revert is amusing (and easier in this case).
2018-08-15 23:38:06 -04:00
Doyle f55b9b1b82
Service Nodes States Endpoint (#145)
* Add get_service_node_list_state command for analytics

* Update service_node_list_state to search particular pubkey

* Service node list state sorts display results by longest waiting

* Fix up leftover todos/unused data structures

* Change get_service_node_list_state to print_sn
2018-08-15 12:59:05 +10:00
jcktm 0891999d2b service nodes: add hardfork for testnet reservation calculation bug 2018-08-15 12:45:31 +10:00
sachaaaaa 063a6fa6a5 core: prepare_registration interactive prompt
Add new interactive daemon command "prepare_registration" that saves the registration parameters to a file.

Changes to interactive prompt + put contribution<25% last

clean up

changed everything to portions

added check for --service-node flag
2018-08-15 12:34:50 +10:00
jcktm 12ec5231f3
service nodes: fixed portion calculation to allow last contributor to have less than 25% (#140) 2018-08-14 16:40:30 +10:00
jcktm f2b5480f45 service nodes: fixed bug in reservation calculation (#138) 2018-08-14 16:18:40 +10:00
jcktm e19cdc0532 service nodes; added pubkey check before service node registration signature check (#139) 2018-08-14 16:12:42 +10:00
jcktm d58890fe8f service nodes: fixed the staking requirement (#141) 2018-08-14 16:04:30 +10:00
jcktm 9c6e8b042d service nodes: changed rescan to begin from start of blockchain instead of 30 days (#143) 2018-08-14 15:41:30 +10:00
jcktm 6657a8336a service nodes: switched to portable shuffle algorithm 2018-08-12 12:09:01 +10:00
jcktm dbe25f7a57 tests: change MAKE_TX test macros to use ring ct and bulletproofs; begin preparations for service node tests 2018-08-10 14:29:51 +10:00