Gas estimation for blob submission
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- blockchain
Research direction
Start by reading celestia-app x/blob/types/payforblob.go, especially DefaultEstimateGas() and GasToConsume(), then locate the repository's blob submission and configuration entry points. Done means a pure deterministic estimate, configurable constants and gas-price settings, and unit tests matching known celestia-app outputs without requiring network calls.
Written by the indexing model from the issue text.
Description
Summary
Implement deterministic gas estimation for MsgPayForBlobs transactions.
Parent: #4
Design
Recreate the gas estimation formula from scratch rather than importing celestia-app:
gas = gasToConsume(blobSizes, gasPerBlobByte) + (txSizeCostPerByte * bytesPerBlobInfo * numBlobs) + pfbGasFixedCost
Constants (from celestia-app, may need updating per network version):
pfbGasFixedCost = 75,000bytesPerBlobInfo = 70gasPerBlobByte = 8txSizeCostPerByte— governance parameter, query from chain or configure
Gas price
- Configurable default gas price in config
- Optional multiplier/buffer (e.g., 1.1x) to reduce "insufficient fee" rejections
- No dependency on celestia-node's gas estimator gRPC service
- Optionally query
QueryMinimumGasPrice()from a celestia-app RPC endpoint as a floor
[submission]
gas_price = 0.002 # utia per gas unit
gas_price_buffer = 1.1 # 10% buffer over minimum
max_gas_price = 0.2 # safety cap
Requirements
- Pure function: given blob sizes, return gas estimate
- No network calls required (deterministic)
- Unit tests validating against known celestia-app outputs
- Configurable constants for network upgrades
References
- celestia-app
x/blob/types/payforblob.go—DefaultEstimateGas(),GasToConsume()
- Dominant language
- Go
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from evstack/apex
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
googleapis/librarian#7670 · 2 comments ·