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

Community fund contribution increase Soft Fork #12

Merged
merged 34 commits into from
Sep 19, 2018
Merged

Community fund contribution increase Soft Fork #12

merged 34 commits into from
Sep 19, 2018

Conversation

red010b37
Copy link

Here is my first crack at the soft fork, @aguycalled can you take a look and see if Im missing anything

red010b37 and others added 30 commits August 3, 2018 15:24
…-update

# Conflicts:
#	doc/release-notes/release-notes-4.3.0.md
@red010b37 red010b37 changed the base branch from master to cfund-db September 11, 2018 04:57
src/main.cpp Outdated
{
nStakeReward -= Params().GetConsensus().nCommunityFundAmountV2 * nMultiplier;
}

Copy link
Owner

Choose a reason for hiding this comment

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

in case the Community Fund Amount v2 Soft Fork is enabled, here you would be subtracting (nCommunityFundAmount * nMultiplier)+(nCommunityFundAmountV2 * nMultiplier), allowing the block staker to generate for himself (nCommunityFundAmount * nMultiplier) amount of extra coins.

Copy link
Author

Choose a reason for hiding this comment

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

serious brain fade there :(

Copy link
Owner

@aguycalled aguycalled left a comment

Choose a reason for hiding this comment

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

This pull request includes all the logic to verify if a block includes the new amount of CFund contribution once the soft fork is activated, but misses the changes to contribute the new amount on the wallet's own staked blocks.
It also includes a bug which would allow the extra minting of coins.
Needs to be fixed.

@aguycalled
Copy link
Owner

Everything looks good now, pending testing

@aguycalled aguycalled changed the title Community fund contribution increase -DONT MERGE Community fund contribution increase Soft Fork Sep 19, 2018
@aguycalled aguycalled merged commit 2dff1c0 into aguycalled:cfund-db Sep 19, 2018
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Oct 13, 2018
* restart testnet / increase pow last block (navcoin#287)

* Remove support for navcoin:// (navcoin#292)

* Remove support for navcoin://

* dummy navcoin address

* Adds new Cfund related RPC tests
qa/rpc-tests/cfund-proposal-state-accept.py
qa/rpc-tests/cfund-proposal-state-expired.py

* Fix reset of votes for proposals and payment requests

* Avoid negative amount of votes when disconecting tip

* Avoid negative amount of votes when disconnecting tip

* Community fund contribution increase  -DONT MERGE (aguycalled#12)

Community fund contribution increase Soft Fork

* update tests

* Adds version bit rejection code

* Revert "Adds version bit rejection code"

This reverts commit 57c5e77

* Adds versionbit rejection code (aguycalled#15)

* Adds versionbit rejection code

* Adds begining of 4.4.0 release notes

* Updates release notes to read better

* Updates version bit check statement to ony check on the STARTED state

* Removes log

* add reject version bit test

* Adds rejectversion bit help

* Fixes navcoin#298: add proposal minimal fee to cfundstats

* Fixes navcoin#289: update dnssec root-zone trust-anchors

* do not erase prop/preq when verifying chain

* do not count rejected preqs when creating a new one

* Allow getrawtransaction verbose mode to be activated with int or bool (navcoin#301)

* Support boolean flag for getrawtransaction:verbose

* formatting

* must equal 1 not !0

* Don't throw errors when value is not 1 or true

* use !=0 to make non verbose mode less ambiguous

* comunnity fund state transition
- .blockhash now reflects the hash of the block where
  the state transitioned for the last time
- approvedOnBlock is renamed to stateChangedOnBlock
- state is reverted to NIL when stateChangedOnBlock block
  is disconnected
- no longer uses a different block offset when disconnecting
  blocks and recounting votes

* Changed proposal expiry status checking. (aguycalled#16)

* double check for sanity

* fix wrong function

* Adds rpc tests (aguycalled#17)

* Adds rpc tests

* fixes rpc test runner

* moves slow_gen to a utility

* Fixes wallet rpc tests

* changed cfundstats descr for voted prequests (aguycalled#18)

* Release candidate v4.4.0-rc

* update translations

* cfund soft fork mainnet

* v4.4.40 release notes

* Paymentrequests summing over the proposal test (aguycalled#21)

* Adds test for navcoin#307

* updates to python

* fix write db individual

* update extract funds rpc test

* Removes wallet rpc test

* Adds the community fund RPC commands to the release notes

* Links npip0003 in release notes to the repo

* Links npip0004 in release notes to the repo

* Fixes text

* Fixes RPC documentation

* Adds listproposal to the release notes

* Fixes headings

* Adds listpropsals and cfuntstats help

* Adds Cfund amount checks (aguycalled#22)

* Created payment request injection file.

* Created payment request injection file and modified miner.

* Adds miner lines back in

* Rejects block if payment Proposal or Payment Request amounts are less than 0

* Removes unused space

* Updates is valid proposal and payment requests

* fixes checks

* fixes checks

* Changing injection tests

* Changing injection tests

* Changing injection tests

* Fixes typo

* Code formatting
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Feb 3, 2019
Community fund contribution increase Soft Fork
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Feb 3, 2019
* restart testnet / increase pow last block (navcoin#287)

* Remove support for navcoin:// (navcoin#292)

* Remove support for navcoin://

* dummy navcoin address

* Adds new Cfund related RPC tests
qa/rpc-tests/cfund-proposal-state-accept.py
qa/rpc-tests/cfund-proposal-state-expired.py

* Fix reset of votes for proposals and payment requests

* Avoid negative amount of votes when disconecting tip

* Avoid negative amount of votes when disconnecting tip

* Community fund contribution increase  -DONT MERGE (aguycalled#12)

Community fund contribution increase Soft Fork

* update tests

* Adds version bit rejection code

* Revert "Adds version bit rejection code"

This reverts commit 57c5e77

* Adds versionbit rejection code (aguycalled#15)

* Adds versionbit rejection code

* Adds begining of 4.4.0 release notes

* Updates release notes to read better

* Updates version bit check statement to ony check on the STARTED state

* Removes log

* add reject version bit test

* Adds rejectversion bit help

* Fixes navcoin#298: add proposal minimal fee to cfundstats

* Fixes navcoin#289: update dnssec root-zone trust-anchors

* do not erase prop/preq when verifying chain

* do not count rejected preqs when creating a new one

* Allow getrawtransaction verbose mode to be activated with int or bool (navcoin#301)

* Support boolean flag for getrawtransaction:verbose

* formatting

* must equal 1 not !0

* Don't throw errors when value is not 1 or true

* use !=0 to make non verbose mode less ambiguous

* comunnity fund state transition
- .blockhash now reflects the hash of the block where
  the state transitioned for the last time
- approvedOnBlock is renamed to stateChangedOnBlock
- state is reverted to NIL when stateChangedOnBlock block
  is disconnected
- no longer uses a different block offset when disconnecting
  blocks and recounting votes

* Changed proposal expiry status checking. (aguycalled#16)

* double check for sanity

* fix wrong function

* Adds rpc tests (aguycalled#17)

* Adds rpc tests

* fixes rpc test runner

* moves slow_gen to a utility

* Fixes wallet rpc tests

* changed cfundstats descr for voted prequests (aguycalled#18)

* Release candidate v4.4.0-rc

* update translations

* cfund soft fork mainnet

* v4.4.40 release notes

* Paymentrequests summing over the proposal test (aguycalled#21)

* Adds test for navcoin#307

* updates to python

* fix write db individual

* update extract funds rpc test

* Removes wallet rpc test

* Adds the community fund RPC commands to the release notes

* Links npip0003 in release notes to the repo

* Links npip0004 in release notes to the repo

* Fixes text

* Fixes RPC documentation

* Adds listproposal to the release notes

* Fixes headings

* Adds listpropsals and cfuntstats help

* Adds Cfund amount checks (aguycalled#22)

* Created payment request injection file.

* Created payment request injection file and modified miner.

* Adds miner lines back in

* Rejects block if payment Proposal or Payment Request amounts are less than 0

* Removes unused space

* Updates is valid proposal and payment requests

* fixes checks

* fixes checks

* Changing injection tests

* Changing injection tests

* Changing injection tests

* Fixes typo

* Code formatting
aguycalled pushed a commit that referenced this pull request Feb 11, 2019
aguycalled pushed a commit that referenced this pull request May 12, 2019
aguycalled pushed a commit that referenced this pull request Dec 5, 2019
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.

2 participants