-
Notifications
You must be signed in to change notification settings - Fork 310
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: introduce validator client #7854
Merged
Maddiaa0
merged 44 commits into
master
from
md/08-01-feat_vc_introduce_validator_client
Aug 16, 2024
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
78dbe1b
feat(vc): introduce validator client
Maddiaa0 34b32af
temp
Maddiaa0 59b82a6
move some stuff around
Maddiaa0 f3fe10b
feat: memory attestation pull
Maddiaa0 3e95501
chore: add gossipable to cpell
Maddiaa0 2c0f307
chore: introduce block with attestations structure
Maddiaa0 0f515e5
chore: update validotr service
Maddiaa0 b2f78ed
feat: light integration with sequencer
Maddiaa0 8831381
fmt
Maddiaa0 b7a5131
fmt
Maddiaa0 8b3c55e
feat: start p2p test rework
Maddiaa0 6fa1fc1
temp: change attestation map
Maddiaa0 437635a
feat: test that requires collected attestations to produce block
Maddiaa0 5d2808b
fixes: fmt + types
Maddiaa0 0c50ee9
fix: header
Maddiaa0 4c0a943
Merge branch 'master' into md/08-01-feat_vc_introduce_validator_client
Maddiaa0 39f5d90
fixes
Maddiaa0 c8f1dba
Merge branch 'master' into md/08-01-feat_vc_introduce_validator_client
Maddiaa0 45ac399
chore: rename BaseHashType to Buffer32
Maddiaa0 a1ff397
chore: signature type rework
Maddiaa0 33fb87f
fix: viem types
Maddiaa0 759982b
f,t
Maddiaa0 d2f0854
fix: sign over archive
Maddiaa0 0cc6920
sweep
Maddiaa0 1a0d7e8
Merge branch 'master' into md/08-01-feat_vc_introduce_validator_client
Maddiaa0 07c4203
chore: rm attestations test + clean
Maddiaa0 064db45
forge fmt
Maddiaa0 95dfabf
chore: sweep + annotate issues
Maddiaa0 842d8ce
fmt
Maddiaa0 27b33c5
toggle is devnet
Maddiaa0 e9a32d2
fix: update constants
Maddiaa0 c284de0
fix: yarn prepare
Maddiaa0 27ad8bb
fix: yarn config
Maddiaa0 f5b45b6
fix: webpack
Maddiaa0 f3adc08
Merge branch 'master' into md/08-01-feat_vc_introduce_validator_client
Maddiaa0 2c1aeb7
fix: tests are coupled apparently
Maddiaa0 0e25b4e
fix: revert hash caching on header :(
Maddiaa0 c4614fc
fix: add default key for validator client in sandbox
Maddiaa0 8ee6efc
fix: fmt
Maddiaa0 8986e68
fmt
Maddiaa0 eefca64
Merge branch 'master' into md/08-01-feat_vc_introduce_validator_client
Maddiaa0 dd80451
review fixes
Maddiaa0 bde2469
Merge branch 'master' into md/08-01-feat_vc_introduce_validator_client
Maddiaa0 5a47571
fix: constants value wrong
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ | |
"fuzzers", | ||
"gitmodules", | ||
"gitrepo", | ||
"Gossipable", | ||
"gossipsub", | ||
"grumpkin", | ||
"gtest", | ||
|
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 |
---|---|---|
|
@@ -54,6 +54,9 @@ | |
{ | ||
"path": "../types" | ||
}, | ||
{ | ||
"path": "../validator-client" | ||
}, | ||
{ | ||
"path": "../world-state" | ||
} | ||
|
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
28 changes: 17 additions & 11 deletions
28
yarn-project/circuit-types/src/p2p/block_attestation.test.ts
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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
// Serde test for the block attestation type | ||
import { makeHeader } from '@aztec/circuits.js/testing'; | ||
|
||
import { BlockAttestation } from './block_attestation.js'; | ||
|
||
const makeBlockAttestation = (): BlockAttestation => { | ||
const blockHeader = makeHeader(1); | ||
const signature = Buffer.alloc(64, 1); | ||
|
||
return new BlockAttestation(blockHeader, signature); | ||
}; | ||
import { makeBlockAttestation, randomSigner } from './mocks.js'; | ||
|
||
describe('Block Attestation serialization / deserialization', () => { | ||
it('Should serialize / deserialize', () => { | ||
const attestation = makeBlockAttestation(); | ||
it('Should serialize / deserialize', async () => { | ||
const attestation = await makeBlockAttestation(); | ||
|
||
const serialized = attestation.toBuffer(); | ||
const deserialized = BlockAttestation.fromBuffer(serialized); | ||
|
||
expect(deserialized).toEqual(attestation); | ||
}); | ||
|
||
it('Should serialize / deserialize + recover sender', async () => { | ||
const account = randomSigner(); | ||
|
||
const proposal = await makeBlockAttestation(account); | ||
const serialized = proposal.toBuffer(); | ||
const deserialized = BlockAttestation.fromBuffer(serialized); | ||
|
||
expect(deserialized).toEqual(proposal); | ||
|
||
// Recover signature | ||
const sender = await deserialized.getSender(); | ||
expect(sender.toChecksumString()).toEqual(account.address); | ||
}); | ||
}); |
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.
🫡