-
Notifications
You must be signed in to change notification settings - Fork 88
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
specs: add oracle specification doc #1941
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nitpicks, but otherwise LGTM.
specs/oracle.md
Outdated
## High level overview | ||
|
||
Astria uses CometBFT for consensus, which communicates with the application | ||
logic using [ABCI++](https://docs.cometbft.com/v0.37/spec/abci/abci++_basic_concepts#consensusblock-execution-methods). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic using [ABCI++](https://docs.cometbft.com/v0.37/spec/abci/abci++_basic_concepts#consensusblock-execution-methods). | |
logic using [ABCI++](https://docs.cometbft.com/v0.38/spec/abci/abci++_basic_concepts#consensusblock-execution-methods). |
specs/oracle.md
Outdated
|
||
The overall price for a currency pair is calculated by using the voting-power-weighted | ||
median of the prices posted by each validator. This way, one malfunctioning validator | ||
should not be able to affect the resulting aggregated price. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be able to affect the resulting aggregated price. | |
should not be able to significantly affect the resulting aggregated price. |
specs/oracle.md
Outdated
|
||
```rust | ||
pub struct ExtendedCommitInfoWithCurrencyPairMapping { | ||
// the entire set of vote extensions finalized in the sequencer block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// the entire set of vote extensions finalized in the sequencer block. | |
/// The entire set of vote extensions finalized in the sequencer block. |
specs/oracle.md
Outdated
// mapping of currency pair ID (since vote extensions contain only ID->price) | ||
// to the currency pair and its price decimals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// mapping of currency pair ID (since vote extensions contain only ID->price) | |
// to the currency pair and its price decimals. | |
/// Mapping of currency pair ID (since vote extensions contain only ID->price) | |
/// to the currency pair and its price decimals. |
specs/oracle.md
Outdated
} | ||
``` | ||
|
||
The price data is set to the rollup as a `RollupData::OracleData` variant, which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The price data is set to the rollup as a `RollupData::OracleData` variant, which | |
The price data is sent to the rollup as a `RollupData::OracleData` variant, which |
specs/oracle.md
Outdated
|
||
#### `process_proposal` | ||
|
||
Other validators receive the proposed block in [`process_proposal`](https://github.com/astriaorg/astria/blob/b2083b4a82195dc9be1e85f31cea14c724b8b4ec/crates/astria-sequencer/src/app/vote_extension.rs#L271). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This links to validate_proposal
- might be worthwhile renaming process_proposal
in this doc throughout (but maybe mention validate_proposal
is called during process proposal?
Summary
add oracle specification which details how the oracle protocol works, the types and functions changed, changes to the sequencer app and conductor.
Related Issues
closes #1890