Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yosoyubik
Copy link
Collaborator

=/ gas-limit=@ud
%+ add 22.000 :: 1.000 gas are added to the base fee for emitting the log
%+ max
(add (mul 16 p.batch-data) use-gas-price)

Choose a reason for hiding this comment

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

I don't see why the gas price comes in at this stage. If I understand the code correctly, you will end up with max-cost having a term that is quadratic in the gas price.

Choose a reason for hiding this comment

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

How about something like

=/  gas-limit=@ud
  %+  max
    (add (mul 16 p.batch-data) 22.000)
    (mul 40 p.batch-data)

Choose a reason for hiding this comment

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

Or for simplicity we could use

=/  gas-limit=@ud  (add 22.000 (mul 40 p.batch-data))
  • I'm not sure what the impact is of specifying a higher gas limit than is actually needed though.

Choose a reason for hiding this comment

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

I'm not sure what the impact is of specifying a higher gas limit than is actually needed though.

I tried reading the Ethereum docs and it seems that if you specify a higher gas limit than needed, you only get charged for the gas actually used. https://ethereum.org/en/developers/docs/gas/#what-is-gas-limit

For example, if you put a gas limit of 50,000 for a simple ETH transfer, the EVM would consume 21,000, and you would get back the remaining 29,000.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the impact is of specifying a higher gas limit

changing that is what enabled the blocked transactions in the main roller to be sent to the contract. it seems that specifying something less makes the transaction invalid and the nodes rejects them:

Any transaction with a gas limit below 21000 + TOTAL_COST_FLOOR_PER_TOKEN * tokens_in_calldata or below its intrinsic gas cost (take the maximum of these two calculations) is considered invalid.

Copy link

@resonant-riches resonant-riches Jul 30, 2025

Choose a reason for hiding this comment

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

Sorry, my phrasing wasn't clear enough. I meant "higher than is actually needed" not "higher than we are specifying now". In other words, do we have to make an accurate calculation or can we just pick any number that is greater than the minimum even if it is an overestimate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I believe any number high enough should work, and you would get the remaining back as you said.

Copy link

@resonant-riches resonant-riches left a comment

Choose a reason for hiding this comment

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

The simple version with the overestimate looks good to me. I haven't tested it though.

@resonant-riches
Copy link

resonant-riches commented Jul 30, 2025

I tested this using the method suggested in #7192 (comment) and :roller|commit no longer displays an error, but I still don't see any transaction on etherscan.

@resonant-riches
Copy link

:roller|commit no longer displays an error,

I spoke too soon, after a few minutes it said

> |mount %base
>=
> |commit %base
>=
: /~roller-dozzod-doldys/base/25/ted/roller/send/hoon
> :roller|commit
>=
Send batch thread started successfully
[%roller %send-error [%nonce 490] 'ahead-nonce']
Send batch thread started successfully
[%roller %send-error [%nonce 489] 'insufficient-roller-balance']

@resonant-riches
Copy link

I will top up the wallet and try again.

@yosoyubik
Copy link
Collaborator Author

Theres a chance that you have enough funds but you've been retrying for so long that every attempt has increased the gas assigned for this transaction to something insane

try this:

:roller|refuel 489 5.000.000 [~ 0xYOUR.ROLLER.ETH.ADDRESS]

@resonant-riches
Copy link

I messed things up by trying to rotate the account used by the roller rather than topping up the old account. But now it keeps trying to use the nonce from the old account and getting %ahead-nonce errors - but it doesn't rewind the nonce number.

@pkova pkova marked this pull request as ready for review August 4, 2025 12:19
@pkova
Copy link
Collaborator

pkova commented Aug 4, 2025

If you want to have at your roller problem synchronously you can shoot an email to [email protected], merging this fix now.

@pkova pkova merged commit af722f0 into develop Aug 4, 2025
1 check passed
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.

4 participants