Github issue: celestia-app#3012
CIAS is a project that applied inscriptions to Celestia. Instead of using blob data, they used the memo field.
For example, this tx has a memo field that base64 decodes to
Note that not all uses of the memo field are nefarious.
Crypto exchanges use memos to uniquely identify the user depositing into an exchange. For example, when depositing ATOM into Coinbase or Gemini, users must specify a memo.
Exchange | Memo characters |
---|---|
Gemini | 13 |
Coinbase | 10 |
Some IBC relayers include the Hermes version in their memo. For example: mzonder | hermes 1.7.4+ab73266 (https://hermes.informal.systems)
which is 64 characters.
The gas cost of bytes in the memo field may be mis-priced relative to blobs. Ideally Celestia should enable use cases like inscriptions but encourage them to use blobs rather than memos.
We've discussed three concrete gas modifications to encourage users to use blobs instead of memos.
auth.MaxMemoCharacters
from 256auth.TxSizeCostPerByte
from 10auth.MaxMemoCharacters
auth.MaxMemoCharacters
is a governance param currently set to 256. This param places a hard limit on the number of characters in the memo field. If this value is decreased, it may make it impractical for inscriptions projects to use the memo field.
How do we select a new value? An example CIAS tx uses 84 characters. Exchanges use 13 characters. IBC relayers use 64 characters. So proposal to use 64 characters.
Cons:
Implementation:
Discourages the use of memos. Note: This approach is similar to how 1000
gas is consumed per signature verification.
Cons:
Implementation:
NewSigGasConsumeDecorator
as inspiration.auth.TxSizeCostPerByte
Increases the cost of all bytes in a tx, not just the memo. Currently blob.GasPerBlobByte = 8
so the cost of a blob byte is quite similar to the cost of a tx byte.
How expensive does this make transactions?
auth.TxSizeCostPerByte |
Gas used by MsgSend without memo | Gas used by MsgSend with 256 character memo |
---|---|---|
10 | 77004 | 79594 |
16 | 78806 | 82950 |
100 | 105434 | 131334 |
1000 | 320734 | 649734 |
Assuming minimum-gas-prices = "0.002utia"
auth.TxSizeCostPerByte |
Tx fee of MsgSend without memo | Tx fee of MsgSend with 256 character memo |
---|---|---|
10 | 154 utia | 159 utia |
16 | 157 utia | 165 utia |
100 | 210 utia | 262 utia |
1000 | 641 utia | 1299 utia |
Ref: https://github.com/rootulp/celestia-app/tree/rp/gas-pricing
Cons:
Implementation:
What do other blockchains use for these params?
Param | Celestia | Cosmos Hub | Osmosis |
---|---|---|---|
auth.MaxMemoCharacters |
256 | 512 | 256 |
auth.TxSizeCostPerByte |
10 | 10 | 10 |
Ref:
Couldn't find a Cosmos Hub GRPC endpoint so used: https://github.com/cosmos/gaia/blob/536a6179ee19b279b08fe39548af855fe54a23d8/docs/governance/current-parameters.json#L3-L7
Queries Osmosis params via:
Notes:
auth.TxSizeCostPerByte = 16
then we need to communicate to roll-ups and other service providers that we're changing it.FLUPs:
auth.TxSizeCostPerByte = 16
to the tables above