-
Notifications
You must be signed in to change notification settings - Fork 396
feat(aggregation): have constant costs proof sending #2179
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
Changes from all commits
c20832e
839283a
77fbb7c
560c130
7316cb7
b65538a
b7dba3d
6c60fd1
b8d32ee
d9595c0
073eee7
eb9d481
7260821
007d2c5
8b05811
4edca48
24244d0
4450ac1
d0bf1e1
4986c42
3364963
bdacfc6
d51ca2f
79a817d
7a391f8
7a5a5a3
c1cd90a
569d006
2da166b
8ae4e77
329c65d
cf219bd
893209d
616fe62
d94b405
24be68a
acf3b44
c266015
43b94ee
ef7ab6b
ee4cc13
e9ae7e5
ab46aa1
a2aa18d
6e67363
a211e3f
675540b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,25 @@ pub struct ProofsFetcher { | |||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| impl ProofsFetcher { | ||||||||||||||||||||||||||||||||||||||||||||||
| #[cfg(test)] | ||||||||||||||||||||||||||||||||||||||||||||||
| pub fn new_for_testing(config: &Config) -> Self { | ||||||||||||||||||||||||||||||||||||||||||||||
| let rpc_url = config.eth_rpc_url.parse().expect("RPC URL should be valid"); | ||||||||||||||||||||||||||||||||||||||||||||||
| let rpc_provider = ProviderBuilder::new().connect_http(rpc_url); | ||||||||||||||||||||||||||||||||||||||||||||||
| let aligned_service_manager = AlignedLayerServiceManager::new( | ||||||||||||||||||||||||||||||||||||||||||||||
| Address::from_str(&config.aligned_service_manager_address) | ||||||||||||||||||||||||||||||||||||||||||||||
| .expect("AlignedProofAggregationService address should be valid"), | ||||||||||||||||||||||||||||||||||||||||||||||
| rpc_provider.clone(), | ||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| let last_aggregated_block = 0; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Self { | ||||||||||||||||||||||||||||||||||||||||||||||
| rpc_provider, | ||||||||||||||||||||||||||||||||||||||||||||||
| aligned_service_manager, | ||||||||||||||||||||||||||||||||||||||||||||||
| last_aggregated_block, | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
+53
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is done this way to avoid having to read from the files, which was causing conflicts in the CI. Instead of reading from the file we just set it to zero (since it isn’t important for what we’re testing). If we call the other constructor, then we’ll get the error that led us to create this new_for_testing in the first place. |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| pub fn new(config: &Config) -> Self { | ||||||||||||||||||||||||||||||||||||||||||||||
| let rpc_url = config.eth_rpc_url.parse().expect("RPC URL should be valid"); | ||||||||||||||||||||||||||||||||||||||||||||||
| let rpc_provider = ProviderBuilder::new().connect_http(rpc_url); | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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 would move this to a function:
should_skip_build() -> boolThere 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 in 675540b