-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Problem
Currently, votes for x/oracle are expensive for node operators even with lowered fixed gas. Currently, it costs 500 unibi and is dictated by the OracleMessageGas constant from ante/fixed_gas.go. Although this gas cost is low compared to something like MsgMarketOrder (200k unibi), it adds up to be a lot due to the frequency of transactions that have to be sent for the oracle voting rounds.
Prohibitive costs on x/oracle make it unlikely for us to have full participation from every active validator, so we need to make it more cost-efficient without increasing the potential for spam.
MVP Solution
Add a module-specific ante handler similar to the one in x/devgas/ante that has access to the OracleKeeper. When a tx comes in:
- Check if it has an oracle pre-vote or vote msg. Otherwise, don't change its gas (exit).
- Check if the sender is an eligible oracle voter (active validator or delegated feeder). Otherwise, exit.
- Ensure that the tx only has one message. Otherwise, exit.
- If the oracle has not already voted or prevoted at the current
ctx.BlockHeightandvoteHash, lower the gas cost significantly.
Open Problems
Spam prevention: We need to make sure that a single active validator can't troll by filling up blocks with low-gas oracle transactions. This becomes more challenging as we lower the gas for the oracle voting messages.
What ways can step 4 of the MVP solution be exploited to spam the network?
Log:
- 2023-09-18: Description follows a recent discussion with @jgimeno
Metadata
Metadata
Assignees
Labels
Type
Projects
Status