-
Notifications
You must be signed in to change notification settings - Fork 614
feat(vc): remove viem signers from validator client #8517
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
Merged
Merged
Changes from 62 commits
Commits
Show all changes
70 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 27da59d
Add timeouts to individual reqresp connections
Maddiaa0 9e7d2d8
fix
Maddiaa0 3c8e1b9
chore: include tests for specific error messages
Maddiaa0 9a738e5
fmt
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 2f82a8f
Merge branch 'md/check-tx-requests-before-signing' into md/09-06-add_…
Maddiaa0 f673593
fmt
Maddiaa0 a15ab17
fmt
Maddiaa0 2e3f80b
fmt solidity
Maddiaa0 ae2a05e
Merge branch 'md/check-tx-requests-before-signing' into md/09-06-add_…
Maddiaa0 5734006
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 1bde1fe
fix: test hash
Maddiaa0 c775b26
Merge branch 'md/check-tx-requests-before-signing' into md/09-06-add_…
Maddiaa0 7a50a2b
exp: adjust test nodes
Maddiaa0 72f98bd
Merge branch 'md/check-tx-requests-before-signing' into md/09-06-add_…
Maddiaa0 998f38c
chore: add reqresp configuration values to p2p config
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 b13ca93
Merge branch 'md/check-tx-requests-before-signing' into md/09-06-add_…
Maddiaa0 1452017
Merge branch 'master' into md/check-tx-requests-before-signing
Maddiaa0 120c9a3
Merge branch 'md/check-tx-requests-before-signing' into md/09-06-add_…
Maddiaa0 b189270
feat: initial rate limiter impl
Maddiaa0 9b90fe1
Merge branch 'master' into md/09-06-add_timeouts_to_individual_reqres…
Maddiaa0 b7d815f
Merge branch 'md/09-06-add_timeouts_to_individual_reqresp_connections…
Maddiaa0 97a6a14
feat: tests + documentation
Maddiaa0 0e22558
test: add to reqresp.test.ts
Maddiaa0 b464dcf
Merge branch 'master' into md/add-rate-limits-to-reqresp-peers
Maddiaa0 d0da214
fix: add todo pr number
Maddiaa0 2b46268
feat: introduce new light signer
Maddiaa0 65d009a
chore: migrations
Maddiaa0 69aa4a0
chore: proliferate
Maddiaa0 d109853
chore: remove signature lib from leonidas
Maddiaa0 d3cf4b8
fmt
Maddiaa0 dc06395
Merge branch 'master' into md/replace-viem-in-validator
Maddiaa0 d762096
fmt + fix test
Maddiaa0 afb46ca
fmt
Maddiaa0 37929f5
document secp256 helpers
Maddiaa0 1cb6687
clean
Maddiaa0 62b7c72
clean
Maddiaa0 421470e
fix: validator pk validation
Maddiaa0 f0f87a4
fix: reinstante eip712
Maddiaa0 40303d0
Merge branch 'master' into md/replace-viem-in-validator
Maddiaa0 7ea196f
fix: attestation unit test
Maddiaa0 56b06ce
Merge branch 'master' into md/replace-viem-in-validator
Maddiaa0 5d1df99
Merge branch 'master' into md/replace-viem-in-validator
Maddiaa0 6b099f4
fmt
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,41 +1,39 @@ | ||
| import { makeHeader } from '@aztec/circuits.js/testing'; | ||
| import { Buffer32 } from '@aztec/foundation/buffer'; | ||
| import { Secp256k1Signer } from '@aztec/foundation/crypto'; | ||
| import { Fr } from '@aztec/foundation/fields'; | ||
|
|
||
| import { type PrivateKeyAccount } from 'viem'; | ||
| import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; | ||
|
|
||
| import { TxHash } from '../tx/tx_hash.js'; | ||
| import { BlockAttestation } from './block_attestation.js'; | ||
| import { BlockProposal } from './block_proposal.js'; | ||
| import { get0xStringHashedSignaturePayload } from './block_utils.js'; | ||
| import { Signature } from './signature.js'; | ||
| import { getHashedSignaturePayload } from './block_utils.js'; | ||
|
|
||
| export const makeBlockProposal = async (signer?: PrivateKeyAccount): Promise<BlockProposal> => { | ||
| export const makeBlockProposal = (signer?: Secp256k1Signer): BlockProposal => { | ||
| signer = signer || randomSigner(); | ||
|
|
||
| const blockHeader = makeHeader(1); | ||
| const archive = Fr.random(); | ||
| const txs = [0, 1, 2, 3, 4, 5].map(() => TxHash.random()); | ||
| const hash = get0xStringHashedSignaturePayload(archive, txs); | ||
| const signature = Signature.from0xString(await signer.signMessage({ message: { raw: hash } })); | ||
| const hash = getHashedSignaturePayload(archive, txs); | ||
| const signature = signer.sign(hash); | ||
|
|
||
| return new BlockProposal(blockHeader, archive, txs, signature); | ||
| }; | ||
|
|
||
| // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8028) | ||
| export const makeBlockAttestation = async (signer?: PrivateKeyAccount): Promise<BlockAttestation> => { | ||
| export const makeBlockAttestation = (signer?: Secp256k1Signer): BlockAttestation => { | ||
| signer = signer || randomSigner(); | ||
|
|
||
| const blockHeader = makeHeader(1); | ||
| const archive = Fr.random(); | ||
| const txs = [0, 1, 2, 3, 4, 5].map(() => TxHash.random()); | ||
| const hash = get0xStringHashedSignaturePayload(archive, txs); | ||
| const signature = Signature.from0xString(await signer.signMessage({ message: { raw: hash } })); | ||
| const hash = getHashedSignaturePayload(archive, txs); | ||
| const signature = signer.sign(hash); | ||
|
|
||
| return new BlockAttestation(blockHeader, archive, txs, signature); | ||
| }; | ||
|
|
||
| export const randomSigner = (): PrivateKeyAccount => { | ||
| const privateKey = generatePrivateKey(); | ||
| return privateKeyToAccount(privateKey); | ||
| export const randomSigner = (): Secp256k1Signer => { | ||
| const privateKey = Buffer32.random(); | ||
| return new Secp256k1Signer(privateKey); | ||
| }; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,2 @@ | ||
| export * from './secp256k1_signer.js'; | ||
| export * from './utils.js'; |
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.
Uh oh!
There was an error while loading. Please reload this page.