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: support batch publish #140

Merged
merged 5 commits into from
Sep 10, 2024
Merged

feat: support batch publish #140

merged 5 commits into from
Sep 10, 2024

Conversation

Riateche
Copy link
Contributor

@Riateche Riateche commented Sep 2, 2024

  • Add optional publish_program_key field to the config
  • Fetch feed_id for each permissioned feed
  • Create instruction for the publish program with fallback to the oracle program

@Riateche Riateche marked this pull request as ready for review September 3, 2024 10:57
Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

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

Very nice!

publish_program_key,
updates,
)?;
updates = unsupported_updates;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the fallback might fail because we also change the batch size, so maybe a simpler way can be just to crash? I think it highly depends on our upgrade process.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to return error on missing feed_index.

)?);
}
}
let mut data = vec![1];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a comment that this is the instruction id and the wire format in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now it imports instruction types from the program crate.

Cargo.toml Outdated
@@ -56,6 +56,8 @@ tracing-opentelemetry = "0.24.0"
opentelemetry = "0.23.0"
opentelemetry_sdk = { version = "0.23.0", features = ["rt-tokio"]}
opentelemetry-otlp = { version = "0.16.0" }
pyth-price-publisher = { git = "https://github.com/pyth-network/pyth-crosschain", branch = "add-publisher-program" }
Copy link
Collaborator

@ali-bahjati ali-bahjati Sep 3, 2024

Choose a reason for hiding this comment

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

let's publish this package too. also bump the agent version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Riateche Riateche merged commit bcd190e into main Sep 10, 2024
2 checks passed
@Riateche Riateche deleted the batch-publish branch September 10, 2024 16:07
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.

2 participants