Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

ethcore: mcip3 block reward contract #9605

Merged
merged 6 commits into from
Oct 3, 2018
Merged

Conversation

andresilva
Copy link
Contributor

Merge only after #9603.

Implements the Musicoin block reward logic in a contract using blockRewardContractCode. The contract and instructions on how to build can be found at https://gist.github.com/andresilva/6f2afaf9486732a0797f4bdeae018ee9. I have successfully synced the musicoin chain using this contract but would appreciate it if someone else could try as well.

@andresilva andresilva added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Sep 20, 2018
This was referenced Sep 20, 2018
@5chdn 5chdn added this to the 2.2 milestone Sep 20, 2018
@ghost
Copy link

ghost commented Sep 20, 2018

@andresilva @sorpaas Thanks 👍

@ghost
Copy link

ghost commented Sep 20, 2018

@sorpaas @andresilva Hello may I ask it is possible to implement this contract with block height counts? We have two hardfork exists and we need to change the block reward at the specific height

"mcip3UbiContract":"0x00efdd5883ec628983e9063c7d969fe268bbf310",
"mcip3DevReward":"0xc249fdd327780000",
"mcip3DevContract":"0x00756cf8159095948496617f5fb17ed95059f536",
"blockRewardContractTransition": "0x124f81",
Copy link

Choose a reason for hiding this comment

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

It will be great when we have transition height inside contract

@andresilva
Copy link
Contributor Author

@eosclassicteam The contract has access to the block number so the transitions should be implemented inside the contract.

if (block.number > 1000) {
  // new reward logic
} else {
  ...
}

@ghost
Copy link

ghost commented Sep 20, 2018

@andresilva Thanks, also I would like to suggest changing ECIP-1017 to contract 😄

@5chdn 5chdn added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Sep 27, 2018
Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

Tested a sync of the musicoin chain

@ascjones
Copy link
Contributor

ascjones commented Oct 3, 2018

@andresilva I think you need to merge latest CI changes

@sorpaas sorpaas added A7-looksgoodcantmerge 🙄 Pull request is reviewed well, but cannot be merged due to conflicts. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Oct 3, 2018
@sorpaas sorpaas added A8-looksgood 🦄 Pull request is reviewed well. and removed A7-looksgoodcantmerge 🙄 Pull request is reviewed well, but cannot be merged due to conflicts. labels Oct 3, 2018
@andresilva
Copy link
Contributor Author

I added a comment pointing to the source of the block reward contract. I also removed the mcip6_byz chain spec which seemed to be unused.

@5chdn 5chdn merged commit 5b87327 into master Oct 3, 2018
@5chdn 5chdn deleted the andre/mcip3-block-reward-contract branch October 3, 2018 11:44
dvdplm added a commit that referenced this pull request Oct 4, 2018
…mon-deps

* origin/master:
  Add Foundation Bootnodes (#9666)
  Docker: run as parity user (#9689)
  ethcore: mcip3 block reward contract (#9605)
  Verify block syncing responses against requests (#9670)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants