-
Notifications
You must be signed in to change notification settings - Fork 264
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
base: main
Are you sure you want to change the base?
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
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 |
||
| 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.