You are right, GasPrices does contain an asset_id, I missed that because asset_id is never defined.
But the problem is that our GasPrices storage is deprecated and not suitable for multi-asset fees
Now we store GasPrices assuming that we can only have one record
But in that case, I expect we'll run into an error, because pd purposely omits the assetId for native GasPrices, but that's bad for us, because undefined can't be a key in indexed-db
We will have to manually add the assetId for native GasPrices or come up with another trick
Also, note that the getGasPrices function will also have to be modified
You are right,
GasPrices
does contain anasset_id
, I missed that becauseasset_id
is never defined. But the problem is that ourGasPrices
storage is deprecated and not suitable for multi-asset feesNow we store
GasPrices
assuming that we can only have one recordInstead, we should use the
assetId
as the keyBut in that case, I expect we'll run into an error, because pd purposely omits the assetId for native
GasPrices
, but that's bad for us, because undefined can't be a key in indexed-dbWe will have to manually add the
assetId
for nativeGasPrices
or come up with another trickAlso, note that the getGasPrices function will also have to be modified
Also need to change the gasPrices rpc for the view service so that it retrieves
alt_gas_prices
And the block processor logic that should save
alt_gas_prices
to indexed-db when needed_Originally posted by @Valentine1898 in https://github.com/penumbra-zone/web/pull/1268#discussion_r1642984352_