Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor the config.toml, split the consensus parameters. #1307

@chaoticlonghair

Description

@chaoticlonghair

Contact Details

No response

Propose-a-new-feature

What is "consensus parameters"?

If it changed, the chain state will be changed, then it is a consensus parameter.

Why I propose this feature?

Same reason as #1275: the executable binary should be halt when it found the consensus parameters are changed, to make sure no inconsistent data are stored.

My solution is:

  • Serialize all consensus parameters in a specify order and calculate a hash, store the hash into storage, check it when axon runs.

But the problem is:

  • Consensus parameters are not a separated.

In axon's config.toml:

  • accounts section are consensus parameters.

    [[accounts]]
    address = "0xa0ee7a142d267c1f36714e4a8f75612f20a79720"
    balance = "04ee2d6d415b85acef8100000000"

  • consensus section is consensus parameters.

    [consensus]
    sync_txs_chunk_size = 5000

  • But, other parameters are not consensus parameters, for example, http_listening_address, maxconn and log_path.

In future, there will be more consensus parameters, such as contract_limit, hardfork_height.

So, if those consensus parameters are split, things will be easier.

Alternatives you've considered

No response

Anything else?

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions