Commit graph

58 commits

Author SHA1 Message Date
Maxim Shishmarev 87cfb05f55 use a recursive_mutex from boost in service node list (#289) 2018-10-15 12:22:46 +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
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 3a46efb488 Set m_height to 0, revert didn't revert this. 2018-09-19 13:24:37 +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
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
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
jcktm c4988f5a1f Revert "Store Service Node State to DB as Blob (#125)" (#127)
This reverts commit 591fda78f0.
2018-08-08 18:51:14 +10:00
jcktm e2c8230f31 serivce nodes: initialized m_height to remove uninitialized variable errors 2018-08-08 16:43:41 +10:00
jcktm ec9e7c16b6 service nodes: update staking lock blocks requirements (#126) 2018-08-08 16:31:20 +10:00
jcktm 11b1b042ca service nodes: revert 30k limit in staking requirement 2018-08-08 16:31:20 +10:00
jcktm 79406a28a0 simplewallet: add sanity check to staking commands (#123) 2018-08-08 16:31:20 +10:00
Doyle 591fda78f0 Store Service Node State to DB as Blob (#125)
* store service node state as a blob in db

* add height to service node list storage
2018-08-08 16:31:20 +10:00
jcktm 7badc30e97 service nodes: added service node operator cut to registration 2018-08-07 17:01:39 +10:00
jcktm 62f86e837d constants: add some static asserts, and replace magic numbers with constants 2018-08-07 17:01:39 +10:00
jcktm 17152e4329 Fix bug in service node payout address duplication check 2018-08-07 17:01:39 +10:00
jcktm 0cb93a5b6f service node list: changed contributor map to vector 2018-08-07 17:01:39 +10:00
jcktm cc48990cdc new and improved contribution system 2018-08-07 17:01:39 +10:00
jcktm 54dece9691 fix change address and balance display for per-output unlock times 2018-08-05 03:08:51 +00:00
jcktm 8c5a5792cb added tx secret key field to tx extra 2018-08-03 18:34:49 +10:00
jcktm b81214ec6e wallet2: added staking transactions to create_transactions_2 2018-08-03 16:52:44 +10:00
jcktm d318cd702e service node list: added initial contribution field to prepare registration and registration arg parsing 2018-08-03 15:17:15 +10:00
Doyle T 5435e3327e Add RPC call for getting snode register command 2018-08-03 13:52:09 +10:00
jcktm bffd7c2d34
Per output unlock time rebased (#114)
* add per-output unlock time field to transaction class

* get output unlock time (and relevant const fixes)

* move output unlocked check to separate function

* tx unlocked -> output unlocked in Blockchain

* per output unlock in tx creation; needs fork rules and testing

* per output unlock in tx prefix so it is signed...

also fix a couple typos/goofs

* wallet: check if using per output unlock time

* add rules.h and rules.cpp.  git woopsie.

* update test for BlockchainDB changes

* Change tx v3 deregister to be a bool in tx header

* service_node_list: handle per output unlock times in contribution txs

* transaction: added verification of unlock_times.size()
2018-08-03 11:39:28 +10:00
jcktm cce04efb28 service_node_list: fixed initialization typo 2018-08-03 11:34:41 +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