Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Problem: nowhere to pay fees to (CRO-94) #72

Merged
merged 8 commits into from
May 6, 2019

Conversation

tomtau
Copy link
Contributor

@tomtau tomtau commented May 3, 2019

This a work-in-progress PR that will lead to a simple transaction fee system, sketched out in the specs: https://github.com/crypto-com/chain-docs/blob/master/docs/staking.md#transaction-fee

I guess I'll split it into two PRs -- this one will just add a InitChain initialisation of the rewards pool; the other PR will then extend TX, add fee-related network parameters and TX fee validation logic.

(reward distribution will be then another PR some time in the future)

added @CeruleanAtMonaco as a reviewer to double check the initialisation assumption, as she authored the ERC20 contract. The assumption is that the rewards pool will be initialised from:

  1. long term incentive address
  2. secondary distribution and launch incentive address -- this one is actually two addresses, as the contract periodically releases some amount

This change is Reviewable

tomtau added 4 commits May 2, 2019 10:02
Solution: added a basic definition + refactor around BlockHeight opaque type:
* removed error-prone deref in coin
* removed ABCI sanity checks, as they should be done in the ABCI library (added a link to the issue)
Solution: extended InitConfig to contain the dedicated ERC20 addresses that will form the rewards pool at genesis
fixed chain-core dependencies
changed dev-utils to allow a more flexible config generation
tomtau added 2 commits May 6, 2019 11:34
Solution: extracted out app_hash computation into chain-core's `computer_app_hash` and extended InitChain handling
@tomtau tomtau marked this pull request as ready for review May 6, 2019 04:03
@tomtau
Copy link
Contributor Author

tomtau commented May 6, 2019

@devashishdxt you can check this one.
even this "split" PR is a bit bigger change, so https://reviewable.io/reviews/crypto-com/chain/72#- could help

@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@0031c1e). Click here to learn what that means.
The diff coverage is 60.72%.

@@            Coverage Diff            @@
##             master      #72   +/-   ##
=========================================
  Coverage          ?   73.68%           
=========================================
  Files             ?       73           
  Lines             ?     4549           
  Branches          ?        0           
=========================================
  Hits              ?     3352           
  Misses            ?     1197           
  Partials          ?        0
Impacted Files Coverage Δ
chain-abci/src/storage/mod.rs 30% <ø> (ø)
chain-core/src/tx/mod.rs 86.66% <ø> (ø)
chain-core/src/init/coin.rs 63.54% <ø> (ø)
dev-utils/src/commands/genesis_command.rs 0% <0%> (ø)
client-index/src/index/default_index.rs 91.17% <100%> (ø)
chain-abci/src/storage/tx.rs 89.87% <100%> (ø)
chain-abci/src/app/query.rs 81.03% <100%> (ø)
chain-core/src/common/merkle.rs 77.33% <100%> (ø)
client-common/src/tendermint/types/genesis.rs 84.9% <100%> (ø)
chain-core/src/lib.rs 100% <100%> (ø)
... and 6 more

devashishdxt
devashishdxt previously approved these changes May 6, 2019
chain-core/src/lib.rs Outdated Show resolved Hide resolved
Solution: removed .iter() calls where possible
@tomtau
Copy link
Contributor Author

tomtau commented May 6, 2019

@tomtau tomtau merged commit dd9cd13 into crypto-com:master May 6, 2019
@tomtau tomtau deleted the feature/simple-fees branch May 6, 2019 08:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants