-
Notifications
You must be signed in to change notification settings - Fork 0
Data scaling upgrade #20
Copy link
Copy link
Open
Description
We currently are limited on the amount of price updates the axelar bridge can make in one transaction due to a restriction on this memo field:
This message is expected to fail if:
...
- `PacketData` contains an `UNSPECIFIED` type enum, the length of `Data` bytes is zero or the `Memo` field exceeds 256 characters in length.
As a result, we need to find a way to shorten the msg field while allowing us to relay the same amount of information. The fix seems to be hashing the data as a verification method instead of relaying it through the bridge.
- When the user transacts against an ojo contract, the frontend javascript queries an ojo node for the current set of exchange rates and block number. This is passed into the EVM contract.
- The EVM contract makes a call to ojo through axelar, asking for a hash of the set of exchange rates at the particular block height
- The EVM contract receives the hash from Ojo.
- The EVM contract hashes the user-supplied exchange rates and compares it against the ojo-supplied hash. If they are the same, allow the transaction to go through.
- If not, roll back the transaction.
There are a few different components to this change. We need to:
- Update the EVM contract interface to take exchange rate info and block height #21
- Update the ojo blockchain to store exchange rates for the last 100 voting periods (30 minutes). #22
- Update the frontend javascript client to query the ojo node for exchange rates and submit them to EVM. #23
- Update the GMP relayer to relay the exchange rate hash instead of the full exchange rate data. #24
- Update the EVM contract code to compare the two hashes and rollback in case of failure. #25
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels