-
Notifications
You must be signed in to change notification settings - Fork 19
Accumulator Support and Integration Testing #62
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
Conversation
…accumulator-integration-test
|
Summary of changes:
|
Changes:
Status: |
Finalized summary of changesThis changeset updates Solana program dependencies and implements client code to call into the oracle with accumulator CPI support. The majority of changes accomodates evolving integration testing setup. Review highlights
Agent changes
Documentation
Integration tests
|
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.
Awesome. I like the toggleable behavior for testing against different environments. My main ask here is for some organization and documentation:
- write down the env flags in the readme and how/when you should use them.
- would also be nice to put the binaries into a folder like
program_binaries/
- see inline comments about the autogenned python/idl stuff
that's all easy stuff so i'm going to approve this and trust you to fix those issues.
@@ -0,0 +1,573 @@ | |||
{ |
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.
can you put this in an idl/
folder or something? and similarly put the autogenned python into a folder like autogen
and provide instructions for how to update that code from the IDL in the readme?
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.
Gathered all artifacts in program-binaries
, renamed the JSON to message_buffer_idl.json
yield | ||
|
||
''' |
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.
i think we can bring back the logs now. this was commented out as a hacky thing for some debugging i think
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.
Done
path = os.path.join(agent_keystore_path, "accumulator_program_key.json") | ||
|
||
with open(path, 'w') as f: | ||
f.write(MESSAGE_BUFFER_PROGRAM) |
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 is a string-only json file?
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.
Correct, we do this for other addresses too, I think we noticed this on one occasion and decided to remain crappy but consistent
src/agent/solana/exporter.rs
Outdated
&price_info, | ||
network_state.current_slot, | ||
)?; | ||
*/ |
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.
delete commented out code
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.
Done
@@ -144,6 +144,8 @@ mod key_store { | |||
pub program_key_path: PathBuf, | |||
/// Path to the public key of the root mapping account, relative to the root | |||
pub mapping_key_path: PathBuf, | |||
/// Path to the public key of the accumulator program, relative to the root. | |||
pub accumulator_key_path: Option<PathBuf>, |
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.
(it's confusing that these pubkeys are in separate files as opposed to simply being strings in the config, but this is consistent with the other keys so it's fine)
@@ -128,7 +129,7 @@ impl Default for Config { | |||
inflight_transactions_channel_capacity: 10000, | |||
transaction_monitor: Default::default(), | |||
// The largest transactions appear to be about ~12000 CUs. We leave ourselves some breathing room. | |||
compute_unit_limit: 20000, | |||
compute_unit_limit: 40000, |
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.
do we know that this is enough now? (i'll make a note in our roadmap doc to check)
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 is configurable, but I agree that we should make sure.
src/agent/solana/exporter.rs
Outdated
&accumulator_program_key, | ||
); | ||
|
||
debug!(self.logger, "Oracle Auth PDA"; "address" => oracle_auth_pda.to_string()); |
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.
you probably don't want this log statement all the time
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.
Removed
This builds on Jayant's WIP PR for accumulator support. Changes: