-
Notifications
You must be signed in to change notification settings - Fork 715
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
Implement missing gRPC filters #4462
base: main
Are you sure you want to change the base?
Conversation
1ed67b6
to
1e86981
Compare
return false; | ||
}; | ||
} | ||
//TODO to be confirmed |
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.
@AurelienFT could you confirm this information about emitter_address
?
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.
No the emitter address should be the back of the callstack. But currently in the code it's inverted see : #4409 but we are not correcting it now because it could break too much projects : #4422 (comment) (I'm not fully agree with this but not the subject) So I suggest that you match the wrong behaviour and use .front()
like here
} | ||
} | ||
//TODO to be confirmed | ||
if let Some(handlers) = &async_pool_changes_filter.handlers { |
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.
@AurelienFT same here about handler
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 have renamed handler
to function
because it was his real usage. So yes handler
before == function
now.
} | ||
} | ||
//TODO to be confirmed | ||
massa_ledger_exports::SetOrKeep::Keep => { |
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.
@AurelienFT if It's a Keep, we can't compare to anything, should we do something or act like there is nothing to compare ?
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.
If a change is here with a function
set to Keep
then there is at least another change that is here with a Set
and so the choice of returning it or not should depends on the choice on the field that have the Set
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.
We'll take a decision when this PR will be prioritised.
6d519da
to
85a8a1a
Compare
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 u make good unit test for new_slot_execution_output
This won't fit in one big test, we tons of case to cover.... But i'm trying to reuse existing test tools functions to generate test data to have more accurate tests. Stay tuned |
85a8a1a
to
736e5f5
Compare
I made a small refactoring in bootstrap tests to be able to extract the tools module and make it public. |
@modship I've added some basic tests which covers filters usage. But there if a lot of combinations to test |
cd83ef2
to
00c66b8
Compare
filters.push(filter); | ||
|
||
tx_request | ||
.send(NewSlotExecutionOutputsRequest { filters }) |
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.
to improve readability please remove the vector filters
and create the vec here
.unwrap() | ||
.state_changes | ||
.unwrap(); | ||
assert!(state_changes.async_pool_changes.len() == 2); |
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.
use assert_eq! when you check specific value
.state_changes | ||
.unwrap(); | ||
assert!(state_changes.async_pool_changes.len() == 2); | ||
assert!(state_changes.executed_ops_changes.len() == 1); |
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.
use assert_eq! when you check specific value
resync_check
flagfix #4443
We have some TODOs in
massa-proto
and make it more defensive to avoid flooding the clients.