Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
99004f9
add based sequencer initial implementation
gupadhyaya Apr 9, 2025
f15e495
Delete rollkit.toml
gupadhyaya Apr 9, 2025
130e752
use jsonrpc client if available
gupadhyaya Apr 9, 2025
1565fa5
use real DA for rollkit
gupadhyaya Apr 9, 2025
3f32b86
update ADR to include relaying cost
gupadhyaya Apr 10, 2025
0b9b4cf
add clarification to forkchoice and rollup light client
gupadhyaya Apr 10, 2025
3615d39
disabled gasPrice & gasMultiplier rpc calls, decode namespace as hex …
gupadhyaya Apr 10, 2025
71a455a
fix submit by adding the submit with options api that is supported in…
gupadhyaya Apr 10, 2025
e6baffb
add persistence to reaper and avoid submitting duplicate transactions
gupadhyaya Apr 10, 2025
fa00b6c
add persistence to pendingTxs in the sequencer
gupadhyaya Apr 10, 2025
814ea48
add last scanned da height, disable batch retrieve loop
gupadhyaya Apr 11, 2025
d0f535e
pluggable forkchoice
gupadhyaya Apr 11, 2025
18445c7
Merge branch 'feature/exec_api' into based
gupadhyaya Apr 14, 2025
b66a251
merge fixes
gupadhyaya Apr 14, 2025
55be1b3
force da start height as starting point for da scan
gupadhyaya Apr 15, 2025
70c4e8f
Merge branch 'feature/exec_api' into based
gupadhyaya Apr 16, 2025
e612a93
Merge branch 'feature/exec_api' into based
gupadhyaya Apr 16, 2025
d767c80
remove additional inits
gupadhyaya Apr 18, 2025
748de3e
capture the start context, add default interval
gupadhyaya Apr 18, 2025
4d49f64
submit with options fix
gupadhyaya Apr 18, 2025
ca6b4d9
remove GetTxs from lazy aggregation loop and comment out the test for…
gupadhyaya Apr 18, 2025
2665a88
Merge branch 'feature/exec_api' into based
gupadhyaya Apr 18, 2025
4297ab1
fixes
gupadhyaya Apr 18, 2025
922bfc6
lint
gupadhyaya Apr 18, 2025
2dbc2bd
cleanup
gupadhyaya Apr 18, 2025
fd9db02
more fixes
gupadhyaya Apr 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'feature/exec_api' into based
  • Loading branch information
