Chequebook deployment uses a fixed 175,000 gas limit; it needs about 630,000 under Glamsterdam (live on Sepolia since 2026-10-06)
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- blockchain
Research direction
The problematic fixed gas limit is in pkg/settlement/swap/chequebook/factory.go at line 72, used for deploySimpleSwap calls. Start by replacing the fixed 175,000 value with a gas estimation call that uses 175,000 as the minimum floor, matching the pattern from the related fix in the crtahlin/wasp fork. Two other fixed gas limits in pkg/settlement/swap/erc20/erc20.go:82 and pkg/settlement/swap/chequebook/chequebook.go:346 follow the same pattern and may need the same adjustment. Run the chequebook deployment test suite to verify the change works for post-Glamsterdam networks.
Written by the indexing model from the issue text.
Description
Context
Bee master at b19432c30bac0d22979ffc98799eae77fde577a8 (code reviewed, not run as a node). Network: Sepolia testnet, where Glamsterdam has been active since 2026-10-06 13:53:36 UTC. Measured with Foundry cast 1.8.5 against a public Sepolia RPC (geth).
Summary
pkg/settlement/swap/chequebook/factory.go:72 sends the chequebook deployment (deploySimpleSwap) with GasLimit: 175000. A non-zero GasLimit skips estimation. Glamsterdam (EIP-8037) raises CREATE to 183,600 gas, code deposit to 1,530 per byte and a new storage slot to 97,920.
The last chequebook deployment through the testnet factory before the fork used 141,905 of its 175,000 limit. On post-fork Sepolia the same call estimates at 629,945, and an eth_call at 175,000 runs out of gas.
Expected behavior
The chequebook deployment succeeds on Glamsterdam networks: gas is estimated (with the current 175,000 as a floor) rather than fixed.
Actual behavior
The deployment is sent with a fixed 175,000 gas limit. On post-fork Sepolia it needs about 630,000. A newly started swap-enabled node on Sepolia would send the deployment with 175,000 gas and, per the eth_call below, run out of gas. The same will apply on other networks when they adopt Glamsterdam.
Steps to reproduce
Sepolia, testnet factory 0x0fF044F6bB4F684a5A149B46D7eC03ea659F98A1 (from pkg/config/chain.go):
$ cast receipt 0xffe5788fd36d9b5baef11ee13aed913577502450c325b5c12109ddec585be781 --rpc-url https://rpc.sepolia.ethpandaops.io | grep -E 'blockNumber|gasUsed|status'
blockNumber 11849218
gasUsed 141905
status 1 (success)
$ cast tx 0xffe5788fd36d9b5baef11ee13aed913577502450c325b5c12109ddec585be781 gas --rpc-url https://rpc.sepolia.ethpandaops.io
175000
$ cast estimate --rpc-url https://rpc.sepolia.ethpandaops.io --from 0x54ae96b6967f9dc13d6b0ce320764a522376d809 0x0fF044F6bB4F684a5A149B46D7eC03ea659F98A1 'deploySimpleSwap(address,uint256,bytes32)' 0x54ae96b6967f9dc13d6b0ce320764a522376d809 0 0x6838e6e36468d1e308bf9b65e8d82463e51dabf1a7adab89553a311a21601272
629945
$ cast call --rpc-url https://rpc.sepolia.ethpandaops.io --from 0x54ae96b6967f9dc13d6b0ce320764a522376d809 --gas-limit 175000 0x0fF044F6bB4F684a5A149B46D7eC03ea659F98A1 'deploySimpleSwap(address,uint256,bytes32)' 0x54ae96b6967f9dc13d6b0ce320764a522376d809 0 0x6838e6e36468d1e308bf9b65e8d82463e51dabf1a7adab89553a311a21601272
Error: server returned an error response: error code -32003: out of gas
The issuer and salt are random. The call has the same shape as init.go: Deploy(ctx, overlayEthAddress, big.NewInt(0), nonce).
Possible solution
Estimate gas for the deployment, using the current 175,000 as the floor.
Related:
- The same limit is in the fork crtahlin/wasp (issue #541), fixed there in #546 by estimating gas with the old value as a floor.
- Two other fixed limits follow the same pattern and were not measured here:
pkg/settlement/swap/erc20/erc20.go:82(90,000) andpkg/settlement/swap/chequebook/chequebook.go:346(95,000).
AI Disclosure
- This issue contains suggestions and text generated by an LLM.
- I have reviewed the AI generated content thoroughly.
- I possess the technical expertise to responsibly review the AI generated content mentioned in this issue.
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 390
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 21
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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 ethersphere/bee
-
Redistribution commit/reveal fall back to a 500,000 gas floor that no longer fits under Glamsterdam (EIP-8038)Possibly taken @sbackend123 claimed this today. Open
Difficulty 2/5 Under an hour Newbie friendliness 85/100
ethersphere/bee#5652 · 1 assignee ·
Maintainers usually reply within 2 days
-
seen
Difficulty 4/5 3-5 days Newbie friendliness 40/100
ethersphere/bee#5648 ·
Maintainers usually reply within 2 days
-
pusher: chunksWorker deadlocks on a deferred chunk that fails IdentityAddress (send on nil op.Err), halting all push-syncPossibly taken @sbackend123 claimed this 2 days ago. Openseen
Difficulty 3/5 1-2 days Newbie friendliness 75/100
ethersphere/bee#5641 · 1 assignee ·
Maintainers usually reply within 2 days
-
GET /bzz/<ref>/ can 404 off-node, and the 404 is indistinguishable from a missing index documentOpenseen
Difficulty 3/5 1-2 days Newbie friendliness 52/100
ethersphere/bee#5625 · 1 comment ·
Maintainers usually reply within 2 days
-
GET /chunks returns 500 "read chunk failed" where /bytes and /feeds return 404May be free again A pull request for this issue was closed without being merged. Openaccepted seen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
ethersphere/bee#5624 ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
[Chore] Remove dead AutogenV2 feature flagPossibly taken @geeknishantkyeus claimed this today. Openbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kyverno/kyverno#17936 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement model:sonnet phase-2-optimize runtime:claude security size:S
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
FootprintAI/Containarium#2416 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day