Skip to content

Commit 0543146

Browse files
authored
Merge branch 'main' into claude/issue-2532-20250808-1039
2 parents 04e0f68 + ca880b2 commit 0543146

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3331
-206
lines changed

.github/workflows/check_consts_drift.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Fetch Celestia App Consts
1818
id: fetch_celestia_consts
1919
run: |
20-
curl -sSL https://raw.githubusercontent.com/celestiaorg/celestia-app/main/pkg/appconsts/initial_consts.go -o /tmp/celestia_initial_consts.go
20+
curl -sSL https://raw.githubusercontent.com/celestiaorg/celestia-app/refs/tags/v5.0.1/pkg/appconsts/app_consts.go -o /tmp/celestia_initial_consts.go
2121
if [ $? -ne 0 ]; then
2222
echo "Failed to download Celestia app consts file."
2323
exit 1
@@ -60,29 +60,30 @@ jobs:
6060
6161
# Perform the diff and handle its exit code robustly
6262
diff_command_output=""
63-
if ! diff_command_output=$(diff -u "$LOCAL_FILE_TMP" "$CELESTIA_FILE_TMP"); then
64-
# diff exited with non-zero status
65-
diff_exit_code=$?
66-
if [ $diff_exit_code -eq 1 ]; then
67-
# Exit code 1 means files are different
68-
echo "Files are different (excluding last line)."
69-
echo "diff_output<<EOF" >> $GITHUB_OUTPUT
70-
echo "$diff_command_output" >> $GITHUB_OUTPUT
71-
echo "EOF" >> $GITHUB_OUTPUT
72-
echo "files_differ=true" >> $GITHUB_OUTPUT
73-
exit 1 # Fail the step
74-
else
75-
# Exit code > 1 means diff encountered an error
76-
echo "Error: diff command failed with exit code $diff_exit_code."
77-
echo "Diff command output/error: $diff_command_output"
78-
# Output error information for the issue
79-
echo "diff_output<<EOF" >> $GITHUB_OUTPUT
80-
echo "Diff command error (exit code $diff_exit_code):" >> $GITHUB_OUTPUT
81-
echo "$diff_command_output" >> $GITHUB_OUTPUT
82-
echo "EOF" >> $GITHUB_OUTPUT
83-
echo "files_differ=true" >> $GITHUB_OUTPUT # Treat as a difference to create an issue
84-
exit $diff_exit_code
85-
fi
63+
diff_exit_code=0
64+
diff_command_output=$(diff -u "$LOCAL_FILE_TMP" "$CELESTIA_FILE_TMP") || diff_exit_code=$?
65+
66+
if [ $diff_exit_code -eq 1 ]; then
67+
# Exit code 1 means files are different
68+
echo "Files are different (excluding last line)."
69+
echo "diff_output<<EOF" >> $GITHUB_OUTPUT
70+
echo "$diff_command_output" >> $GITHUB_OUTPUT
71+
echo "EOF" >> $GITHUB_OUTPUT
72+
echo "files_differ=true" >> $GITHUB_OUTPUT
73+
echo "::error::Celestia app consts have drifted. Please update da/jsonrpc/internal/consts.go"
74+
exit 1 # Fail the step
75+
elif [ $diff_exit_code -gt 1 ]; then
76+
# Exit code > 1 means diff encountered an error
77+
echo "Error: diff command failed with exit code $diff_exit_code."
78+
echo "Diff command output/error: $diff_command_output"
79+
# Output error information for the issue
80+
echo "diff_output<<EOF" >> $GITHUB_OUTPUT
81+
echo "Diff command error (exit code $diff_exit_code):" >> $GITHUB_OUTPUT
82+
echo "$diff_command_output" >> $GITHUB_OUTPUT
83+
echo "EOF" >> $GITHUB_OUTPUT
84+
echo "files_differ=true" >> $GITHUB_OUTPUT # Treat as a difference to create an issue
85+
echo "::error::Failed to compare files due to diff error"
86+
exit $diff_exit_code
8687
else
8788
# diff exited with 0, files are identical
8889
echo "Files are identical (excluding last line)."

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3535
### Fixed
3636

