Skip to content

Conversation

RodrigoVillar
Copy link
Contributor

Why this should be merged

For load-testing the C-Chain, we modify the chain's gas-per-second via the GasTarget config field. However, going from MinTargetPerSecond to GasTarget requires a non-negligible ramp-up period, which isn't ideal if we're running load tests on expensive hardware. This ramp-up period is a result of the target gas excess going from 0 to the desired target excess, which is regulated by MaxTargetExcessDiff.

How this works

This PR extends the Coreth config by adding a InitialTargetExcess field. This field is applied to the first block and allows clients to reduce the ramp-up period by having the target gas excess start from InitialTargetExcess instead of 0.

How this was tested

Ran load test with InitialTargetExcess and GasTarget set to desired values.

Need to be documented?

Yes

Need to update RELEASES.md?

Yes

@RodrigoVillar RodrigoVillar self-assigned this Jul 15, 2025
@RodrigoVillar RodrigoVillar marked this pull request as ready for review July 15, 2025 19:59
@RodrigoVillar RodrigoVillar requested a review from a team as a code owner July 15, 2025 19:59
}

var state acp176.State
var state acp176.State = acp176.State{TargetExcess: InitialTargetExcess}
Copy link
Collaborator

@ceyonur ceyonur Jul 15, 2025

Choose a reason for hiding this comment

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

this won't result in the desired effect if you also set desiredTargetExcess (even if it does we should not use it like that). We should set MaxTargetExcessDiff to a higher value (or disable smoothing here)

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.

2 participants