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

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

Closed
yangby-cryptape opened this issue Aug 4, 2023 · 2 comments · Fixed by #1332
Closed

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

yangby-cryptape opened this issue Aug 4, 2023 · 2 comments · Fixed by #1332
Assignees

Comments

@yangby-cryptape
Copy link
Collaborator

yangby-cryptape commented Aug 4, 2023

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

@yangby-cryptape
Copy link
Collaborator Author

Some Questions

  • Does consensus.sync_txs_chunk_size affect the consensus?

    From its name, it looks like a parameter that how many transactions can be synchronized one time.

    I'm not sure whether it's able to affect the consensus.

  • Besides accounts and consensus.sync_txs_chunk_size, is there any other parameters can affect the consensus?

    For example, crosschain_contract_address, wckb_contract_address, executor.light.

@KaoImin
Copy link
Contributor

KaoImin commented Aug 17, 2023

Does consensus.sync_txs_chunk_size affect the consensus?

No. It only controls how many transactions that will be pull once to reduce the press of network.

Besides accounts and consensus.sync_txs_chunk_size, is there any other parameters can affect the consensus?
For example, crosschain_contract_address, wckb_contract_address, executor.light.

These three configs should be removed. They are outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants