Repository navigation
feat(da): sign blob submissions and broadcast over consensus gRPC #3483
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
base: main
Are you sure you want to change the base?
Changes from all commits
ea955fe
95159c6
882f079
903ad96
291ce91
afce813
ad3d884
4329a5a
af5b6d2
73142c8
2f42b28
f619830
3add9c8
2398a3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ import ( | |
| "github.com/evstack/ev-node/block" | ||
| "github.com/evstack/ev-node/core/execution" | ||
| coresequencer "github.com/evstack/ev-node/core/sequencer" | ||
| "github.com/evstack/ev-node/da/celestia" | ||
| "github.com/evstack/ev-node/execution/evm" | ||
| "github.com/evstack/ev-node/node" | ||
| rollcmd "github.com/evstack/ev-node/pkg/cmd" | ||
|
|
@@ -59,14 +60,28 @@ var RunCmd = &cobra.Command{ | |
| return err | ||
| } | ||
|
|
||
| var daOpts []block.DAClientOption | ||
| if nodeConfig.DA.TxSigner.Enabled && (nodeConfig.Node.Aggregator || nodeConfig.Node.Promotable) { | ||
|
Contributor
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
# Inspect the force-inclusion constructor and submission path on the PR branch.
rg -n -C 8 'func NewForceInclusionServer\(|daClient\.Submit\(|Node\.(Aggregator|Promotable)' apps/evm/server/force_inclusion.goRepository: evstack/ev-node Length of output: 1242 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- apps/evm/cmd/run.go relevant declarations and wiring ---'
rg -n -C 14 -F -e 'nodeConfig.DA.TxSigner.Enabled' -e 'NewForceInclusionServer(' -e 'forceInclusion' -e 'ForceInclusion' apps/evm/cmd/run.go || true
printf '%s\n' '--- force-inclusion constructor and handler context ---'
sed -n '1,95p' apps/evm/server/force_inclusion.go
sed -n '215,265p' apps/evm/server/force_inclusion.go
printf '%s\n' '--- force-inclusion configuration references ---'
rg -n -C 6 -F -e 'ForceInclusion' -e 'force-inclusion' -e 'force_inclusion' apps/evm | head -240 || trueRepository: evstack/ev-node Length of output: 24703 🏁 Script executed: sed -n '1,110p' apps/evm/server/force_inclusion.go; printf '\n--- run wiring ---\n'; rg -n -C 18 -F -e 'NewForceInclusionServer(' -e 'TxSigner.Enabled' apps/evm/cmd/run.go || true; printf '\n--- force inclusion references ---\n'; rg -n -C 5 -F -e 'ForceInclusion' -e 'force_inclusion' apps/evm/cmd apps/evm/server || trueRepository: evstack/ev-node Length of output: 32058 Enable signing for force-inclusion submissions. The Include force-inclusion servers in the signer condition, or reject this configuration during startup. 🤖 Prompt for AI Agents
Contributor
Author
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. This should probably be addressed
Contributor
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. @damiannolan I’ll plan the fix so force-inclusion submissions use the configured signer on follower nodes too.
You are interacting with an AI system. |
||
| signerCfg, err := celestia.ConfigFromNode(nodeConfig) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| submitter, err := celestia.New(cmd.Context(), signerCfg, logger) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to create DA tx signer: %w", err) | ||
| } | ||
| defer submitter.Close() | ||
| daOpts = append(daOpts, block.WithSubmitter(submitter)) | ||
| } | ||
|
|
||
| var daClient block.FullDAClient | ||
| if nodeConfig.DAEnabled() { | ||
| blobClient, err := blobrpc.NewWSClient(cmd.Context(), logger, nodeConfig.GetDAAddress(), nodeConfig.DA.AuthToken, "") | ||
| if err != nil { | ||
| return fmt.Errorf("failed to create blob client: %w", err) | ||
| } | ||
| defer blobClient.Close() | ||
| daClient = block.NewDAClient(blobClient, nodeConfig, logger) | ||
| daClient = block.NewDAClient(blobClient, nodeConfig, logger, daOpts...) | ||
| } else { | ||
| logger.Info().Msg("DA address is not configured; syncing through P2P only") | ||
| } | ||
|
|
@@ -139,7 +154,7 @@ var RunCmd = &cobra.Command{ | |
| }() | ||
| } | ||
|
|
||
| return rollcmd.StartNode(logger, cmd, executor, sequencer, nodeKey, datastore, nodeConfig, genesis, node.NodeOptions{}) | ||
| return rollcmd.StartNode(logger, cmd, executor, sequencer, nodeKey, datastore, nodeConfig, genesis, node.NodeOptions{}, daOpts...) | ||
| }, | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.