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: improve price cap configuration #101

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

ali-bahjati
Copy link
Collaborator

@ali-bahjati ali-bahjati commented Dec 13, 2023

The old max cost for total transaction didn't make sense as everything is handled in the per compute unit pricing and in the grand scheme of things we care about the price of an update not a transaction (which can have between 1 to 12 updates). This will make the behaviour simpler. Also, there were cases where the tx had little updates and the per compute unit price went very high and it impacted other publishers.

This is a non-breaking change because the config reader ignores incorrect fields (I checked it).

The default cap is also changed to 10 million as there have been spikes up to 6 million in the past. If publishers have working ws + short pulls. For this reason I changed the default for pull duration to 5 seconds which can have bad impact on Pythnet but the network load is not that high.

I considered injecting slot data via websocket and polling to make sure the global data is up to date but there is no way to subscribe to latest confirmed slot and also relying on the context for the updates won't be useful (because if there is no update coming, we don't know whether it is a websocket problem or not any actual update).

After this rollout, we won't have massive sol burn incident anymore because we always halve the median of the minimum landed tx over the past slots (whereas previously we just used that value).

@ali-bahjati ali-bahjati force-pushed the agent/improve-dynamic-pricing branch 3 times, most recently from 198d4bb to 82936fe Compare December 13, 2023 13:41
@ali-bahjati ali-bahjati force-pushed the agent/improve-dynamic-pricing branch from 82936fe to a3f6b12 Compare December 13, 2023 15:32
@ali-bahjati ali-bahjati merged commit c76ccc4 into main Dec 13, 2023
2 checks passed
@ali-bahjati ali-bahjati deleted the agent/improve-dynamic-pricing branch December 13, 2023 17:02
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