-
Notifications
You must be signed in to change notification settings - Fork 93
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
SIMD-0172: Reduce default CU per instruction #172
base: main
Are you sure you want to change the base?
SIMD-0172: Reduce default CU per instruction #172
Conversation
|
on 2: perhaps another two u32 for the heap limit + loaded data limit. All of this together is less than the 32 byte CB pubkey |
Once this is implemented, we could eventually move all limits set by compute-budget instructions into the Transaction Header, allowing us to retire the compute-budget program entirely. However, that's outside the scope of this proposal. |
`set-compute-unit-limit` for their transactions to ensure accurate compute unit | ||
allocation. However, adding compute-budget instructions reduces the available | ||
space within the 1232-byte transaction limit, which could pose challenges for | ||
some developers. |
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.
add concerns of compute-budget instructions would further reduce tx space. (thanks @cavemanloverboy for bring it up).
Both CB instructions take up tx space and consume CU budget, can be addressed, in longer term, but replacing CB program with Transaction Header, or similar approaches. In immediate term, if absolutely necessary, could take Alternative #1 approach (eg lower to a value that reduce over-estimation yet not force devs to include CB ixs), only necessary.
overall I like this proposal! My recommendation would be to set the default to the minimum required by an instruction. As far as I can tell that would be 150CU per instruction. You write in 3. that simple transactions are not affected. Is that an explicit feature of this SIMD? Or how would that work exactly? |
I have spent zero seconds fully thinking through the implications of this suggestion, but I’ll present it anyway. In order to avoid the mandatory cost of including a compute budget instruction we could advance to a world with v1 transactions that include the budget as part of the byte schema. One nice side effect of this is that once v1 transactions become mandatory, as specified in this SIMD, apps can completely drop support for v0 and legacy transactions. |
If your going to make such sweeping changes it needs to be focused on the long term Adding an interim fix just adds more pain for developers Priority fee & cu budget should be in the headers in a new txn version to take up minimal space rather than further reducing the available byte space for instructions, it's already hard enough fitting more complex instructions without loosing an additional 42 bytes for an "interim" fix |
Agree with all of the above, I don't think I've seen a SIMD more fitting for a new tx version since versioned txs were introduced:
This change is focused on the long term anyway, why make it a short-term devex pain when this can be avoided? |
Some random notes from twitter convos so they don't get lost:
|
Also: have we measured/estimated what kind of impact is this going to have? |
This SIMD would mean that any durable nonced transactions created before this change would probably not be valid anymore. Durable nonced transactions don’t currently have an expected expiration date. We make use of nonced transactions to allow us to close dormant accounts, along with a number of other use cases. Often it is not possible to get a new signature. |
SIMD-0170 makes all builtin instructions consume exact CUs without the need of explicit set-compute-unit-limit. |
Did some data analysis on this, it'd impact roughly ~11% of all transactions in the past 30 days in current state. |
semilog plots are your friend |
I analyzed transaction size limitations to better understand the fail rate mentioned above from a user perspective. Transactions with enough space to include a compute-unit-limit instruction can be updated to continue functioning under the reduced DEFAULT environment. However, for transactions with less than 32 bytes of available space, more extensive work will be required for upgrades. To determine how many transactions in mainnet-beta fall into this second category, I examined 654,431,955 'non-vote and no CU-limit' transactions. The table below shows the number of these transactions as the DEFAULT limit is lowered.
So, if we lower DEFAULT to |
No description provided.