gupadhyaya committed Apr 18, 2025
commit 2665a88f77fd900f6b23421555ade9d4ac74cb2e
125 changes: 0 additions & 125 deletions da/proxy/jsonrpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,131 +16,6 @@ import (

var log = logger.NewLogger(os.Stdout).With("module", "da-rpc")

// loggingDA wraps a da.DA implementation with logging capabilities.
type loggingDA struct {
baseDA da.DA
logger logger.Logger
}

// NewLoggingDA creates a new logging wrapper for a da.DA implementation.
func NewLoggingDA(base da.DA, log logger.Logger) da.DA {
return &loggingDA{
baseDA: base,
logger: log.With("layer", "server"),
}
}

// Implement da.DA interface for loggingDA
func (l *loggingDA) MaxBlobSize(ctx context.Context) (uint64, error) {
l.logger.Debug("RPC call received", "method", "MaxBlobSize")
res, err := l.baseDA.MaxBlobSize(ctx)
if err != nil {
l.logger.Error("RPC call failed", "method", "MaxBlobSize", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "MaxBlobSize", "result", res)
}
return res, err
}

func (l *loggingDA) Get(ctx context.Context, ids []da.ID, ns []byte) ([]da.Blob, error) {
l.logger.Debug("RPC call received", "method", "Get", "num_ids", len(ids), "namespace", string(ns))
res, err := l.baseDA.Get(ctx, ids, ns)
if err != nil {
l.logger.Error("RPC call failed", "method", "Get", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "Get", "num_blobs_returned", len(res))
}
return res, err
}

func (l *loggingDA) GetIDs(ctx context.Context, height uint64, ns []byte) (*da.GetIDsResult, error) {
l.logger.Debug("RPC call received", "method", "GetIDs", "height", height, "namespace", string(ns))
res, err := l.baseDA.GetIDs(ctx, height, ns)
if err != nil {
l.logger.Error("RPC call failed", "method", "GetIDs", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "GetIDs")
}
return res, err
}

func (l *loggingDA) GetProofs(ctx context.Context, ids []da.ID, ns []byte) ([]da.Proof, error) {
l.logger.Debug("RPC call received", "method", "GetProofs", "num_ids", len(ids), "namespace", string(ns))
res, err := l.baseDA.GetProofs(ctx, ids, ns)
if err != nil {
l.logger.Error("RPC call failed", "method", "GetProofs", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "GetProofs", "num_proofs_returned", len(res))
}
return res, err
}

func (l *loggingDA) Commit(ctx context.Context, blobs []da.Blob, ns []byte) ([]da.Commitment, error) {
l.logger.Debug("RPC call received", "method", "Commit", "num_blobs", len(blobs), "namespace", string(ns))
res, err := l.baseDA.Commit(ctx, blobs, ns)
if err != nil {
l.logger.Error("RPC call failed", "method", "Commit", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "Commit", "num_commitments_returned", len(res))
}
return res, err
}

func (l *loggingDA) Validate(ctx context.Context, ids []da.ID, proofs []da.Proof, ns []byte) ([]bool, error) {
l.logger.Debug("RPC call received", "method", "Validate", "num_ids", len(ids), "num_proofs", len(proofs), "namespace", string(ns))
res, err := l.baseDA.Validate(ctx, ids, proofs, ns)
if err != nil {
l.logger.Error("RPC call failed", "method", "Validate", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "Validate", "num_results_returned", len(res))
}
return res, err
}

func (l *loggingDA) Submit(ctx context.Context, blobs []da.Blob, gasPrice float64, ns []byte) ([]da.ID, error) {
l.logger.Debug("RPC call received", "method", "Submit", "num_blobs", len(blobs), "gas_price", gasPrice, "namespace", string(ns))
res, err := l.baseDA.Submit(ctx, blobs, gasPrice, ns)
if err != nil {
l.logger.Error("RPC call failed", "method", "Submit", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "Submit", "num_ids_returned", len(res))
}
return res, err
}

func (l *loggingDA) SubmitWithOptions(ctx context.Context, blobs []da.Blob, gasPrice float64, ns []byte, options []byte) ([]da.ID, error) {
l.logger.Debug("RPC call received", "method", "Submit", "num_blobs", len(blobs), "gas_price", gasPrice, "namespace", string(ns))
res, err := l.baseDA.SubmitWithOptions(ctx, blobs, gasPrice, ns, options)
if err != nil {
l.logger.Error("RPC call failed", "method", "Submit", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "Submit", "num_ids_returned", len(res))
}
return res, err
}

func (l *loggingDA) GasMultiplier(ctx context.Context) (float64, error) {
l.logger.Debug("RPC call received", "method", "GasMultiplier")
res, err := l.baseDA.GasMultiplier(ctx)
if err != nil {
l.logger.Error("RPC call failed", "method", "GasMultiplier", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "GasMultiplier", "result", res)
}
return res, err
}

func (l *loggingDA) GasPrice(ctx context.Context) (float64, error) {
l.logger.Debug("RPC call received", "method", "GasPrice")
res, err := l.baseDA.GasPrice(ctx)
if err != nil {
l.logger.Error("RPC call failed", "method", "GasPrice", "error", err)
} else {
l.logger.Debug("RPC call successful", "method", "GasPrice", "result", res)
}
return res, err
}

// Server is a jsonrpc service that can serve the DA interface
type Server struct {
srv *http.Server
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
github.com/rollkit/rollkit/core v0.0.0-20250312114929-104787ba1a4c
github.com/rollkit/rollkit/da v0.0.0-00010101000000-000000000000
github.com/rollkit/rollkit/sequencers/based v0.0.0-00010101000000-000000000000
github.com/rs/zerolog v1.33.0
github.com/rs/zerolog v1.34.0
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.19.0
Expand Down
10 changes: 5 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw=
connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8=
connectrpc.com/grpcreflect v1.3.0 h1:Y4V+ACf8/vOb1XOc251Qun7jMB75gCUNw6llvB9csXc=
connectrpc.com/grpcreflect v1.3.0/go.mod h1:nfloOtCS8VUQOQ1+GTdFzVg2CJo4ZGaat8JIovCtDYs=
cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g=
cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI=
cosmossdk.io/log v1.5.1 h1:wLwiYXmfrort/O+j6EkjF+HvbdrRQd+4cYCPKFSm+zM=
cosmossdk.io/log v1.5.1/go.mod h1:5cXXBvfBkR2/BcXmosdCSLXllvgSjphrrDVdfVRmBGM=
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
Expand Down Expand Up @@ -693,9 +693,9 @@ github.com/rollkit/go-sequencing v0.4.1 h1:P0x1wUFIAhdEeqUbrRAF343iExKhq9UkVOBbi
github.com/rollkit/go-sequencing v0.4.1/go.mod h1:QnOk8mqyVgFWdMnjvZVBG4x8GC/TsRtoN5XdPZzfCSs=
github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po=
github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.