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: TFHE operation events for coprocessor #269

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

rudy-6-4
Copy link
Contributor

No description provided.

@rudy-6-4 rudy-6-4 force-pushed the rudy/feat/event-tfhe-operation branch 2 times, most recently from d4fc2c3 to 5185e76 Compare January 24, 2025 09:55
bench = false

[dependencies]
# workspace dependencies
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: These are both crates.io and workspace dependencies, maybe could split to separate sections.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes all versions will go to the root Cargo if no conflict and be pinned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

postponed because no CI test to see if I introduce issues

@rudy-6-4 rudy-6-4 force-pushed the rudy/feat/event-tfhe-operation branch from 5185e76 to 00893b7 Compare January 28, 2025 12:18
@rudy-6-4 rudy-6-4 marked this pull request as ready for review January 31, 2025 10:12
@@ -0,0 +1,663 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is there a way to have an up to date version of these files always available ? so there is not need to have to copy or regenerate locally.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's what I am doing on the TxnSender part - I use the foundry-compilers crate:

foundry-compilers = { version = "0.13.0", features = ["svm-solc"] }

This way we can have the compiled contracts from source.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll add that after merge. Should we version abi files so there are always avail ?

@rudy-6-4 rudy-6-4 requested a review from dartdart26 January 31, 2025 10:15
Copy link
Collaborator

@dartdart26 dartdart26 left a comment

Choose a reason for hiding this comment

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

Looks good! AFAIU, we need to persist the last block we've processed to DB s.t. we can start from there if we crash/stop. We can do that in a separate PR too, will leave that to you to decide.

pub start_at_block: Option<i64>,

#[arg(long, default_value = None)]
pub end_at_block: Option<u64>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need to specify an end block? Is it for testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in case someone want to do a manual catchup, like in prod some events are missing because of an ephemeral network issue or service down, you may want to only replay for a given period the events also it's to avoid letting the manual command up by mistake for an infinite time in case of manual call.

contract_addresses: Vec<Address>,
stream: Option<SubscriptionStream<Log>>,
provider: Option<RootProvider<PubSubFrontend>>, // required to maintain the stream
last_seen_block: Option<u64>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to persist the last seen block s.t. we start from there if we crash/stop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it's was just for local logic, it's not persisted. Yes I was thinking of persisting a block number to the database but only after the events are written to the database and that block number could be used as the default starting block for this command-line.

@rudy-6-4 rudy-6-4 merged commit 685e253 into main Feb 3, 2025
3 checks passed
@rudy-6-4 rudy-6-4 deleted the rudy/feat/event-tfhe-operation branch February 3, 2025 15:09
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