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

Netmarble v2.0 #7

Draft
wants to merge 24 commits into
base: netmarble_v2.0_audit
Choose a base branch
from
Draft

Netmarble v2.0 #7

wants to merge 24 commits into from

Conversation

xuan-io
Copy link
Contributor

@xuan-io xuan-io commented Jan 17, 2023

1. Requirements

A new economic system

  • Block mint tokens are distributed proportionally to (Validator, Operation, ecosystem, and Partner Wallet).
  • All transaction fees are sent to a foundation wallet
  • At a certain height will not be in mint

Gas price

  • Gas price is controlled by chain management

2. Implementation

2.1 There will be two hardforks

The first hard fork will increase limitations on the size of deployment contract from 24K to 48K just like Shanghai Upgrade. The motivation of this feature is to enable us to add more functionality into the system contracts, like stake contracts .

The second hard fork will enable the new block reward distribution mechanism and the on-chain gas price governance module .
The operator needs to complete after contract48kBlock and before fncy2Block
Upgrade chainconfig and staking contracts
After upgrading the staking and chainconfig contracts, modify the allocation information of block mint, foundation wallet address and gas price

2.2 Code 

2.2.1 A new economic system

Parlia::distributeRewards distributes rewards by calling the contract (staking::distributeRewards)
staking::distributeRewards configuration information from the chainconfig contract

2.2..2 Gas price

The gas price is controlled by the contract chainconfig, which retrieves the gas price when the transaction pool resets as the gas price of the transaction pool, thus preventing transactions below the gas price from entering the transaction pool

2.2.3 Genesis.json Add param example:

 "contract48kBlock":10, deployment contract from 24K to 48K
 "fncy2Block":3910, a new economic system
  parlia."stopMintBlock": 4135, height will not be in mint

eric and others added 24 commits December 23, 2022 17:45
2. fix bug that get gasPrice from contract
2. fix bug that get gasPrice from contract
2. fix bug that get gasPrice from contract
2. fix bug that get gasPrice from contract
fncy2: optimize the function of api_backend.go::SuggestPrice
fix::fncy2 SuggestPrice always returns gasPrice which from the contract
fix:fncy2 gpo.DefaultPrice causes the bug that suggestPrice is unreas…
fix:set the code of  eth.gasPrice location error
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