Skip to content

Conversation

cody-littley
Copy link
Contributor

Why are these changes needed?

Allow relay protobufs to be larger.

Signed-off-by: Cody Littley <[email protected]>
@@ -314,7 +315,7 @@ func (c *disperserClient) initOnceGrpcConnection() error {
var initErr error
c.initOnceGrpc.Do(func() {
addr := fmt.Sprintf("%v:%v", c.config.Hostname, c.config.Port)
dialOptions := getGrpcDialOptions(c.config.UseSecureGrpcFlag)
dialOptions := getGrpcDialOptions(c.config.UseSecureGrpcFlag, 4*units.MiB)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this already the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 4mb is the default. I added an argument to getGrpcDialOptions(), and so in this non-relay code I just preserved the prior behavior.

Signed-off-by: Cody Littley <[email protected]>
@@ -278,6 +279,13 @@ var (
EnvVar: common.PrefixEnvVar(EnvVarPrefix, "DISPERSAL_AUTHENTICATION_TIMEOUT"),
Value: time.Minute,
}
RelayMaxGRPCMessageSizeFlag = cli.IntFlag{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be added to optionalFlags below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, added

@@ -66,7 +67,7 @@ var (
Usage: "The size of the blob cache, in bytes.",
Required: false,
EnvVar: common.PrefixEnvVar(envVarPrefix, "BLOB_CACHE_SIZE"),
Value: 1024 * 1024 * 1024,
Value: units.GiB,
Copy link
Contributor

@ian-shim ian-shim Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what we're provisioning in prod, but these should be a lot bigger, no?
probably fine to leave it 1 GiB here. We can provision different values depending on the machine type in prod

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set this to 1gb when working on OOM problems. Now that the cache can correctly gauge its size, I'm ok changing it back higher again. It is now 8 * units.GiB in this PR.

Signed-off-by: Cody Littley <[email protected]>
@cody-littley cody-littley merged commit 91f7e6e into Layr-Labs:master Jan 28, 2025
8 checks passed
@cody-littley cody-littley deleted the larger-protos branch January 28, 2025 20:00
@cody-littley cody-littley self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants