This repository was archived by the owner on Apr 2, 2025. It is now read-only.
generated from evstack/template-da-repo
-
Notifications
You must be signed in to change notification settings - Fork 5
chore: Initial Execution API #9
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6028e95
feat: add Execute interface
jim380 52076f8
chore: add proto
jim380 376e933
feat: add grpc proxy and mocks
jim380 d255749
fix: go module path
jim380 f2b482c
feat: grpc proxy
jim380 f38ab59
feat: json rpc proxy
jim380 b7513b5
chore: change github org name
jim380 8aef19e
chore: change pkg path in mockery.yaml
jim380 645f5d3
chore: change go_package in execution.proto
jim380 ac98ac8
chore: clean up proto
jim380 5f01648
chore: remove rollkit as a dependency
jim380 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| with-expecter: true | ||
| packages: | ||
| github.com/rollkit/go-execution: | ||
| interfaces: | ||
| Execute: | ||
| config: | ||
| dir: mocks | ||
| outpkg: mocks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| version: v1beta1 | ||
|
|
||
| # The plugins to run. | ||
| plugins: | ||
| # The name of the plugin. | ||
| - name: | ||
| gocosmos | ||
| # The the relative output directory. | ||
| out: types/pb | ||
| # Any options to provide to the plugin. | ||
| opt: | ||
| - Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types | ||
| - Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration | ||
| - Mgoogle/protobuf/wrappers.proto=github.com/cosmos/gogoproto/types | ||
| - plugins=grpc | ||
| - paths=source_relative |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Generated by buf. DO NOT EDIT. | ||
| version: v1 | ||
| deps: | ||
| - remote: buf.build | ||
| owner: cosmos | ||
| repository: gogo-proto | ||
| commit: 88ef6483f90f478fb938c37dde52ece3 | ||
| digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| version: v1beta1 | ||
| deps: | ||
| - buf.build/cosmos/gogo-proto | ||
| build: | ||
| roots: | ||
| - proto | ||
| lint: | ||
| use: | ||
| - STANDARD | ||
| - COMMENTS | ||
| - FILE_LOWER_SNAKE_CASE | ||
| except: | ||
| - COMMENT_ENUM | ||
| - COMMENT_ENUM_VALUE | ||
| - COMMENT_MESSAGE | ||
| - COMMENT_RPC | ||
| - COMMENT_SERVICE | ||
| - COMMENT_FIELD | ||
| - PACKAGE_VERSION_SUFFIX | ||
| - RPC_REQUEST_STANDARD_NAME | ||
| - SERVICE_SUFFIX | ||
| - UNARY_RPC | ||
| ignore: | ||
| breaking: | ||
| use: | ||
| - FILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package execution | ||
|
|
||
| import ( | ||
| "time" | ||
|
|
||
| "github.com/rollkit/go-execution/types" | ||
| ) | ||
|
|
||
| // Execute defines a common interface for interacting with the execution client. | ||
| type Execute interface { | ||
| // InitChain initializes the blockchain with genesis information. | ||
| InitChain( | ||
| genesisTime time.Time, | ||
| initialHeight uint64, | ||
| chainID string, | ||
gupadhyaya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ) ( | ||
| stateRoot types.Hash, | ||
| maxBytes uint64, | ||
| err error, | ||
| ) | ||
|
|
||
| // GetTxs retrieves all available transactions from the execution client's mempool. | ||
| GetTxs() ([]types.Tx, error) | ||
jim380 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // ExecuteTxs executes a set of transactions to produce a new block header. | ||
| ExecuteTxs( | ||
| txs []types.Tx, | ||
Manav-Aggarwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| blockHeight uint64, | ||
| timestamp time.Time, | ||
| prevStateRoot types.Hash, | ||
gupadhyaya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ) ( | ||
| updatedStateRoot types.Hash, | ||
Manav-Aggarwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| maxBytes uint64, | ||
| err error, | ||
| ) | ||
|
|
||
| // SetFinal marks a block at the given height as final. | ||
| SetFinal( | ||
| blockHeight uint64, | ||
| ) error | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,59 @@ | ||
| module github.com/rollkit/template-da-repo | ||
| module github.com/rollkit/go-execution | ||
|
|
||
| go 1.21.0 | ||
| go 1.22 | ||
|
|
||
| toolchain go1.22.4 | ||
|
|
||
| require ( | ||
| github.com/celestiaorg/go-header v0.6.2 | ||
| github.com/cosmos/gogoproto v1.5.0 | ||
| github.com/stretchr/testify v1.9.0 | ||
| google.golang.org/grpc v1.65.0 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
| github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect | ||
| github.com/gogo/protobuf v1.3.2 // indirect | ||
| github.com/google/go-cmp v0.6.0 // indirect | ||
| github.com/gorilla/websocket v1.5.3 // indirect | ||
| github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect | ||
| github.com/ipfs/go-cid v0.4.1 // indirect | ||
| github.com/ipfs/go-log/v2 v2.5.1 // indirect | ||
| github.com/klauspost/cpuid/v2 v2.2.7 // indirect | ||
| github.com/kr/pretty v0.3.1 // indirect | ||
| github.com/libp2p/go-buffer-pool v0.1.0 // indirect | ||
| github.com/libp2p/go-libp2p v0.35.0 // indirect | ||
| github.com/libp2p/go-libp2p-pubsub v0.11.0 // indirect | ||
| github.com/libp2p/go-msgio v0.3.0 // indirect | ||
| github.com/mattn/go-isatty v0.0.20 // indirect | ||
| github.com/minio/sha256-simd v1.0.1 // indirect | ||
| github.com/mr-tron/base58 v1.2.0 // indirect | ||
| github.com/multiformats/go-base32 v0.1.0 // indirect | ||
| github.com/multiformats/go-base36 v0.2.0 // indirect | ||
| github.com/multiformats/go-multiaddr v0.13.0 // indirect | ||
| github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect | ||
| github.com/multiformats/go-multibase v0.2.0 // indirect | ||
| github.com/multiformats/go-multicodec v0.9.0 // indirect | ||
| github.com/multiformats/go-multihash v0.2.3 // indirect | ||
| github.com/multiformats/go-multistream v0.5.0 // indirect | ||
| github.com/multiformats/go-varint v0.0.7 // indirect | ||
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
| github.com/rogpeppe/go-internal v1.11.0 // indirect | ||
| github.com/spaolacci/murmur3 v1.1.0 // indirect | ||
| github.com/stretchr/objx v0.5.2 // indirect | ||
| go.uber.org/multierr v1.11.0 // indirect | ||
| go.uber.org/zap v1.27.0 // indirect | ||
| golang.org/x/crypto v0.25.0 // indirect | ||
| golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect | ||
| golang.org/x/net v0.27.0 // indirect | ||
| golang.org/x/sys v0.22.0 // indirect | ||
| golang.org/x/text v0.16.0 // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect | ||
| google.golang.org/protobuf v1.34.2 // indirect | ||
| gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| lukechampine.com/blake3 v1.2.1 // indirect | ||
| ) | ||
|
|
||
| // Add other dependencies as needed |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.