Skip to content

Modify the pricing model#771

Merged
erikzhang merged 12 commits intomasterfrom
3.0/pricing-model
May 24, 2019
Merged

Modify the pricing model#771
erikzhang merged 12 commits intomasterfrom
3.0/pricing-model

Conversation

@erikzhang
Copy link
Member

@erikzhang erikzhang commented May 22, 2019

Closes #286

  1. Redefine the price of all OpCodes.
  2. Redefine the price of all SYSCALLs.
  3. Define the price of NativeContracts.
  4. Storage is charged in bytes.
  5. Modify the price of contract deployment. (100 for deployment, and 10 for migration)
  6. Remove the 10 free gas for each invocation.
  7. Limit the gas for transactions' verification to 0.1 gas.

@erikzhang erikzhang added this to the NEO 3.0 milestone May 22, 2019
@codecov-io
Copy link

codecov-io commented May 22, 2019

Codecov Report

Merging #771 into master will increase coverage by 1.09%.
The diff coverage is 95.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #771      +/-   ##
==========================================
+ Coverage      37%   38.09%   +1.09%     
==========================================
  Files         173      174       +1     
  Lines       12467    12661     +194     
==========================================
+ Hits         4613     4823     +210     
+ Misses       7854     7838      -16
Impacted Files Coverage Δ
neo/SmartContract/Helper.cs 42.64% <0%> (ø) ⬆️
neo/Network/P2P/Payloads/Transaction.cs 61.87% <0%> (ø) ⬆️
neo/Network/P2P/Payloads/BlockBase.cs 72.3% <0%> (ø) ⬆️
neo/Network/P2P/Payloads/ConsensusPayload.cs 81.15% <0%> (ø) ⬆️
neo/SmartContract/InteropService.cs 15.69% <100%> (+1.4%) ⬆️
neo/SmartContract/Native/NativeContract.cs 84.09% <100%> (+1.16%) ⬆️
neo/SmartContract/Native/Tokens/NeoToken.cs 62.37% <100%> (+1.02%) ⬆️
...eo/SmartContract/ApplicationEngine.OpCodePrices.cs 100% <100%> (ø)
neo/SmartContract/Native/Tokens/Nep5Token.cs 98.23% <100%> (+0.05%) ⬆️
neo/SmartContract/Native/PolicyContract.cs 100% <100%> (ø) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e6269b...49f0cbd. Read the comment docs.

@erikzhang erikzhang marked this pull request as ready for review May 22, 2019 15:57
@erikzhang erikzhang requested a review from shargon May 24, 2019 03:35
@erikzhang
Copy link
Member Author

@neo-project/core

@shargon
Copy link
Member

shargon commented May 24, 2019

The prices could have a multiply factor stored in the Policy Contract then, the CN will be able to increment or decrement according to the Gas Price, for example, only once per month

@erikzhang
Copy link
Member Author

erikzhang commented May 24, 2019

The fees are distributed to NEO holders, not to the consensus nodes. Changing the factor is a protocol change.

We can treat the current factor is 1. If we change it later, the Transaction.Version should be changed too. It can't decided by consensus nodes.

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

We should discuss later about the max free gas per transaction

@erikzhang
Copy link
Member Author

@shargon Can you create a separate issue for discussing this?

@erikzhang erikzhang merged commit 172358d into master May 24, 2019
@erikzhang erikzhang deleted the 3.0/pricing-model branch May 24, 2019 09:30
@dicarlo2
Copy link

Storage is charged in bytes.

Yay!

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.

Adjusting the system pricing model

4 participants