mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
cmd/keeper: clean up README
This commit is contained in:
parent
7ba31d5f3c
commit
067d574445
1 changed files with 20 additions and 46 deletions
|
|
@ -11,18 +11,29 @@ The keeper reads an RLP-encoded payload containing:
|
||||||
|
|
||||||
It then executes the block statelessly and validates that the computed state root and receipt root match the values in the block header.
|
It then executes the block statelessly and validates that the computed state root and receipt root match the values in the block header.
|
||||||
|
|
||||||
## Architecture
|
## Building Keeper
|
||||||
|
|
||||||
The keeper uses build tags to compile platform-specific input methods and chain configurations:
|
The keeper uses build tags to compile platform-specific input methods and chain configurations:
|
||||||
|
|
||||||
|
### Example Implementation
|
||||||
|
|
||||||
|
See `getpayload_example.go` for a complete example with embedded Hoodi block data:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build example with different chain configurations
|
||||||
|
go build -tags "example" ./cmd/keeper
|
||||||
```
|
```
|
||||||
cmd/keeper/
|
|
||||||
├── main.go # Main execution logic
|
### Ziren zkVM Implementation
|
||||||
├── getpayload_example.go # Example implementation with embedded data
|
|
||||||
├── getpayload_ziren.go # Ziren zkVM implementation
|
Build for the Ziren zkVM platform, which is a MIPS ISA-based zkvm:
|
||||||
└── ...
|
|
||||||
|
```bash
|
||||||
|
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -tags "ziren" ./cmd/keeper
|
||||||
```
|
```
|
||||||
|
|
||||||
|
As an example runner, refer to https://gist.github.com/gballet/7b669a99eb3ab2b593324e3a76abd23d
|
||||||
|
|
||||||
## Creating a Custom Platform Implementation
|
## Creating a Custom Platform Implementation
|
||||||
|
|
||||||
To add support for a new platform (e.g., "myplatform"), create a new file with the appropriate build tag:
|
To add support for a new platform (e.g., "myplatform"), create a new file with the appropriate build tag:
|
||||||
|
|
@ -56,40 +67,3 @@ func getInput() []byte {
|
||||||
return encodedPayload
|
return encodedPayload
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Build for Your Platform
|
|
||||||
|
|
||||||
```bash
|
|
||||||
go build -tags "myplatform" ./cmd/keeper
|
|
||||||
```
|
|
||||||
|
|
||||||
## Payload Structure
|
|
||||||
|
|
||||||
The payload is an RLP-encoded structure containing:
|
|
||||||
|
|
||||||
```go
|
|
||||||
type Payload struct {
|
|
||||||
Block *types.Block
|
|
||||||
Witness *stateless.Witness
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build Examples
|
|
||||||
|
|
||||||
### Example Implementation
|
|
||||||
See `getpayload_example.go` for a complete example with embedded Hoodi block data:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build example with different chain configurations
|
|
||||||
go build -tags "example" ./cmd/keeper
|
|
||||||
```
|
|
||||||
|
|
||||||
### Ziren zkVM Implementation
|
|
||||||
|
|
||||||
Build for the Ziren zkVM platform, which is a MIPS ISA-based zkvm:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -tags "ziren" ./cmd/keeper
|
|
||||||
```
|
|
||||||
|
|
||||||
As an example runner, refer to https://gist.github.com/gballet/7b669a99eb3ab2b593324e3a76abd23d
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue