-
Notifications
You must be signed in to change notification settings - Fork 303
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: validators ensure transactions live in their p2p pool before attesting #8410
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
b51e908
feat: cleanup publisher
LHerskind da2eb7a
refactor: get rid of timetraveler from l1-publisher
LHerskind 3388966
feat: revert if timestamp in future
LHerskind 13a60a3
feat: including txhashes explicitly in the rollup attestations
Maddiaa0 86026f2
temp
Maddiaa0 f3eac5b
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 fc7a04a
temp
Maddiaa0 9eed298
temp
Maddiaa0 cc09455
temp
Maddiaa0 06f950f
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 4727cd9
temp: get passing with txhash payloads
Maddiaa0 b4c2a46
fix: make sure transactions are available in the tx pool
Maddiaa0 4a8d178
chore: remove logs
Maddiaa0 b4324fc
fmt
Maddiaa0 052641a
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 a803a94
🪿
Maddiaa0 164c117
chore: validator tests
Maddiaa0 c10260c
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 045af5a
clean
Maddiaa0 73d26ec
🧹
Maddiaa0 d358228
chore: fix sequencing tests
Maddiaa0 4b31953
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 2e3f80b
fmt solidity
Maddiaa0 5734006
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 1bde1fe
fix: test hash
Maddiaa0 7a50a2b
exp: adjust test nodes
Maddiaa0 1c2b151
fix: use abi.encode vs encodePacked
Maddiaa0 e6e7f6b
fix
Maddiaa0 6f417fc
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 cde6283
fix: merge fix
Maddiaa0 8290c99
fmt
Maddiaa0 1452017
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 b0b8239
fix: sequencer client test after merge
Maddiaa0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { keccak256 as keccak256Buffer } from '@aztec/foundation/crypto'; | ||
import { type Fr } from '@aztec/foundation/fields'; | ||
|
||
import { encodeAbiParameters, keccak256 as keccak2560xString, parseAbiParameters } from 'viem'; | ||
|
||
import { type TxHash } from '../tx/tx_hash.js'; | ||
|
||
/** | ||
* Get the payload for the signature of the block proposal | ||
* @param archive - The archive of the block | ||
* @param txs - The transactions in the block | ||
* @returns The payload for the signature of the block proposal | ||
*/ | ||
export function getSignaturePayload(archive: Fr, txs: TxHash[]) { | ||
const abi = parseAbiParameters('bytes32, bytes32[]'); | ||
const txArray = txs.map(tx => tx.to0xString()); | ||
const encodedData = encodeAbiParameters(abi, [archive.toString(), txArray] as const); | ||
|
||
return Buffer.from(encodedData.slice(2), 'hex'); | ||
} | ||
|
||
/** | ||
* Get the hashed payload for the signature of the block proposal | ||
* @param archive - The archive of the block | ||
* @param txs - The transactions in the block | ||
* @returns The hashed payload for the signature of the block proposal | ||
*/ | ||
export function getHashedSignaturePayload(archive: Fr, txs: TxHash[]): Buffer { | ||
return keccak256Buffer(getSignaturePayload(archive, txs)); | ||
} | ||
|
||
export function get0xStringHashedSignaturePayload(archive: Fr, txs: TxHash[]): `0x${string}` { | ||
return keccak2560xString(getSignaturePayload(archive, txs)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Thanks 🫡