Skip to content
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

Disperser auth innabox #1052

Merged
merged 108 commits into from
Jan 10, 2025
Merged
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
0936f5f
Enable TLS connections between the disperser and the DA nodes.
cody-littley Dec 4, 2024
d36424e
Incremental progress.
cody-littley Dec 4, 2024
342d500
Moar cowsay
cody-littley Dec 4, 2024
fd2ab69
formatting
cody-littley Dec 4, 2024
e2e3fef
Started working on unit test.
cody-littley Dec 4, 2024
4373095
Incremental progress.
cody-littley Dec 4, 2024
df38980
It works now, kind of
cody-littley Dec 4, 2024
d54c7f7
Incremental progress.
cody-littley Dec 5, 2024
083d67d
Start experimenting with ecdsa.
cody-littley Dec 6, 2024
0a5c91a
Authorize StoreChunks() requests.
cody-littley Dec 10, 2024
8e9c16b
Merge branch 'master' into disperser-auth
cody-littley Dec 10, 2024
f348550
Update docs.
cody-littley Dec 10, 2024
01b7ece
Incremental progress.
cody-littley Dec 11, 2024
e09a77c
Incremental progress.
cody-littley Dec 11, 2024
290c93c
Incremental progress.
cody-littley Dec 11, 2024
5ba4b7b
Incremental progress.
cody-littley Dec 11, 2024
e094371
Added test placeholder.
cody-littley Dec 11, 2024
db0885a
shuffle stuff around
cody-littley Dec 12, 2024
da2ca6c
Merge branch 'master' into disperser-auth
cody-littley Dec 12, 2024
b04fcfa
Unit tests for request signing.
cody-littley Dec 12, 2024
29e7e7d
Delete stale code.
cody-littley Dec 12, 2024
fb1ebfb
Get things kind of working
cody-littley Dec 12, 2024
6ca7c9b
Finished unit tests.
cody-littley Dec 13, 2024
3348883
Cleanup.
cody-littley Dec 13, 2024
e5966f0
Cleanup
cody-littley Dec 13, 2024
f28a5d4
Merge branch 'master' into disperser-auth
cody-littley Dec 16, 2024
f0c6f4e
Cleanup.
cody-littley Dec 16, 2024
6a00256
Added request signer.
cody-littley Dec 16, 2024
27d5b8a
Incremental progress.
cody-littley Dec 16, 2024
bbd82ec
Update flags.
cody-littley Dec 16, 2024
157c2ea
Started work on unit test, not yet working.
cody-littley Dec 16, 2024
d793501
Incremental progress in kludging something together
cody-littley Dec 16, 2024
b81e430
Incremental test iteration.
cody-littley Dec 16, 2024
7327db1
Added debug printing.
cody-littley Dec 17, 2024
8cfa971
IT'S ALIVE!
cody-littley Dec 17, 2024
306746e
Partial cleanup.
cody-littley Dec 17, 2024
b41d729
Move code to proper locations.
cody-littley Dec 17, 2024
d709520
Copy eigensdk-go implementation of kms parsing.
cody-littley Dec 17, 2024
2e44b02
Update kms.go
anupsv Dec 18, 2024
aebda81
Create kms_fuzz_test.go
anupsv Dec 18, 2024
260bf79
Update Makefile for fuzz tests
anupsv Dec 18, 2024
dbd0d24
Merge pull request #1 from anupsv/disperser-auth
cody-littley Dec 18, 2024
5dbb178
Merge branch 'master' into disperser-auth
cody-littley Dec 18, 2024
dcd3e06
Disable request signing if KMS key name is not provided.
cody-littley Dec 18, 2024
11cf45a
Merge branch 'master' into disperser-auth
cody-littley Dec 18, 2024
3580bed
Merge branch 'master' into disperser-auth
cody-littley Dec 18, 2024
f6b008f
Tie into bindings.
cody-littley Dec 18, 2024
1493ded
Incremental progress.
cody-littley Dec 18, 2024
feab7a1
Merge branch 'master' into disperser-auth
cody-littley Dec 19, 2024
52f2354
Add debug code.
cody-littley Dec 19, 2024
7c5cc93
Fix unit test.
cody-littley Dec 19, 2024
c83db79
Disable request signing for inabox e2e test.
cody-littley Dec 19, 2024
e5cb69c
Added flag for disabling signing.
cody-littley Dec 19, 2024
20216c4
Cleanup.
cody-littley Dec 19, 2024
3c325ef
Made suggested changes.
cody-littley Dec 20, 2024
d4b7051
Start messing around with external KMS keys.
cody-littley Dec 20, 2024
02ed38a
tweak docker build
cody-littley Dec 20, 2024
60ad5c9
Merge branch 'disperser-auth' into disperser-auth-innabox
cody-littley Dec 20, 2024
8560b8b
Remove test.
cody-littley Dec 20, 2024
613bd20
Generate kms key pair.
cody-littley Dec 20, 2024
4912547
Fix localstack url
cody-littley Dec 20, 2024
80c7e6d
Make requested changes.
cody-littley Dec 20, 2024
2b6cbb2
Made suggested changes.
cody-littley Dec 20, 2024
a9155a0
Merge branch 'master' into disperser-auth
cody-littley Jan 2, 2025
3a9792c
Merge branch 'disperser-auth' into disperser-auth-innabox
cody-littley Jan 2, 2025
a57140c
Add debug stack trace.
cody-littley Jan 2, 2025
11e2ffa
Tweak stack trace.
cody-littley Jan 2, 2025
ad89396
Tweak aws URL
cody-littley Jan 2, 2025
a2b602e
Manually start localstack.
cody-littley Jan 2, 2025
db018f0
Don't start localstack for churner test.
cody-littley Jan 2, 2025
d1ac4a8
Skip key generation when localstack is not running.
cody-littley Jan 2, 2025
822ab3d
Write code that sets disperser address.
cody-littley Jan 2, 2025
ee262bc
Enable StoreChunks() signing
cody-littley Jan 2, 2025
262e1a9
Change where the disperser address is written to contract.
cody-littley Jan 2, 2025
d32d0a8
Wait for disperser address transaction to be handled.
cody-littley Jan 3, 2025
1f42f9d
Actually submit transaction.
cody-littley Jan 3, 2025
7caac2c
Create a block every second.
cody-littley Jan 3, 2025
20fd4da
Use client with no confirmations.
cody-littley Jan 3, 2025
b09a43e
Revert anvil change
cody-littley Jan 3, 2025
6f9e242
Change where disperser address is updated.
cody-littley Jan 3, 2025
0a3e35b
Add stack trace.
cody-littley Jan 6, 2025
d92252d
Increase stack trace size.
cody-littley Jan 6, 2025
524b22a
Tweak stack trace.
cody-littley Jan 6, 2025
7971b13
Multiple log statements.
cody-littley Jan 6, 2025
e07b734
Update disperser address earlier.
cody-littley Jan 6, 2025
8452d09
Initiate logger earlier.
cody-littley Jan 6, 2025
987b26c
Made suggested change.
cody-littley Jan 6, 2025
525e37f
Reshuffle code.
cody-littley Jan 6, 2025
87a7610
Tweaks.
cody-littley Jan 6, 2025
3852dc7
Play with ordering.
cody-littley Jan 6, 2025
a305e93
Relocate code.
cody-littley Jan 6, 2025
568e971
Try moving disperser setup again.
cody-littley Jan 6, 2025
c77e596
move code
cody-littley Jan 6, 2025
7371497
Tweaks
cody-littley Jan 6, 2025
eca25b9
Use other eth client.
cody-littley Jan 6, 2025
26ec866
Made suggested changes.
cody-littley Jan 7, 2025
76efb7a
Lint
cody-littley Jan 7, 2025
afe242f
Debug log
cody-littley Jan 7, 2025
4419be1
Enable store chunks request signing.
cody-littley Jan 7, 2025
09b14ce
Generate key prior to writing env files.
cody-littley Jan 7, 2025
cd1bfc6
Merge branch 'master' into disperser-auth
cody-littley Jan 8, 2025
35caefb
Merge branch 'disperser-auth' into disperser-auth-innabox
cody-littley Jan 8, 2025
7355080
Fix merge conflict.
cody-littley Jan 8, 2025
6abb354
Merge branch 'master' into disperser-auth-innabox
cody-littley Jan 8, 2025
6003a89
Cleanup
cody-littley Jan 8, 2025
8cbdd60
Made suggested change
cody-littley Jan 9, 2025
cba0358
Made suggested changes.
cody-littley Jan 9, 2025
57abb29
Fix test issue
cody-littley Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into disperser-auth
Signed-off-by: Cody Littley <[email protected]>
cody-littley committed Dec 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 11cf45a5fc260984bfcd1afd7581f3ab3b43e052
34 changes: 31 additions & 3 deletions common/testutils/random/test_random.go
Original file line number Diff line number Diff line change
@@ -2,10 +2,14 @@ package random

import (
"crypto/ecdsa"
crand "crypto/rand"
"fmt"
"github.com/Layr-Labs/eigenda/core"
"github.com/consensys/gnark-crypto/ecc/bn254/fr"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/require"
"io"
"math/big"
"math/rand"
"testing"
"time"
@@ -69,7 +73,6 @@ func (r *TestRandom) Time() time.Time {

// String generates a random string out of printable ASCII characters.
func (r *TestRandom) String(length int) string {
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
b := make([]byte, length)
for i := range b {
b[i] = charset[r.Intn(len(charset))]
@@ -84,13 +87,38 @@ type randIOReader struct {
rand *TestRandom
}

// Read reads random bytes into the provided buffer, returning the number of bytes read.
func (i *randIOReader) Read(p []byte) (n int, err error) {
return i.rand.Read(p)
}

// ECDSA generates a random ECDSA key. FOR TESTING PURPOSES ONLY. DO NOT USE THESE KEYS FOR SECURITY PURPOSES.
// IOReader creates an io.Reader that reads from a random number generator.
func (r *TestRandom) IOReader() io.Reader {
return &randIOReader{r}
}

// ECDSA generates a random ECDSA key. Note that the returned keys are not deterministic due to limitations
// **intentionally** imposed by the Go standard libraries. (╯°□°)╯︵ ┻━┻
//
// NOT CRYPTOGRAPHICALLY SECURE!!! FOR TESTING PURPOSES ONLY. DO NOT USE THESE KEYS FOR SECURITY PURPOSES.
func (r *TestRandom) ECDSA() (*ecdsa.PublicKey, *ecdsa.PrivateKey) {
key, err := ecdsa.GenerateKey(crypto.S256(), &randIOReader{r})
key, err := ecdsa.GenerateKey(crypto.S256(), crand.Reader)
require.NoError(r.t, err)
return &key.PublicKey, key
}

// BLS generates a random BLS key pair.
//
// NOT CRYPTOGRAPHICALLY SECURE!!! FOR TESTING PURPOSES ONLY. DO NOT USE THESE KEYS FOR SECURITY PURPOSES.
func (r *TestRandom) BLS() *core.KeyPair {
//Max random value is order of the curve
maxValue := new(big.Int)
maxValue.SetString(fr.Modulus().String(), 10)

//Generate cryptographically strong pseudo-random between 0 - max
n, err := crand.Int(r.IOReader(), maxValue)
require.NoError(r.t, err)

sk := new(core.PrivateKey).SetBigInt(n)
return core.MakeKeyPair(sk)
}
You are viewing a condensed version of this merge commit. You can view the full changes here.