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

Introduce active_transactions_config #4604

Merged

Conversation

gr0vity-dev
Copy link
Contributor

Introduce active_transactions_config :

Old config New config
active_elections_size active_transactions.size
active_elections_hinted_limit_percentage active_transactions.hinted_limit_percentage
active_elections_optimistic_limit_percentage active_transactions.optimistic_limit_percentage
confirmation_history_size active_transactions.confirmation_history_size
/ active_transactions.confirmation_cache

Newly introduced confirmation_cache is used in recently_confirmed{ config.confirmation_cache }, instead of the hardcoded value 65536

pwojcikdev
pwojcikdev previously approved these changes May 6, 2024
Copy link
Contributor

@pwojcikdev pwojcikdev left a comment

Choose a reason for hiding this comment

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

Nice cleanup. The question is whether we want to call this config [nano.active_transactions] to keep consistency with class naming (transaction name is a bit unfortunate in my opinion) or [nano.active_elections] to keep consistency with previous config naming.

@gr0vity-dev
Copy link
Contributor Author

I asked myself the same question.
Since the config also includes something unrelated like confirmation_history_size I opted to keep keep consistency with class naming rather than previous naming. (It's a breaking change either way)
Maybe we should name the entire class active_elections because it's basically a container for all ongoing elections ?

@pwojcikdev
Copy link
Contributor

Renaming the class to active_elections sounds better and should be quite easy.

@gr0vity-dev
Copy link
Contributor Author

gr0vity-dev commented May 6, 2024

I renamed active_transactions to active_elections.
So the update config looks like this :

Old config New config
active_elections_size active_elections.size
active_elections_hinted_limit_percentage active_elections.hinted_limit_percentage
active_elections_optimistic_limit_percentage active_elections.optimistic_limit_percentage
confirmation_history_size active_elections.confirmation_history_size
/ active_elections.confirmation_cache

And it can be used in the config-node.toml like this:

[node.active_elections]
    size = 5000
    hinted_limit_percentage = 20
    optimistic_limit_percentage = 10
    confirmation_history_size = 2048
    confirmation_cache = 65536

clemahieu
clemahieu previously approved these changes May 6, 2024
Copy link
Contributor

@clemahieu clemahieu left a comment

Choose a reason for hiding this comment

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

LGTM. Nice cleanup and agree on the class rename.

pwojcikdev
pwojcikdev previously approved these changes May 7, 2024
gr0vity-dev added 5 commits May 7, 2024 15:20
- remove old config variables
- active_elections_size
- active_elections_hinted_limit_percentage
- active_elections_optimistic_limit_percentage
- confirmation_history_size
@gr0vity-dev gr0vity-dev dismissed stale reviews from pwojcikdev and clemahieu via 4a00f05 May 7, 2024 13:46
@gr0vity-dev gr0vity-dev force-pushed the prs/active_transactions_config branch from 4b0434d to 4a00f05 Compare May 7, 2024 13:46
@clemahieu clemahieu merged commit f4ff734 into nanocurrency:develop May 7, 2024
24 of 26 checks passed
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