-
Notifications
You must be signed in to change notification settings - Fork 271
feat: add key rotation #3282
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: add key rotation #3282
Changes from 2 commits
da7b970
6a0f367
6ad13f2
45a7d75
8db31f9
6b2db4b
656944d
2fbd381
e505b36
7b4011c
68997e7
04f6b12
0b7bb5a
da43b26
e8ce3b9
c811388
3d349ed
de542e2
ea805f7
6686e6a
a5bac4e
2b53162
e5537b8
b6baa26
bd2c237
31d3993
e18383d
f1e8765
66e21e0
a07fc20
1e15672
58ea3e8
0a50aa6
a145fa0
df99024
a55f5e4
f0a8943
dc0d874
5fa2b17
5bb20d5
6638ec9
5f65532
cb61c77
70232ed
5de475b
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 |
|---|---|---|
|
|
@@ -299,7 +299,7 @@ func (r *daRetriever) tryDecodeHeader(bz []byte, daHeight uint64) *types.SignedH | |
| return nil | ||
| } | ||
|
|
||
| if err := r.assertExpectedProposer(header.ProposerAddress); err != nil { | ||
|
Member
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. I have a problem with this (and the one after -- which wasn't deleted for data for some reason), because we have some optimistic logic below and we save things in the cache: Additionally the contract is that no one can craft invalid sig first as it will get rejected here. This is important because we discard anything after: https://github.com/evstack/ev-node/blob/v1.1.1/block/internal/syncing/da_retriever.go#L174-L193
Contributor
Author
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. has this been resolved?
Contributor
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. Yes, this should be resolved now. The DA path checks the expected proposer before the header is stored as pending or marked DA-included: If a mismatched header still reaches block validation, it is rejected as a header fault through Tests cover this in |
||
| if err := r.assertExpectedProposer(header); err != nil { | ||
| r.logger.Debug().Err(err).Msg("unexpected proposer") | ||
| return nil | ||
| } | ||
|
|
@@ -355,9 +355,9 @@ func (r *daRetriever) tryDecodeData(bz []byte, daHeight uint64) *types.Data { | |
| return &signedData.Data | ||
| } | ||
|
|
||
| // assertExpectedProposer validates the proposer address | ||
| func (r *daRetriever) assertExpectedProposer(proposerAddr []byte) error { | ||
| return assertExpectedProposer(r.genesis, proposerAddr) | ||
| // assertExpectedProposer validates the proposer schedule entry for the header height. | ||
| func (r *daRetriever) assertExpectedProposer(header *types.SignedHeader) error { | ||
| return assertExpectedProposer(r.genesis, header.Height(), header.ProposerAddress, header.Signer.PubKey) | ||
| } | ||
|
|
||
| // assertValidSignedData validates signed data using the configured signature provider | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.