Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static reward RC #328

Merged
merged 14 commits into from
Dec 2, 2018
Merged

Conversation

proletesseract
Copy link
Member

Rewards changed from coinage to static amount of 2 NAV per block as per NPIP0004.

NPIP0004: https://github.com/NAVCoin/npips/blob/master/npip-0004.mediawiki

Test added to check staked amount is 2NAV after the soft fork activates.

@matt-auckland matt-auckland requested review from aguycalled, red010b37 and matt-auckland and removed request for aguycalled November 27, 2018 22:23
Copy link
Member

@matt-auckland matt-auckland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🦅

@aguycalled aguycalled merged commit 9601f85 into navcoin:master Dec 2, 2018
matt-auckland pushed a commit to matt-auckland/navcoin-core that referenced this pull request Dec 6, 2018
* static rewards added

* initial test and test util added

* added new test to rpc test file

* test updated

* adding sleep print

* removed extra bracket

* updated perms.

* cleanup test

* checking before the soft fork

* creating a few blocks to start

* removing pre check
aguycalled pushed a commit that referenced this pull request Dec 7, 2018
* stake weight counts cold staking balance

* show colstaking output values in gui

* overview layout

* overview layout move to staking section

* receive layout

* fix top menu layout

* unused var

* set coinstake version before signing

* resign coinstake tx

* error takes string as arg

* error must return false

* inherit return value

* extract pub key from input scripsig when cold staking

* gui cold staking wizard

* fix layout

* fix layout

* restrict getcoldstakingaddress only after actv

* use chainactive instead of pindexbestheader

* add logging

* correctly extract pubkey from coldstaking script

* new regtest genesis block

* IsPayToPublicKey()

* addressindex and unspentindex track p2pk (staking) outputs

* use address type 1 for p2pk

* use extract destination for address/unspent indexes

* track cold staking addresses in index

* GetStakingKeyID / GetSpendingKeyID

Add new class methods to obtain the staking and spending key ids from a cold staking address

* ui checks if spends coldstaking out

when sending a transaction, the ui will check whether any of the outputs is a cold staking script. in that case, it will warn the user about the coins going to a normal change address if he didnt specify a cold staking address as custom change destination

* fix

* update strings

* add IsColdStake() to CScript

* parse OP_COINSTAKE opcode

* Solver() extracts addresses from cold staking tx

* read key from coldstaking script when verifying block signature

* sign coldstaking input

* remove cnavcoinaddress

* add key_io

* revert

* fix extractdestinations

* required signatures

* show cold staking balance

* get available stakable credit

* get available stakable credit

* count cold staking balance when creating coinstake

* show canspend / canstake in listtransactions

* fix total stakable amount

* list transactions canspend/stake

* fix order of the public keys on raw decoded address

* cold staking balance in ui

* show colstaking output values in gui

* overview layout

* overview layout move to staking section

* fix top menu layout

* extract pub key from input scripsig when cold staking

* gui cold staking wizard

* add logging

* remove duplicate case

* Remove duplicated case

* Remove wrong duplicated check

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* rebase cold staking branch

* testnet coldstaking versionbit

* fix version bit

* check versionbit testnet

* sync branch

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* added cold staking to regtest (#31)

* combined cfund test helper functions: activate_cfund, start_new_cycle, end_cycle, slow_gen

* simplified setup-network using existing code

* removed duplicate code from rawtx tests and minor linting fixes

* adds cold staking to regtest

* added cold staking to regtest

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* Merge from Cfund cold staking (#33)

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* FIxed wizard text (#35)

* fix overview page

* fix coldstaking wizard

* show both staking and spending pubkeys

* fix cold staking wizard

* combine signatures cold staking

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* bump version 4.5.0

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Removed some logging, unused variables and commented out some printing as part of test clean up

* added syncing to test

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Static reward RC (#328)

* static rewards added

* initial test and test util added

* added new test to rpc test file

* test updated

* adding sleep print

* removed extra bracket

* updated perms.

* cleanup test

* checking before the soft fork

* creating a few blocks to start

* removing pre check

* Removed some logging, unused variables and commented out some printing as part of test clean up

* added syncing to test

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* fix

* added spending-from-coldstaking test

* updated rpc-tests.py

* removed extra file, updated coldstaking tests

* Update qa/pull-tester/rpc-tests.py

delete reference to deleted file

* Updated release notes with a draft of the cold staking notes

* added notes about Marcus's testing

* fix word
aguycalled pushed a commit that referenced this pull request Dec 7, 2018
* Solver() extracts addresses from cold staking tx

* read key from coldstaking script when verifying block signature

* sign coldstaking input

* remove cnavcoinaddress

* add key_io

* revert

* fix extractdestinations

* required signatures

* show cold staking balance

* get available stakable credit

* get available stakable credit

* count cold staking balance when creating coinstake

* show canspend / canstake in listtransactions

* fix total stakable amount

* list transactions canspend/stake

* fix order of the public keys on raw decoded address

* cold staking balance in ui

* show colstaking output values in gui

* overview layout

* overview layout move to staking section

* fix top menu layout

* extract pub key from input scripsig when cold staking

* gui cold staking wizard

* add logging

* remove duplicate case

* Remove duplicated case

* Remove wrong duplicated check

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* rebase cold staking branch

* testnet coldstaking versionbit

* fix version bit

* check versionbit testnet

* sync branch

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* added cold staking to regtest (#31)

* combined cfund test helper functions: activate_cfund, start_new_cycle, end_cycle, slow_gen

* simplified setup-network using existing code

* removed duplicate code from rawtx tests and minor linting fixes

* adds cold staking to regtest

* added cold staking to regtest

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* Merge from Cfund cold staking (#33)

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* FIxed wizard text (#35)

* fix overview page

* fix coldstaking wizard

* show both staking and spending pubkeys

* fix cold staking wizard

* combine signatures cold staking

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* bump version 4.5.0

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Removed some logging, unused variables and commented out some printing as part of test clean up

* add dialog for voting

* rm file with old name

* added syncing to test

* update dialog voting cfund

* remove old file

* show warning when new cfund entries

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* Made several tweaks to the cfund gui. Fixed some spelling and wording. Added a new title to the dialog so we can see easily if we are looking at proposals or payment requests. Moved some buttons around.

* Made several tweaks to the cfund gui. Fixed some spelling and wording. Added a new title to the dialog so we can see easily if we are looking at proposals or payment requests. Improved button placement. Selection clears after voting and page swapping. buttons are disabled unless you select something

* fixed syntax error. added methods to header file. swapped string -> QString

* buttons should now disable when you select an ite from their list. i.e. select an item from the no list, the vote no button should disable

* fixed typo

* Swap 'view proposal details' button text when we change views

* Tweaks to the cfund gui (#43)

* Made several tweaks to the cfund gui. Fixed some spelling and wording. Added a new title to the dialog so we can see easily if we are looking at proposals or payment requests. Improved button placement. Selection clears after voting and page swapping. buttons are disabled unless you select something

* fixed syntax error. added methods to header file. swapped string -> QString

* buttons should now disable when you select an ite from their list. i.e. select an item from the no list, the vote no button should disable

* fixed typo

* Swap 'view proposal details' button text when we change views

* Tweaked list to prevent weird autohighlighting bug

* merged

* removed extra spacer

* Update src/qt/forms/cfund_voting.cpp

removed whitespace

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Static reward RC (#328)

* static rewards added

* initial test and test util added

* added new test to rpc test file

* test updated

* adding sleep print

* removed extra bracket

* updated perms.

* cleanup test

* checking before the soft fork

* creating a few blocks to start

* removing pre check

* Removed some logging, unused variables and commented out some printing as part of test clean up

* added syncing to test

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* fix

* tweaked wording of cfund alert box

* added spending-from-coldstaking test

* updated rpc-tests.py

* removed extra file, updated coldstaking tests

* Update qa/pull-tester/rpc-tests.py

delete reference to deleted file

* Updated release notes with a draft of the cold staking notes

* Added draft release notes

* Tweaked draft release notes

* added notes about Marcus's testing

* fix word

* Update doc/release-notes/release-notes-4.5.0.md

Co-Authored-By: aguycalled <alex@encrypt-s.com>

* add sleep to spending test

* coldstaking spending test fix

* increase fee spending cs test
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Feb 3, 2019
* static rewards added

* initial test and test util added

* added new test to rpc test file

* test updated

* adding sleep print

* removed extra bracket

* updated perms.

* cleanup test

* checking before the soft fork

* creating a few blocks to start

* removing pre check
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Feb 3, 2019
* stake weight counts cold staking balance

* show colstaking output values in gui

* overview layout

* overview layout move to staking section

* receive layout

* fix top menu layout

* unused var

* set coinstake version before signing

* resign coinstake tx

* error takes string as arg

* error must return false

* inherit return value

* extract pub key from input scripsig when cold staking

* gui cold staking wizard

* fix layout

* fix layout

* restrict getcoldstakingaddress only after actv

* use chainactive instead of pindexbestheader

* add logging

* correctly extract pubkey from coldstaking script

* new regtest genesis block

* IsPayToPublicKey()

* addressindex and unspentindex track p2pk (staking) outputs

* use address type 1 for p2pk

* use extract destination for address/unspent indexes

* track cold staking addresses in index

* GetStakingKeyID / GetSpendingKeyID

Add new class methods to obtain the staking and spending key ids from a cold staking address

* ui checks if spends coldstaking out

when sending a transaction, the ui will check whether any of the outputs is a cold staking script. in that case, it will warn the user about the coins going to a normal change address if he didnt specify a cold staking address as custom change destination

* fix

* update strings

* add IsColdStake() to CScript

* parse OP_COINSTAKE opcode

* Solver() extracts addresses from cold staking tx

* read key from coldstaking script when verifying block signature

* sign coldstaking input

* remove cnavcoinaddress

* add key_io

* revert

* fix extractdestinations

* required signatures

* show cold staking balance

* get available stakable credit

* get available stakable credit

* count cold staking balance when creating coinstake

* show canspend / canstake in listtransactions

* fix total stakable amount

* list transactions canspend/stake

* fix order of the public keys on raw decoded address

* cold staking balance in ui

* show colstaking output values in gui

* overview layout

* overview layout move to staking section

* fix top menu layout

* extract pub key from input scripsig when cold staking

* gui cold staking wizard

* add logging

* remove duplicate case

* Remove duplicated case

* Remove wrong duplicated check

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* rebase cold staking branch

* testnet coldstaking versionbit

* fix version bit

* check versionbit testnet

* sync branch

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* added cold staking to regtest (aguycalled#31)

* combined cfund test helper functions: activate_cfund, start_new_cycle, end_cycle, slow_gen

* simplified setup-network using existing code

* removed duplicate code from rawtx tests and minor linting fixes

* adds cold staking to regtest

* added cold staking to regtest

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (aguycalled#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* Merge from Cfund cold staking (aguycalled#33)

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (aguycalled#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* FIxed wizard text (aguycalled#35)

* fix overview page

* fix coldstaking wizard

* show both staking and spending pubkeys

* fix cold staking wizard

* combine signatures cold staking

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* bump version 4.5.0

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Removed some logging, unused variables and commented out some printing as part of test clean up

* added syncing to test

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Static reward RC (navcoin#328)

* static rewards added

* initial test and test util added

* added new test to rpc test file

* test updated

* adding sleep print

* removed extra bracket

* updated perms.

* cleanup test

* checking before the soft fork

* creating a few blocks to start

* removing pre check

* Removed some logging, unused variables and commented out some printing as part of test clean up

* added syncing to test

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* fix

* added spending-from-coldstaking test

* updated rpc-tests.py

* removed extra file, updated coldstaking tests

* Update qa/pull-tester/rpc-tests.py

delete reference to deleted file

* Updated release notes with a draft of the cold staking notes

* added notes about Marcus's testing

* fix word
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Feb 3, 2019
* Solver() extracts addresses from cold staking tx

* read key from coldstaking script when verifying block signature

* sign coldstaking input

* remove cnavcoinaddress

* add key_io

* revert

* fix extractdestinations

* required signatures

* show cold staking balance

* get available stakable credit

* get available stakable credit

* count cold staking balance when creating coinstake

* show canspend / canstake in listtransactions

* fix total stakable amount

* list transactions canspend/stake

* fix order of the public keys on raw decoded address

* cold staking balance in ui

* show colstaking output values in gui

* overview layout

* overview layout move to staking section

* fix top menu layout

* extract pub key from input scripsig when cold staking

* gui cold staking wizard

* add logging

* remove duplicate case

* Remove duplicated case

* Remove wrong duplicated check

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* rebase cold staking branch

* testnet coldstaking versionbit

* fix version bit

* check versionbit testnet

* sync branch

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* added cold staking to regtest (aguycalled#31)

* combined cfund test helper functions: activate_cfund, start_new_cycle, end_cycle, slow_gen

* simplified setup-network using existing code

* removed duplicate code from rawtx tests and minor linting fixes

* adds cold staking to regtest

* added cold staking to regtest

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (aguycalled#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* Merge from Cfund cold staking (aguycalled#33)

* do not enforce random string for preq v2

* adjust overview layout

* fix condition order

* extend log

* move proposal/preq check to contextualcheckblock

* revert

* restart testnet / increase pow last block

* add log

* cfund change logic for accepting props/preq

* add consensus info to cfundstats

* do not count rejected preqs when creating a new one

* new testnet genesis

* a coldstakingaddress can be constructued only from two normal addresses

* bug fix for getcoldstakingaddress (aguycalled#32)

* forces user to use different staking and spending addresses for getcoldstakingaddress

* updated the cold-staking wizard so you cannot enter the same address as both args

* add coldstaking to regtest

* admit holding two priv keys of a cstaking script

* FIxed wizard text (aguycalled#35)

* fix overview page

* fix coldstaking wizard

* show both staking and spending pubkeys

* fix cold staking wizard

* combine signatures cold staking

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* bump version 4.5.0

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Removed some logging, unused variables and commented out some printing as part of test clean up

* add dialog for voting

* rm file with old name

* added syncing to test

* update dialog voting cfund

* remove old file

* show warning when new cfund entries

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* Made several tweaks to the cfund gui. Fixed some spelling and wording. Added a new title to the dialog so we can see easily if we are looking at proposals or payment requests. Moved some buttons around.

* Made several tweaks to the cfund gui. Fixed some spelling and wording. Added a new title to the dialog so we can see easily if we are looking at proposals or payment requests. Improved button placement. Selection clears after voting and page swapping. buttons are disabled unless you select something

* fixed syntax error. added methods to header file. swapped string -> QString

* buttons should now disable when you select an ite from their list. i.e. select an item from the no list, the vote no button should disable

* fixed typo

* Swap 'view proposal details' button text when we change views

* Tweaks to the cfund gui (aguycalled#43)

* Made several tweaks to the cfund gui. Fixed some spelling and wording. Added a new title to the dialog so we can see easily if we are looking at proposals or payment requests. Improved button placement. Selection clears after voting and page swapping. buttons are disabled unless you select something

* fixed syntax error. added methods to header file. swapped string -> QString

* buttons should now disable when you select an ite from their list. i.e. select an item from the no list, the vote no button should disable

* fixed typo

* Swap 'view proposal details' button text when we change views

* Tweaked list to prevent weird autohighlighting bug

* merged

* removed extra spacer

* Update src/qt/forms/cfund_voting.cpp

removed whitespace

* Moved over RPC tests from other branch

* Updated gitignore

* ported fix for zlib compile on mac from bitcoin bitcoin/bitcoin#9973

* tided tests up slightly

* First spending test

* Largely completed tests for coldstaking where we hold the spending address

* started work on coldstaing tests where we hold the staking address

* fixed accidental var reasignment in test

* Added a staking test

* added some debugging to test

* added missing brackets to function call

* added a loop that waits until we stake

* fixed syntax error

* fixed some more syntax errors

* replaced missing bracket

* Updated test so we use getblockheight instead of getblockchaininfo and only set up 1 node instaed of 2

* we now mine blocks so our coins mature for stkaing

* now we check if the cold staking utxo is used for staking

* adding in block generation so we confirm our tx to the cold stkaing address

* ading more logs for debugging

* more debugging

* syncing blocks between nodes

* Rejigged node setup, hopefully gets syncing working

* get the utxo a different way

* fixed syntax error

* New method to get utxo

* fixes some syntax errors

* fixes other syntax errors

* We check if the uxto is spent via staking

* added some more staing address tests

* added ore logging

* updated arg name in send raw tx function, os it's more verbose

* Updated function so we throw a custom exception we can explicitely catch

* fixed exception throwing

* fixed syntax err

* fixing more syntax errors

* playing around with exception catching

* fixed typo

* Static reward RC (navcoin#328)

* static rewards added

* initial test and test util added

* added new test to rpc test file

* test updated

* adding sleep print

* removed extra bracket

* updated perms.

* cleanup test

* checking before the soft fork

* creating a few blocks to start

* removing pre check

* Removed some logging, unused variables and commented out some printing as part of test clean up

* added syncing to test

* more test fixes

* removed syncing

* removed syncing

* wrapped operation in rbackets

* parse  numbers asfloats

* removed back slahses

* fixed syntax error

* we generate our blocks on node 0 now and just remove the block rewards value from our balance calculatins

* added getcoldstaking error message

* updated rpc test for new help text

* adds modified coldstaking client testing doc

* format fixes

* format fixes

* fix

* tweaked wording of cfund alert box

* added spending-from-coldstaking test

* updated rpc-tests.py

* removed extra file, updated coldstaking tests

* Update qa/pull-tester/rpc-tests.py

delete reference to deleted file

* Updated release notes with a draft of the cold staking notes

* Added draft release notes

* Tweaked draft release notes

* added notes about Marcus's testing

* fix word

* Update doc/release-notes/release-notes-4.5.0.md

Co-Authored-By: aguycalled <alex@encrypt-s.com>

* add sleep to spending test

* coldstaking spending test fix

* increase fee spending cs test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants