Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Chequebook deployment uses a fixed 175,000 gas limit; it needs about 630,000 under Glamsterdam (live on Sepolia since 2026-10-06)

Open Beginner friendly
#5,650 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@sbackend123 is already working on this.

Since Oct 8, 2026.

  • #5655 by @sbackend123 — open

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) and pkg/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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ethersphere/bee

All issues in ethersphere/bee

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.