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: fix application of the core chain-wide parameters; chores #4697

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

0x009922
Copy link
Contributor

@0x009922 0x009922 commented Jun 6, 2024

Description

While working on #4516, I experimented with extreme reduction of consensus timings, i.e. block_time and commit_time. Those are configured by NewParameter and SetParameter ISIs (until #4028). It turned out that there are a few issues in iroha_core:

  • In some places it relies on hardcoded DEFAULT_CONSENSUS_ESTIMATION (4 seconds) for no reason, leading to some bugs, e.g. improper time triggers execution. I made it rely on the values in the actual State config.
  • Config in the State was not updated immediately when relevant ISI executed, leading Iroha to ignore updates that actually affect its behaviour, which caused desynchronisation and unexpectedly long block times when the config values are small.

So, this PR "tightens" these gaps and makes parameters application preciser.

This PR doesn't introduce changes to the tests themselves, as I am still experimenting with it.

Linked issue

None

Benefits

More expected behaviour of the chain-wide parameters.

@0x009922 0x009922 self-assigned this Jun 6, 2024
@0x009922 0x009922 marked this pull request as ready for review June 6, 2024 08:32
@Erigara Erigara self-assigned this Jun 6, 2024
Erigara
Erigara previously approved these changes Jun 6, 2024
dima74
dima74 previously approved these changes Jun 10, 2024
@0x009922 0x009922 force-pushed the fix-core-params-apply branch from 1704e1c to 661f159 Compare June 11, 2024 07:57
@0x009922 0x009922 force-pushed the fix-core-params-apply branch from 661f159 to 2f243d1 Compare June 11, 2024 08:09
@0x009922 0x009922 requested a review from dima74 June 11, 2024 08:09
@0x009922 0x009922 force-pushed the fix-core-params-apply branch from 2f243d1 to d75b536 Compare June 11, 2024 08:26
@0x009922 0x009922 merged commit cfcc6b5 into hyperledger-iroha:main Jun 11, 2024
10 of 11 checks passed
@0x009922 0x009922 deleted the fix-core-params-apply branch June 11, 2024 08:26
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.

3 participants