-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-Incentivized testnet IBC things #1125
Comments
I've been following the various conversations happening around here just to gather as much context as possible and wanted to provide my view on a couple of these decisions: 1. Shall Celestia be deployed with IBC? 2. Should the Celestia network support anything else than the transferring of Celestia tokens? 3. Should we limit which chains connect with Celestia? Are there any other questions on this topic we feel need to be resolved before mainnet launch? Does anyone have stronger opinions against the stances I've put forward i.e. should we set up a meeting in the near future to discuss these points? @evan-forbes @adlerjohn @liamsi @musalbas |
In general I am in favor of enabling IBC for Celestia's native token, but I'd quite like to know the resource pricing for IBC for sanity checking |
Okay I'll start to do some research on that |
So looking into the IBC repository, it seems that there are no adjustments to gas consumption outside of how the SDK normally calculates it i.e. writes and reads to the kvstore (and signature verification) as follows: // KVGasConfig returns a default gas config for KVStores.
func KVGasConfig() GasConfig {
return GasConfig{
HasCost: 1000,
DeleteCost: 1000,
ReadCostFlat: 1000,
ReadCostPerByte: 3,
WriteCostFlat: 2000,
WriteCostPerByte: 30,
IterNextCostFlat: 30,
}
} The main messages we'd expect and the average gas consumed (on Cosmos Hub) are:
From looking into the code, IBC keeps as minimal amount of state as possible so the overhead per connection with a chain is actually quite low. |
Is it the case that for example, IBC packets that contain more signatures (because the chain's validator set is bigger) or have higher proof size, would have higher gas? |
Yes although larger validator sets won't make a difference to the amount written to state as only hashes are stored, but the increase in the transaction size themselves will mean more gas is required (by default 10 gas per byte of txs written to the blockstore.db). In the SDK, all signatures have an additional "computational" cost (i.e. 590 gas for each ed25519 signature) but although IBC also verifies signatures, I don't believe it consumes gas. I have created an issue in their repo about it: cosmos/ibc-go#2951 |
Why is it the case that normal signatures cost gas, but IBC ones don't? |
I'm not sure if there was any intention behind it. From what I gather, the SDK decided that signature verification is costly enough to consider charging gas for verifying the signer of each |
To move forward with this, I think we can progress to #235, where we aim to find out what is needed to limit IBC to only Celestia's native token. I, or @cmwaters, can talk with the IBC to see what the particular reason was for not charging gas, and then weight our options from there. In the future, I imagine that we should be able to add gas costs to those signatures if it becomes an issue. |
closing, as we've merged our initial restrictions on IBC and enabled it. We will still document the gas usage, specifically how we are not currently charging gas for signatures and the values above, in #658 |
We still have some IBC related things that we would like to complete by the incentivized testnet feature freeze. The main three are already in progress and should be fairly straight forward, which involve enabling IBC in the first place
I don't think we have social consensus yet on anything, but one simple idea that could be a good starting point would also be looking into only allowing transfers of Celestia tokens #696 (comment) .
The text was updated successfully, but these errors were encountered: