-
Notifications
You must be signed in to change notification settings - Fork 425
Multi constraint pricing system #2988
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
base: master
Are you sure you want to change the base?
Multi constraint pricing system #2988
Conversation
… constraint-based-pricing-for-arbitrum-chains.mdx
|
@asomani-ocl is attempting to deploy a commit to the Offchain Labs - AF Billed Team on Vercel. A member of the Team first needs to authorize it. |
leeederek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid using Constraints in our public references (as much as possible). The entire new pricing algorithm is called Dynamic Pricing. I tried to catch and suggest changes where it made sense, but i might've missed a few. Thanks!
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-configure-your-chain/common-configurations/constraint-based-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
…igurations/dynamic-pricing-for-arbitrum-chains.mdx Co-authored-by: Derek Lee <[email protected]>
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
|
|
||
| ## How to set multiple gas targets | ||
|
|
||
| You can call `SetGasPricingConstraints` on the [ArbOwner precompile](../../../for-devs/dev-tools-and-resources/partials/precompile-tables/_ArbOwner) with an array of gas targets (the code refers to these targets as "constraints"), where each constraint contains \[gasTargetPerSecond, adjustmentWindowSeconds, startingBacklogValue\]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| You can call `SetGasPricingConstraints` on the [ArbOwner precompile](../../../for-devs/dev-tools-and-resources/partials/precompile-tables/_ArbOwner) with an array of gas targets (the code refers to these targets as "constraints"), where each constraint contains \[gasTargetPerSecond, adjustmentWindowSeconds, startingBacklogValue\]. | |
| You can call `SetGasPricingConstraints` on the [ArbOwner precompile](../../../for-devs/dev-tools-and-resources/partials/precompile-tables/_ArbOwner) with an array of gas targets (the code refers to these targets as "constraints"), where each constraint contains `\[gasTargetPerSecond, adjustmentWindowSeconds, startingBacklogValue\]`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leeederek should this be in block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which word are you referring to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[gasTargetPerSecond, adjustmentWindowSeconds, startingBacklogValue]
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
| [State Growth Guidance](../../maintain-your-chain/guidance/state-growth): Impact of high gas targets on state growth and its consequences | ||
|
|
||
| - node_throughput \- Sustainable maximum throughput that the nodes can maintain without any issues. This is highly dependent on your specific hardware and chain workload. Offchain Labs will soon publish testing frameworks and tools that can be used to benchmark what throughput your nodes can handle for various workloads. | ||
| - gas_limit \- Theoretical max block size limit. With the introduction of the `MaxTxGasLimit`, the effective block gas limit is twice the `MaxBlockGasLimit`. We recommend using an in-between value of `MaxBlockGasLimit` and Effective Block gas limit `(MaxTxGasLimit + MaxBlockGasLimit)` for this parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anegg0 we should add a link to the explanation in docs on effective block gas limit
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Show resolved
Hide resolved
Co-authored-by: Daniel Lumi <[email protected]>
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
...-chain/02-configure-your-chain/common-configurations/dynamic-pricing-for-arbitrum-chains.mdx
Outdated
Show resolved
Hide resolved
|
|
||
| - node_throughput \- Sustainable maximum throughput that the nodes can maintain without any issues. This is highly dependent on your specific hardware and chain workload. Offchain Labs will soon publish testing frameworks and tools that can be used to benchmark what throughput your nodes can handle for various workloads. | ||
| - gas_limit \- Theoretical max block size limit. With the introduction of the `MaxTxGasLimit`, the effective block gas limit is twice the `MaxBlockGasLimit`. We recommend using an in-between value of `MaxBlockGasLimit` and Effective Block gas limit `(MaxTxGasLimit + MaxBlockGasLimit)` for this parameter. | ||
| - max_rate_of_increase_percent_per_second \- maximum allowed rate of increase in the fee per sec when the chain is working at the max capacity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - max_rate_of_increase_percent_per_second \- maximum allowed rate of increase in the fee per sec when the chain is working at the max capacity. | |
| - `max_rate_of_increase_percent_per_second` \- maximum allowed rate of increase in the fee per sec when the chain is working at the max capacity. |
|
|
||
| Refer to the definitions below to understand what each parameter means: | ||
|
|
||
| - gasTargetPerSecond \- the target gas processing rate for your Arbitrum chain \- it's the amount of gas the system aims to process each second under normal conditions. Any demand above this target will induce a gas price increase as a way to economically disincentivize usage until it gets reduced to the target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - gasTargetPerSecond \- the target gas processing rate for your Arbitrum chain \- it's the amount of gas the system aims to process each second under normal conditions. Any demand above this target will induce a gas price increase as a way to economically disincentivize usage until it gets reduced to the target. | |
| - `gasTargetPerSecond` \- the target gas processing rate for your Arbitrum chain \- it's the amount of gas the system aims to process each second under normal conditions. Any demand above this target will induce a gas price increase as a way to economically disincentivize usage until it gets reduced to the target. |
| Refer to the definitions below to understand what each parameter means: | ||
|
|
||
| - gasTargetPerSecond \- the target gas processing rate for your Arbitrum chain \- it's the amount of gas the system aims to process each second under normal conditions. Any demand above this target will induce a gas price increase as a way to economically disincentivize usage until it gets reduced to the target. | ||
| - adjustmentWindowSeconds \- time period with which the system will measure average gas demand/usage over to determine whether or not the gas price needs to be adjusted, relative to the gas target. A larger window results in more stable, predictable pricing, while a smaller window reacts aggressively to traffic spikes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - adjustmentWindowSeconds \- time period with which the system will measure average gas demand/usage over to determine whether or not the gas price needs to be adjusted, relative to the gas target. A larger window results in more stable, predictable pricing, while a smaller window reacts aggressively to traffic spikes. | |
| - `adjustmentWindowSeconds` \- time period with which the system will measure average gas demand/usage over to determine whether or not the gas price needs to be adjusted, relative to the gas target. A larger window results in more stable, predictable pricing, while a smaller window reacts aggressively to traffic spikes. |
|
|
||
| - gasTargetPerSecond \- the target gas processing rate for your Arbitrum chain \- it's the amount of gas the system aims to process each second under normal conditions. Any demand above this target will induce a gas price increase as a way to economically disincentivize usage until it gets reduced to the target. | ||
| - adjustmentWindowSeconds \- time period with which the system will measure average gas demand/usage over to determine whether or not the gas price needs to be adjusted, relative to the gas target. A larger window results in more stable, predictable pricing, while a smaller window reacts aggressively to traffic spikes. | ||
| - startingBacklogValue \- the initial amount of gas the system uses to set prices the **exact moment** the gasTargetPerSecond and adjustmentWindowSeconds get changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - startingBacklogValue \- the initial amount of gas the system uses to set prices the **exact moment** the gasTargetPerSecond and adjustmentWindowSeconds get changed. | |
| - `startingBacklogValue` \- the initial amount of gas the system uses to set prices the **exact moment** the gasTargetPerSecond and adjustmentWindowSeconds get changed. |
|
|
||
| | Param | Arbitrum One Config | | ||
| | :-------------------------------------- | :------------------ | | ||
| | long_term_gas_target | 10 Mgas/s | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | long_term_gas_target | 10 Mgas/s | | |
| | `long_term_gas_target` | 10 Mgas/s | |
| | Param | Arbitrum One Config | | ||
| | :-------------------------------------- | :------------------ | | ||
| | long_term_gas_target | 10 Mgas/s | | ||
| | node_throughput | 80 Mgas/s | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | node_throughput | 80 Mgas/s | | |
| | `node_throughput` | 80 Mgas/s | |
| | :-------------------------------------- | :------------------ | | ||
| | long_term_gas_target | 10 Mgas/s | | ||
| | node_throughput | 80 Mgas/s | | ||
| | gas_limit | 128 Mgas/s | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | gas_limit | 128 Mgas/s | | |
| | `gas_limit` | 128 Mgas/s | |
| | long_term_gas_target | 10 Mgas/s | | ||
| | node_throughput | 80 Mgas/s | | ||
| | gas_limit | 128 Mgas/s | | ||
| | max_rate_of_increase_percent_per_second | 20 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | max_rate_of_increase_percent_per_second | 20 | | |
| | `max_rate_of_increase_percent_per_second` | 20 | |
| | node_throughput | 80 Mgas/s | | ||
| | gas_limit | 128 Mgas/s | | ||
| | max_rate_of_increase_percent_per_second | 20 | | ||
| | long_term_adjustment_window_seconds | 86400 sec | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | long_term_adjustment_window_seconds | 86400 sec | | |
| | `long_term_adjustment_window_seconds` | 86400 sec | |
Thank you for contributing to our docs!
Please fill out the below to ensure your doc gets quickly approved and merged.
Description
Document type
Checklist
yarn startoryarn buildAdditional Notes