-
Notifications
You must be signed in to change notification settings - Fork 175
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
Relay authentication #911
Merged
cody-littley
merged 38 commits into
Layr-Labs:master
from
cody-littley:relay-authentication
Nov 21, 2024
Merged
Relay authentication #911
Changes from 4 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
02e9069
Added rate limiting.
cody-littley dc39c21
Properly handle blob sizes.
cody-littley d99fd39
Incremental progress.
cody-littley e39eaf9
Incremental progress.
cody-littley 876ec69
Merge branch 'master' into relay-rate-limits2
cody-littley 9500f4f
unit tests
cody-littley ffe18c6
Unit tests.
cody-littley 79d9614
Fix tests.
cody-littley c1d83e6
Cleanup.
cody-littley ed4daca
Added get chunks request hashing.
cody-littley 3438b92
Start work on authenticator.
cody-littley b5dc37c
Fix test issue.
cody-littley b420cca
Cleanup
cody-littley 517b78e
Merge branch 'master' into relay-rate-limits2
cody-littley 7982aec
Convert config to flag pattern.
cody-littley 366fdf7
Simplify rate limiter classes.
cody-littley f2c10e4
Made suggested changes.
cody-littley 0f95ce4
Merge branch 'relay-rate-limits2' into relay-authentication
cody-littley c2bb9c3
Shorten package name.
cody-littley 151305b
Started testing
cody-littley 29fd940
Finished unit tests.
cody-littley 3993af4
Nil authenticator test.
cody-littley d094b80
Test with authentication saving disabled.
cody-littley d8691e1
Tie together config.
cody-littley 8b9512b
Add method for convenient signing.
cody-littley fb7ec51
Made requested changes.
cody-littley 6325f0c
Merge branch 'master' into relay-authentication
cody-littley 5f853e0
Revert unintentional changes.
cody-littley f22544c
Fix bug.
cody-littley 7a26c27
Made requested changes.
cody-littley d21e0bc
Update proto documentation.
cody-littley 98a8469
Add key caching.
cody-littley 5948e73
lint
cody-littley cc62eac
Make requested changes.
cody-littley 0372ee9
Made suggested changes.
cody-littley 97cc318
Made requested changes.
cody-littley fea251a
Add preloading of keys.
cody-littley fe82924
Made suggested changes.
cody-littley 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,6 +210,13 @@ var ( | |
EnvVar: common.PrefixEnvVar(envVarPrefix, "INDEXER_PULL_INTERVAL"), | ||
Value: 5 * time.Minute, | ||
} | ||
AuthenticationKeyCacheSizeFlag = cli.IntFlag{ | ||
Name: common.PrefixFlag(FlagPrefix, "authentication-key-cache-size"), | ||
Usage: "Max number of items in the authentication key cache", | ||
Required: false, | ||
EnvVar: common.PrefixEnvVar(envVarPrefix, "AUTHENTICATION_KEY_CACHE_SIZE"), | ||
Value: 1024 * 1024, | ||
} | ||
AuthenticationTimeoutFlag = cli.DurationFlag{ | ||
Name: common.PrefixFlag(FlagPrefix, "authentication-timeout"), | ||
Usage: "Duration to keep authentication results", | ||
|
@@ -232,8 +239,6 @@ var requiredFlags = []cli.Flag{ | |
RelayIDsFlag, | ||
BlsOperatorStateRetrieverAddrFlag, | ||
EigenDAServiceManagerAddrFlag, | ||
AuthenticationTimeoutFlag, | ||
AuthenticationDisabledFlag, | ||
} | ||
|
||
var optionalFlags = []cli.Flag{ | ||
|
@@ -260,6 +265,9 @@ var optionalFlags = []cli.Flag{ | |
GetChunkBytesBurstinessClientFlag, | ||
MaxConcurrentGetChunkOpsClientFlag, | ||
IndexerPullIntervalFlag, | ||
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. We can remove this, right? |
||
AuthenticationKeyCacheSizeFlag, | ||
AuthenticationTimeoutFlag, | ||
AuthenticationDisabledFlag, | ||
} | ||
|
||
var Flags []cli.Flag | ||
|
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.
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.
Make it private and run in the the NewRequestAuthenticator?
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.
change made