-
Notifications
You must be signed in to change notification settings - Fork 333
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: tx verification & peer scoring on p2p layer #8298
Changes from 1 commit
081bff2
d28e5cd
a6c7551
aa77b00
df11b41
b9a2b82
6659334
baea32b
d13cd69
0d79216
b7327cf
cafa5be
eae3fc6
0a39e38
3b08b7a
ceece5f
3e74c93
fad3232
494c3f1
82b888f
90ad1ed
cc7bd10
9d0be48
3ac7ef5
7ca89d8
b2042a6
83568e8
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { AztecAddress, EthAddress, Fr, GlobalVariables } from '@aztec/circuits.js'; | ||
|
||
/** | ||
* Interface for building global variables for Aztec blocks. | ||
*/ | ||
export interface GlobalVariableBuilder { | ||
/** | ||
* Builds global variables for a given block. | ||
* @param blockNumber - The block number to build global variables for. | ||
* @param coinbase - The address to receive block reward. | ||
* @param feeRecipient - The address to receive fees. | ||
* @param slotNumber - Optional. The slot number to use for the global variables. If undefined, it will be calculated. | ||
* @returns A promise that resolves to the GlobalVariables for the given block number. | ||
*/ | ||
buildGlobalVariables( | ||
blockNumber: Fr, | ||
coinbase: EthAddress, | ||
feeRecipient: AztecAddress, | ||
slotNumber?: bigint, | ||
): Promise<GlobalVariables>; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ | |
"@aztec/circuits.js": "workspace:^", | ||
"@aztec/foundation": "workspace:^", | ||
"@aztec/kv-store": "workspace:^", | ||
"@aztec/simulator": "workspace:^", | ||
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. What does it need the simulator for? 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.
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. Hmm, no it needs a
|
||
"@aztec/telemetry-client": "workspace:^", | ||
"@chainsafe/discv5": "9.0.0", | ||
"@chainsafe/enr": "3.0.0", | ||
|
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.
Rather than passing all the deps for the TxValidators across the p2p client and lib p2p service, and creating a new TxValidator for every tx, I'd change it so this call accepts a TxValidator (or a TxValidatorFactory if needed) directly. So when we add new validations with new deps we don't need to keep changing the entire call chain.
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 started writing it this way actually!
Issue is we sort of need to know which specific validation fails or not in order to then update peer scores based on the result