Skip to content
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

Adds ICQHost and Oracle Module #1643

Merged
merged 105 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
b9b70d4
Added protos for oracle module.
Jul 27, 2023
d76d082
Added simple implementation for the oracle module. No logic, tests, o…
Jul 27, 2023
f05b400
Fixed signature of OracleResult.
Jul 27, 2023
b01c9af
Added async-icq to provenance. Still need to hook up oracle module, a…
Jul 27, 2023
9a3a534
Added the oracle module app.go
Jul 27, 2023
2b97f26
Added empty Msg interface implementation for UpdateOracle.
Jul 27, 2023
210cb1d
Added ICQKeeper to OracleKeeper. Made the QueryOracle request a trans…
Jul 28, 2023
457dae2
Added some more stuff from the example ICQ Controller created by Quas…
Jul 28, 2023
204767e
Added some more functions from quasar and got the setup to build and …
Jul 31, 2023
32faa3e
I successfully hooked up interchain queries. I just need to tailor it…
Aug 1, 2023
13b308b
Disconnected example ICQ and started writing our own. Added some impl…
Aug 2, 2023
520eb71
Finished basic implementation of Chain1 -> Chain2 -> Contract impleme…
Aug 3, 2023
b2b16c5
Renamed queries and transactions. Added ExportGenesis logic. Fixed so…
Aug 3, 2023
2a20ade
Moved some functions around and renamed files.
Aug 3, 2023
3ec7d93
Removed the ibc events and made them query typed events.
Aug 3, 2023
0c59b77
Updated CHANGELOG.
Aug 3, 2023
1b678d1
Updated documentation for CLI and fixed command names.
Aug 3, 2023
ea5dcfe
More cleanup and removal of unused method.
Aug 3, 2023
f55f793
Added ValidateBasic logic and some error checks on the query server.
Aug 3, 2023
d562b07
Added more documentation and moved keys to single file.
Aug 4, 2023
1eaf2b8
Fixed module naming in comments.
Aug 4, 2023
20a124d
Updated genesis.go errors and added tests.
Aug 4, 2023
cbde82d
Added tests for keys and ensured all keys have getters.
Aug 4, 2023
4d6dbb4
Added tests for msgs.
Aug 4, 2023
a10304a
Removed references to contract, and used oracle instead. Updated docu…
Aug 4, 2023
16d1be9
Changed update oracle to be a proposal.
Aug 7, 2023
65ff1bb
Finished README and concepts.
Aug 7, 2023
f55974e
Added note about the ibc channel.
Aug 7, 2023
6586599
Added state to spec.
Aug 7, 2023
ccd7676
Added messages spec.
Aug 7, 2023
96f828b
Added queries spec.
Aug 7, 2023
15ec852
Finished documentation for events.
Aug 7, 2023
930a5c3
Finished documentation for genesis.
Aug 7, 2023
b52cc25
Fixed typo in documentation.
Aug 7, 2023
0c70023
Added table of contents to all spec files.
Aug 7, 2023
f2aad08
Updated proto comment.
Aug 8, 2023
f2116ed
Hooked up the simulation tests, but have not verified their correctness.
Aug 8, 2023
a331111
Added genesis tests for keeper.
Aug 8, 2023
8802a2c
Added oracle keeper tests.
Aug 8, 2023
2af9b51
Added tests for params.
Aug 8, 2023
f5ce91d
Updated comments in keeper.go
Aug 9, 2023
3d6415e
Added missing keeper_test for setup of previous committed tests.
Aug 9, 2023
3867562
Added tests for the query_server. Did not do QueryState since it's be…
Aug 9, 2023
e5f3605
Added tests for query.
Aug 9, 2023
2ff17e6
Added tests for message server, and added mocks to properly mock keep…
Aug 9, 2023
b695a8e
Added icq query tests. Updated channel keeper mock to have pointer re…
Aug 9, 2023
ce2cd36
Finished tests for relay.go
Aug 9, 2023
5afab1b
Removed storing query request and response in state and just have the…
Aug 9, 2023
cc57942
Updated spec with removal of query request response state. Updated ev…
Aug 10, 2023
6291d15
Updated the error for channel id validate basic.
Aug 10, 2023
a41e4c9
Added the oracle to the genesis state.
Aug 10, 2023
ba0b65c
Error is not thrown when oracle is not set. Empty address will just b…
Aug 10, 2023
739270f
Added cli queries test for oracle.
Aug 10, 2023
3478888
Updated link in genesis spec.
Aug 10, 2023
8492f30
Added cli tx test for oracle.
Aug 10, 2023
546e2c2
First attempt at simulation tets for oracle module.
Aug 10, 2023
ee54dbb
Linted files and fixed one sim test.
Aug 10, 2023
2759158
Updated sim_test.go to add app state for icq.
Aug 10, 2023
8e41674
Added saffron upgrade with oracle and icqhost configure.
Aug 11, 2023
723958d
Merged in main.
Aug 11, 2023
c4305c0
Did some linting on the code.
Aug 11, 2023
6429888
Fixed some more linting issues.
Aug 11, 2023
672e524
Ran lint fix on modules.
Aug 11, 2023
d65def2
Added error checking for emitted typed events.
Aug 11, 2023
1b3ff9f
Fixed some more linting issues.
Aug 11, 2023
be17d45
Fixed linting on file with gci.
Aug 11, 2023
14bd60d
Added saffron and saffron-rc1 release. Added upgrade tests for them.
Aug 11, 2023
42e2c44
Merged in main.
Aug 11, 2023
ee771cb
Added logic for testnet in upgrade handler.
Aug 11, 2023
e9f098e
Fixed comment.
Aug 11, 2023
653717c
Removed params.
Aug 11, 2023
d299eac
Updated comment for BindPort.
Aug 11, 2023
6822542
Split interface check on multiple lines.
Aug 11, 2023
83b87e8
Moved methods up.
Aug 11, 2023
deaeec0
Moved saffron-rc1 upgrade up 1.
Aug 11, 2023
f94ef41
Added removeInactiveValidatorDelegations.
Aug 11, 2023
3c71f15
Changed Equal(0) test to .Empty
Aug 11, 2023
0dc658c
Removed nil check.
Aug 11, 2023
bd2c0a0
Merged in main.
Aug 11, 2023
0bf7f23
Updated comments.
Aug 11, 2023
e8a202b
Removed unused error and fixed linting issue with unused param.
Aug 11, 2023
d352046
Merge branch 'main' into taztingo/1497-oracle-support
iramiller Aug 14, 2023
15048e6
Removed the LastSequenceNumber because it is no longer used.
Aug 28, 2023
644454d
Bump bufbuild/buf-setup-action from 1.26.0 to 1.26.1 (#1650)
dependabot[bot] Aug 15, 2023
fe82397
Bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 (#1651)
dependabot[bot] Aug 15, 2023
2e1e7cb
Allow restricted coins to be quarantined (#1652)
SpicyLemon Aug 18, 2023
cc6ed00
Bump github.com/google/uuid from 1.3.0 to 1.3.1 (#1657)
dependabot[bot] Aug 22, 2023
f8ee015
Updated dependencies.
Aug 28, 2023
0cb4986
Updated specs for Oracle module.
Aug 28, 2023
a8ee7fe
Merged in main.
Aug 28, 2023
a2995ba
Simplified tx and removed useless gov flag.
Aug 28, 2023
f0ba896
Removed multiple decoders.
Aug 28, 2023
4ed48ad
Removed pointer arg since it was only needed for tests. Updated tests…
Aug 28, 2023
5c4c6be
Merge branch 'main' into taztingo/1497-oracle-support
Aug 28, 2023
ed6eba5
Removed 99designs keyring dependency and replaced it with cosmos keyr…
Aug 29, 2023
0247454
Merge branch 'main' into taztingo/1497-oracle-support
Aug 31, 2023
721797b
Merged in main.
Aug 31, 2023
a7bd8ad
Remove remaining references to LastQuerySequence.
Sep 1, 2023
0876fc4
Add decoder test that was missing.
Sep 1, 2023
e999a92
Add genesis_tests for simulation.
Sep 1, 2023
82937f4
Removed paramspace.
Sep 5, 2023
3782a95
Fix test name.
Sep 5, 2023
2903377
Move tested pieces into variables.
Sep 5, 2023
42b0c72
Remove State from TOC.
Sep 5, 2023
521674f
Merge branch 'main' into taztingo/1497-oracle-support
Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finished README and concepts.
Matthew Witkowski committed Aug 7, 2023
commit 65ff1bb04c061471c4f5b90fe5d7648e19654631
19 changes: 19 additions & 0 deletions x/oracle/spec/01_concepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
order: 1
-->

# Concepts

The oracle module is very minimal, but users should understand what the `Oracle` is and how it interacts with `ICQ`.

## Oracle

The `Oracle` is a custom built CosmWasm smart contract that the chain queries for data. Chain users can update the address with a proposal.

## Interchain Queries (ICQ)

`ICQ` is heavily leveraged in order to allow one Provenance Blockcahin to query another Provenance Blockchain's `Oracle`. This module acts as both the `Controller` and receiver of the `Host` in the `ICQ` realm.

When a user intends to query another chain, they initiate the process by submitting a query through a transaction on the `ICQ Controller`. This `Controller` delivers the query from the transaction to the `ICQ Host` module of the destination chain via `IBC`. Subsequently, the received query is routed by the `ICQ Host` to this module. Upon receipt, the module queries the `Oracle` using the provided input, and the resulting information is then transmitted back to the `ICQ Controller` in the form of an `ACK` message.

It should be noted that responses, which arrive in the form of the `ACK`, indicate that queries operate asynchronously. Consequently, these results might not be immediately accessible, necessitating a separate query invocation to retrieve the outcomes. For additional details, you can refer to the [Async ICQ Module](https://github.com/strangelove-ventures/async-icq) developed by strangelove-ventures.
9 changes: 9 additions & 0 deletions x/oracle/spec/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `oracle`

## Overview
The oracle module provides the Provenance Blockchain with the capability to dynamically expose query endpoints through Interchain Queries (ICQ)

One challenge that the Provenance Blockchain faces is supporting each Provenance Blockchain Zone with a unique set of queries. It is not feasible to create an evolving set of queries for each chain. Furthermore, it is not desirable for other parties to request Provenance to build these endpoints for them and then upgrade. This module resolves these issues by enabling Provenance Blockchain zones to manage their own oracle.

## Contents
1. **[Concepts](01_concepts.md)**