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

feat: Theoros v1.0 #86

Merged
merged 55 commits into from
Nov 3, 2024
Merged

feat: Theoros v1.0 #86

merged 55 commits into from
Nov 3, 2024

Conversation

akhercha
Copy link
Member

@akhercha akhercha commented Oct 31, 2024

Resolves: #77

Theoros

  • The indexer service now only indexes events and push dispatch to a UnsignedCheckpoints "queue",
  • Hyperlane service read the "queue" and wait for all validators signatures (by querying their storage) (works good with N validators),
  • The calldate now correctly returns all the signatures available for a given nonce with the correct validator index,
  • Refactored names so we understand better what things are,
  • Stored and match events using nonce, not message_id,
  • The endpoints now allows to query multiple feed ids calldatas,

Updated

  • Theoros SDK with latest changes,

Fixed

  • README stuff
  • pragma:update_feed js script,

Removed

  • pragma-cli repository
  • indexer-starting-block: It is useless to index from a block greater than current_block - 5 - we don't store any persistent data on Theoros and we're only interested in the latest updates. We can even do current_block - 2 or 3.
  • unused functions.

To-do in a follow-up PR:

  • Figure out what do we want to keep in the calldata
  • OTEL Metrics

Logs example:

image

@akhercha akhercha self-assigned this Oct 31, 2024
@akhercha akhercha changed the title dev: Better Theoros dev: Theoros refactoring Oct 31, 2024
@akhercha akhercha requested review from JordyRo1 and EvolveArt and removed request for JordyRo1 November 1, 2024 11:06
@akhercha akhercha marked this pull request as ready for review November 1, 2024 11:09
Copy link
Contributor

@EvolveArt EvolveArt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments


let update = match event.update {
DispatchUpdate::SpotMedian { update, feed_id: _ } => update,
pub async fn build_from(state: &AppState, chain_name: EvmChainName, feed_id: String) -> anyhow::Result<Calldata> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use a builder pattern here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could but I'm not sure about the actual benefits since in practice we don't really "customize" how we call this function. But it would be prettier for sure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easier to refactor in the future when there are more chain types and other stuff in the state

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also adds some default values which I think makes sense

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

1 similar comment
Copy link

github-actions bot commented Nov 3, 2024

Gas Report Summary

SpotMedian

  • Gas used: 176855
  • Change: ⚪ No change

TWAP

  • Gas used: 269295
  • Change: ⚪ No change

RealizedVolatility

  • Gas used: 292606
  • Change: ⚪ No change

Options

  • Gas used: 384932
  • Change: ⚪ No change

Perpetuals

  • Gas used: 223711
  • Change: ⚪ No change

Copy link
Contributor

@EvolveArt EvolveArt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few issues to follow up #90

@akhercha akhercha merged commit 732af6c into main Nov 3, 2024
9 checks passed
@akhercha akhercha deleted the dev/better_theoros branch November 3, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dev: /calldata multiple feed ids
2 participants