Skip to content

feat: implement gas price and gas limit customization for txsim (backport #4447) #4591

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

Draft
wants to merge 2 commits into
base: v3.x
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 16, 2025

Overview

Resolves #4445

Testing results

txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 360000 --gas-price 1.0

The fees were outrageous here - 16+ TIA. - example block

txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 720000 --gas-price 0.5

This fills 2MB with 8.25 TIA - example block

then using
txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 3600000 --gas-price 0.1

works and 2MB costs 1.65 TIA, much more reasonable - example block

Failed testing

this also failed but idk why

txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 18000000 --gas-price 0.02

Error: error funding accounts: broadcast tx error: insufficient minimum gas price for this node; got: 72000 required at least: 360000.000000000000000000: insufficient fee

going lower

txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 12000000 --gas-price 0.03

Error: error funding accounts: broadcast tx error: insufficient minimum gas price for this node; got: 108000 required at least: 360000.000000000000000000: insufficient fee

and up a bit:

txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 15000000 --gas-price 0.03

Error: error funding accounts: broadcast tx error: insufficient minimum gas price for this node; got: 108000 required at least: 360000.000000000000000000: insufficient fee

This is an automatic backport of pull request #4447 done by [Mergify](https://mergify.com).

<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

Resolves #4445

<!--
Please provide an explanation of the PR, including the appropriate
context,
background, goal, and rationale. If there is an issue with this
information,
please provide a tl;dr and link the issue.
-->

## Testing results

`txsim --key-path ~/.celestia-app --grpc-endpoint
validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4
--blob-amounts 1 --blob-sizes 475000 --gas-limit 360000 --gas-price 1.0`

The fees were outrageous here - 16+ TIA. - [example
block](https://arabica.celenium.io/block/4973806?tab=transactions)

`txsim --key-path ~/.celestia-app --grpc-endpoint
validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4
--blob-amounts 1 --blob-sizes 475000 --gas-limit 720000 --gas-price 0.5`

This fills 2MB with 8.25 TIA - [example
block](https://arabica.celenium.io/block/4973865?tab=transactions)

then using
`txsim --key-path ~/.celestia-app --grpc-endpoint
validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4
--blob-amounts 1 --blob-sizes 475000 --gas-limit 3600000 --gas-price
0.1`

works and 2MB costs 1.65 TIA, much more reasonable - [example
block](https://arabica.celenium.io/block/4973906?tab=transactions)

### Failed testing

this also failed but idk why
```
txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 18000000 --gas-price 0.02

Error: error funding accounts: broadcast tx error: insufficient minimum gas price for this node; got: 72000 required at least: 360000.000000000000000000: insufficient fee
```

going lower
```
txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 12000000 --gas-price 0.03

Error: error funding accounts: broadcast tx error: insufficient minimum gas price for this node; got: 108000 required at least: 360000.000000000000000000: insufficient fee
```

and up a bit:
```
txsim --key-path ~/.celestia-app --grpc-endpoint validator-1.celestia-arabica-11.com:9090 --feegrant --blob 4 --blob-amounts 1 --blob-sizes 475000 --gas-limit 15000000 --gas-price 0.03

Error: error funding accounts: broadcast tx error: insufficient minimum gas price for this node; got: 108000 required at least: 360000.000000000000000000: insufficient fee
```

---------

Co-authored-by: Rootul P <[email protected]>
(cherry picked from commit ba3a448)

# Conflicts:
#	test/cmd/txsim/cli.go
#	test/txsim/run.go
@mergify mergify bot requested a review from a team as a code owner April 16, 2025 12:16
@mergify mergify bot added the conflicts label Apr 16, 2025
@mergify mergify bot requested review from cmwaters and ninabarbakadze April 16, 2025 12:16
Copy link
Contributor Author

mergify bot commented Apr 16, 2025

Cherry-pick of ba3a448 has failed:

On branch mergify/bp/v3.x/pr-4447
Your branch is up to date with 'origin/v3.x'.

You are currently cherry-picking commit ba3a448.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   test/txsim/account.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   test/cmd/txsim/cli.go
	both modified:   test/txsim/run.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added the bot item was created by a bot label Apr 16, 2025
@evan-forbes evan-forbes enabled auto-merge (squash) April 16, 2025 13:09
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

golangci-lint is failing

@rootulp rootulp marked this pull request as draft April 16, 2025 14:39
auto-merge was automatically disabled April 16, 2025 14:39

Pull request was converted to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot item was created by a bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants