-
Notifications
You must be signed in to change notification settings - Fork 194
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
Disperser auth innabox #1052
Conversation
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
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.
lgtm!
inabox/deploy/deploy.go
Outdated
|
||
keyManager := kms.New(kms.Options{ | ||
Region: "us-east-1", | ||
BaseEndpoint: aws.String("http://localhost:4570"), // TODO don't hard code this |
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.
can we do this in this PR?
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.
Oops, was my intention but I forgot. Now fixed.
Signed-off-by: Cody Littley <[email protected]>
core/eth/writer.go
Outdated
@@ -6,6 +6,9 @@ import ( | |||
"encoding/hex" | |||
"encoding/json" | |||
"fmt" | |||
"github.com/Layr-Labs/eigenda/api" | |||
contractEigenDADisperserRegistry "github.com/Layr-Labs/eigenda/contracts/bindings/EigenDADisperserRegistry" |
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.
use lowecase for alias
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.
renamed to dreg
return fmt.Errorf("failed to set disperser address: %w", err) | ||
} | ||
|
||
return nil |
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.
Does this need to wait for txn to be mined?
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.
I've added a retry loop in the function that calls this function. It will now wait for up to a minute if the disperser address is not available on chain.
// Read the disperser's public key from on-chain storage to verify it was written correctly
retryTimeout := time.Now().Add(1 * time.Minute)
ticker := time.NewTicker(1 * time.Second)
for time.Now().Before(retryTimeout) {
address, err := writer.GetDisperserAddress(context.Background(), 0)
if err != nil {
logger.Warnf("could not get disperser address: %v", err)
} else {
if address != env.DisperserAddress {
return fmt.Errorf("expected disperser address %s, got %s", env.DisperserAddress, address)
}
return nil
}
<- ticker.C
}
return fmt.Errorf("timed out waiting for disperser address to be set")
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.
Would EstimateGasPriceAndLimitAndSendTx
in the ethclient work cleaner?
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.
This caused errors. I initially tried to use this method, but later in the test run I'd get failures with the following error message:
{
"time":"2025-01-03T16:28:01.407636692Z",
"level":"ERROR",
"source":{
"function":"github.com/Layr-Labs/eigenda/core/eth.(*Reader).GetOperatorStakesForQuorums",
"file":"/home/runner/work/eigenda/eigenda/core/eth/reader.go",
"line":437
},
"msg":"Failed to fetch operator state",
"component":"Reader",
"err":"execution reverted: IndexRegistry._operatorCountAtBlockNumber: quorum did not exist at given block number"
}
I spent a lot of time on this and was never able to determine how these two things were related. But as soon as I switched to using SendTransaction
, the problem went away.
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Why are these changes needed?
Enable
StoreChunks()
signing in inabox tests.Checks