CosmWasm / CosmWasm/wasmd

Question: can the `BlockGasMeter` be used for absolute tx position?

Open
#1,950 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
416
Forks
538
PR merge metrics
No merged PRs in 30d

Description

The amount of consumed block gas is used [here](https://github.com/CosmWasm/wasmd/blob/1ff818801d4aa5dd6f483571ac7a38660c59c671/x/wasm/types/types.go#L212) to uniquely identify the position of a transaction in a block.

Is it possible that a transaction could consume zero gas, leading to a collision (that tx and the tx that follows will have the same "absolute index")?

Contributor guide

Open the contributing guide

Research direction

Start by reading x/wasm/types/types.go at line 212 and inspect how BlockGasMeter-derived values identify transactions. Check whether zero-gas transactions can produce the same absolute index as the following transaction. Done when the issue has a documented answer about collision safety or a confirmed alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.