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

Add comments to FeeConfig #125

Merged
merged 3 commits into from
Jun 9, 2022
Merged

Add comments to FeeConfig #125

merged 3 commits into from
Jun 9, 2022

Conversation

aaronbuchwald
Copy link
Collaborator

This PR adds comments to the FeeConfig struct.

params/config.go Outdated
TargetGas *big.Int `json:"targetGas,omitempty"`
// GasLimit sets the max amount of gas consumed per block.
GasLimit *big.Int `json:"gasLimit,omitempty"`
// This sets the target rate of block production in seconds.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: typically comment would start with TargetBlockRate

params/config.go Outdated
// When the dynamic fee algorithm observes that network activity is above/below the [TargetGas], it increases/decreases the base fee proportionally to
// how far above/below the target actual network activity is.

// TargetGas specifies the targeted amount of gas (including block gas cost) to consume within a given 10s window.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: rolling 10s window

params/config.go Outdated
// If it is produced faster/slower, the block gas cost will be increased/decreased by the step value for each second faster/slower than the target
// block rate accordingly.
//
// Ex. if a block is produced two seconds faster than the target block rate, the block gas cost will increase by 2 * BlockGasCostStep.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Ex:

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: add a note that if you increase to a very large number, you can effectively limit block production at the target rate

@patrick-ogrady patrick-ogrady merged commit 435970c into master Jun 9, 2022
@patrick-ogrady patrick-ogrady deleted the document-fee-config branch June 9, 2022 22:16
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.

None yet

3 participants