3737
<!-- Bug fixes -->
38-
-
38+
- Pass correct namespaces for header and data to the da layer for posting ([#2560](https://github.com/evstack/ev-node/pull/2560))
3939

4040
### Security
4141

apps/evm/single/cmd/run.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package cmd
22

33
import (
44
"context"
5+
"encoding/hex"
56
"fmt"
67
"path/filepath"
78

9+
"github.com/evstack/ev-node/core/da"
810
"github.com/evstack/ev-node/da/jsonrpc"
911
"github.com/evstack/ev-node/node"
1012
"github.com/evstack/ev-node/sequencers/single"
@@ -40,7 +42,12 @@ var RunCmd = &cobra.Command{
4042

4143
logger := rollcmd.SetupLogger(nodeConfig.Log)
4244

43-
daJrpc, err := jsonrpc.NewClient(context.Background(), logger, nodeConfig.DA.Address, nodeConfig.DA.AuthToken, nodeConfig.DA.Namespace)
45+
headerNamespace := da.PrepareNamespace([]byte(nodeConfig.DA.HeaderNamespace))
46+
dataNamespace := da.PrepareNamespace([]byte(nodeConfig.DA.DataNamespace))
47+
48+
logger.Info().Str("headerNamespace", hex.EncodeToString(headerNamespace)).Str("dataNamespace", hex.EncodeToString(dataNamespace)).Msg("namespaces")
49+
50+
daJrpc, err := jsonrpc.NewClient(context.Background(), logger, nodeConfig.DA.Address, nodeConfig.DA.AuthToken, nodeConfig.DA.GasPrice, nodeConfig.DA.GasMultiplier)
4451
if err != nil {
4552
return err
4653
}

apps/evm/single/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ require (
5454
github.com/buger/goterm v1.0.4 // indirect
5555
github.com/celestiaorg/go-header v0.6.6 // indirect
5656
github.com/celestiaorg/go-libp2p-messenger v0.2.2 // indirect
57-
github.com/celestiaorg/go-square/v2 v2.2.0 // indirect
5857
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
5958
github.com/cespare/xxhash/v2 v2.3.0 // indirect
6059
github.com/compose-spec/compose-go/v2 v2.6.0 // indirect

apps/evm/single/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ github.com/celestiaorg/go-header v0.6.6 h1:17GvSXU/w8L1YWHZP4pYm9/4YHA8iy5Ku2wTE
107107
github.com/celestiaorg/go-header v0.6.6/go.mod h1:RdnlTmsyuNerztNiJiQE5G/EGEH+cErhQ83xNjuGcaQ=
108108
github.com/celestiaorg/go-libp2p-messenger v0.2.2 h1:osoUfqjss7vWTIZrrDSy953RjQz+ps/vBFE7bychLEc=
109109
github.com/celestiaorg/go-libp2p-messenger v0.2.2/go.mod h1:oTCRV5TfdO7V/k6nkx7QjQzGrWuJbupv+0o1cgnY2i4=
110-
github.com/celestiaorg/go-square/v2 v2.2.0 h1:zJnUxCYc65S8FgUfVpyG/osDcsnjzo/JSXw/Uwn8zp4=
111-
github.com/celestiaorg/go-square/v2 v2.2.0/go.mod h1:j8kQUqJLYtcvCQMQV6QjEhUdaF7rBTXF74g8LbkR0Co=
112110
github.com/celestiaorg/utils v0.1.0 h1:WsP3O8jF7jKRgLNFmlDCwdThwOFMFxg0MnqhkLFVxPo=
113111
github.com/celestiaorg/utils v0.1.0/go.mod h1:vQTh7MHnvpIeCQZ2/Ph+w7K1R2UerDheZbgJEJD2hSU=
114112
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=

apps/grpc/single/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ Start the Evolve node with:
5555
--root-dir ~/.grpc-single \
5656
--grpc-executor-url http://localhost:50051 \
5757
--da.address http://localhost:7980 \
58-
--da.auth-token your-da-token \
59-
--chain-id your-chain-id
58+
--da.auth-token your-da-token
6059
```
6160

6261
## Command-Line Flags
@@ -93,12 +92,11 @@ Start the Evolve node with:
9392
3. Initialize and run the node:
9493

9594
```bash
96-
./grpc-single init --root-dir ~/.grpc-single
95+
./grpc-single init --root-dir ~/.grpc-single --chain-id test-chain
9796
./grpc-single start \
9897
--root-dir ~/.grpc-single \
9998
--grpc-executor-url http://localhost:50051 \
100-
--da.address http://localhost:7980 \
101-
--chain-id test-chain
99+
--da.address http://localhost:7980
102100
```
103101

104102
## Architecture

apps/grpc/single/cmd/run.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package cmd
22

33
import (
4+
"encoding/hex"
45
"fmt"
56
"path/filepath"
67

78
"github.com/spf13/cobra"
89

10+
coreda "github.com/evstack/ev-node/core/da"
911
"github.com/evstack/ev-node/core/execution"
1012
"github.com/evstack/ev-node/da/jsonrpc"
1113
executiongrpc "github.com/evstack/ev-node/execution/grpc"
@@ -45,8 +47,13 @@ The execution client must implement the Evolve execution gRPC interface.`,
4547

4648
logger := rollcmd.SetupLogger(nodeConfig.Log)
4749

50+
headerNamespace := coreda.PrepareNamespace([]byte(nodeConfig.DA.HeaderNamespace))
51+
dataNamespace := coreda.PrepareNamespace([]byte(nodeConfig.DA.DataNamespace))
52+
53+
logger.Info().Str("headerNamespace", hex.EncodeToString(headerNamespace)).Str("dataNamespace", hex.EncodeToString(dataNamespace)).Msg("namespaces")
54+
4855
// Create DA client
49-
daJrpc, err := jsonrpc.NewClient(cmd.Context(), logger, nodeConfig.DA.Address, nodeConfig.DA.AuthToken, nodeConfig.DA.Namespace)
56+
daJrpc, err := jsonrpc.NewClient(cmd.Context(), logger, nodeConfig.DA.Address, nodeConfig.DA.AuthToken, nodeConfig.DA.GasPrice, nodeConfig.DA.GasMultiplier)
5057
if err != nil {
5158
return err
5259
}

apps/grpc/single/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ require (
2020
github.com/beorn7/perks v1.0.1 // indirect
2121
github.com/celestiaorg/go-header v0.6.6 // indirect
2222
github.com/celestiaorg/go-libp2p-messenger v0.2.2 // indirect
23-
github.com/celestiaorg/go-square/v2 v2.2.0 // indirect
2423
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2524
github.com/containerd/cgroups v1.1.0 // indirect
2625
github.com/coreos/go-systemd/v22 v22.5.0 // indirect

apps/grpc/single/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ github.com/celestiaorg/go-header v0.6.6 h1:17GvSXU/w8L1YWHZP4pYm9/4YHA8iy5Ku2wTE
2727
github.com/celestiaorg/go-header v0.6.6/go.mod h1:RdnlTmsyuNerztNiJiQE5G/EGEH+cErhQ83xNjuGcaQ=
2828
github.com/celestiaorg/go-libp2p-messenger v0.2.2 h1:osoUfqjss7vWTIZrrDSy953RjQz+ps/vBFE7bychLEc=
2929
github.com/celestiaorg/go-libp2p-messenger v0.2.2/go.mod h1:oTCRV5TfdO7V/k6nkx7QjQzGrWuJbupv+0o1cgnY2i4=
30-
github.com/celestiaorg/go-square/v2 v2.2.0 h1:zJnUxCYc65S8FgUfVpyG/osDcsnjzo/JSXw/Uwn8zp4=
31-
github.com/celestiaorg/go-square/v2 v2.2.0/go.mod h1:j8kQUqJLYtcvCQMQV6QjEhUdaF7rBTXF74g8LbkR0Co=
3230
github.com/celestiaorg/utils v0.1.0 h1:WsP3O8jF7jKRgLNFmlDCwdThwOFMFxg0MnqhkLFVxPo=
3331
github.com/celestiaorg/utils v0.1.0/go.mod h1:vQTh7MHnvpIeCQZ2/Ph+w7K1R2UerDheZbgJEJD2hSU=
3432
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=

apps/testapp/cmd/run.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ package cmd
22

33
import (
44
"context"
5+
"encoding/hex"
56
"fmt"
67
"path/filepath"
78

89
"github.com/spf13/cobra"
910

1011
kvexecutor "github.com/evstack/ev-node/apps/testapp/kv"
12+
"github.com/evstack/ev-node/core/da"
1113
"github.com/evstack/ev-node/da/jsonrpc"
1214
"github.com/evstack/ev-node/node"
1315
rollcmd "github.com/evstack/ev-node/pkg/cmd"
@@ -45,7 +47,12 @@ var RunCmd = &cobra.Command{
4547
ctx, cancel := context.WithCancel(context.Background())
4648
defer cancel()
4749

48-
daJrpc, err := jsonrpc.NewClient(ctx, logger, nodeConfig.DA.Address, nodeConfig.DA.AuthToken, nodeConfig.DA.Namespace)
50+
headerNamespace := da.PrepareNamespace([]byte(nodeConfig.DA.HeaderNamespace))
51+
dataNamespace := da.PrepareNamespace([]byte(nodeConfig.DA.DataNamespace))
52+
53+
logger.Info().Str("headerNamespace", hex.EncodeToString(headerNamespace)).Str("dataNamespace", hex.EncodeToString(dataNamespace)).Msg("namespaces")
54+
55+
daJrpc, err := jsonrpc.NewClient(ctx, logger, nodeConfig.DA.Address, nodeConfig.DA.AuthToken, nodeConfig.DA.GasPrice, nodeConfig.DA.GasMultiplier)
4956
if err != nil {
5057
return err
5158
}

0 commit comments

Comments
 (0)