Skip to content

fix: Add network timeout ctx to Espresso client - #534

Open
Sneh1999 wants to merge 1 commit into
espresso/batcherfrom
add-network-timeout-espresso-client
Open

Sneh1999 wants to merge 1 commit into
espresso/batcherfrom
add-network-timeout-espresso-client

Conversation

@Sneh1999

@Sneh1999 Sneh1999 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Add a network timeout to every Espresso SDK operation.
  • Add a timeout to streamer L1/L2 RPC calls.
  • Clear the stopped Espresso streamer so restarts do not re-anchor against stale state.

"time"

espressoClient "github.com/EspressoSystems/espresso-network/sdks/go/client"
sdkclient "github.com/EspressoSystems/espresso-network/sdks/go/client"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why this rename?

return block.Hash(), nil
}

// networkTimeoutCtx bounds a single external call with the configured network

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we keep that comment?

channelMgr: state,
degradedLog: oplog.NewRepeatStateLogger(),
}
if batcher.Espresso.Client != nil {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggestion: introduce a startEspressoStreamer() function similar to stopEspressoStreamer().

@philippecamacho philippecamacho left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some minor suggestions. LGTM. (PLEASE DO NOT MERGE before cLabs approval.)

@jjeangal jjeangal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor comment. I do not have much to say that hasn't been said.

type EspressoTransactionSubmitterConfig struct {
Ctx context.Context
EspressoClient espressoClient.EspressoClient
EspressoClient espressoSubmissionClient

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we also rename EspressoClient to EspressoSubmissionClient?

This branch has not been deployed

No deployments
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.

3 participants