Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
6d77414f
Unverified
Commit
6d77414f
authored
Apr 27, 2023
by
OptimismBot
Committed by
GitHub
Apr 27, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5546 from ethereum-optimism/aj/fpp-client
op-program: Build op-program client binary
parents
af33b29f
53fefb1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
ssz.go
op-node/eth/ssz.go
+3
-1
Makefile
op-program/Makefile
+14
-1
main.go
op-program/client/cmd/main.go
+17
-0
No files found.
op-node/eth/ssz.go
View file @
6d77414f
...
@@ -62,7 +62,9 @@ func unmarshalBytes32LE(in []byte, z *Uint256Quantity) {
...
@@ -62,7 +62,9 @@ func unmarshalBytes32LE(in []byte, z *Uint256Quantity) {
// MarshalSSZ encodes the ExecutionPayload as SSZ type
// MarshalSSZ encodes the ExecutionPayload as SSZ type
func
(
payload
*
ExecutionPayload
)
MarshalSSZ
(
w
io
.
Writer
)
(
n
int
,
err
error
)
{
func
(
payload
*
ExecutionPayload
)
MarshalSSZ
(
w
io
.
Writer
)
(
n
int
,
err
error
)
{
if
len
(
payload
.
ExtraData
)
>
math
.
MaxUint32
-
executionPayloadFixedPart
{
// Cast to uint32 to enable 32-bit MIPS support where math.MaxUint32-executionPayloadFixedPart is too big for int
// In that case, len(payload.ExtraData) can't be longer than an int so this is always false anyway.
if
uint32
(
len
(
payload
.
ExtraData
))
>
math
.
MaxUint32
-
uint32
(
executionPayloadFixedPart
)
{
return
0
,
ErrExtraDataTooLarge
return
0
,
ErrExtraDataTooLarge
}
}
...
...
op-program/Makefile
View file @
6d77414f
...
@@ -8,9 +8,22 @@ LDFLAGSSTRING +=-X github.com/ethereum-optimism/optimism/op-program/version.Vers
...
@@ -8,9 +8,22 @@ LDFLAGSSTRING +=-X github.com/ethereum-optimism/optimism/op-program/version.Vers
LDFLAGSSTRING
+=
-X
github.com/ethereum-optimism/optimism/op-program/version.Meta
=
$(VERSION_META)
LDFLAGSSTRING
+=
-X
github.com/ethereum-optimism/optimism/op-program/version.Meta
=
$(VERSION_META)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
op-program
:
op-program
:
\
op-program-host
\
op-program-client
\
op-program-client-mips
op-program-host
:
env
GO111MODULE
=
on
GOOS
=
$(TARGETOS)
GOARCH
=
$(TARGETARCH)
go build
-v
$(LDFLAGS)
-o
./bin/op-program ./host/cmd/main.go
env
GO111MODULE
=
on
GOOS
=
$(TARGETOS)
GOARCH
=
$(TARGETARCH)
go build
-v
$(LDFLAGS)
-o
./bin/op-program ./host/cmd/main.go
op-program-client
:
env
GO111MODULE
=
on
GOOS
=
$(TARGETOS)
GOARCH
=
$(TARGETARCH)
go build
-v
$(LDFLAGS)
-o
./bin/op-program-client ./client/cmd/main.go
op-program-client-mips
:
env
GO111MODULE
=
on
GOOS
=
linux
GOARCH
=
mips
GOMIPS
=
softfloat go build
-v
$(LDFLAGS)
-o
./bin/op-program-client.elf ./client/cmd/main.go
# verify output with: readelf -h bin/op-program-client.elf
# result is mips32, big endian, R3000
clean
:
clean
:
rm
-rf
bin
rm
-rf
bin
...
...
op-program/client/cmd/main.go
0 → 100644
View file @
6d77414f
package
main
import
(
"github.com/ethereum-optimism/optimism/op-program/client"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
)
func
main
()
{
// Default to a machine parsable but relatively human friendly log format.
// Don't do anything fancy to detect if color output is supported.
logger
:=
oplog
.
NewLogger
(
oplog
.
CLIConfig
{
Level
:
"info"
,
Format
:
"logfmt"
,
Color
:
false
,
})
client
.
Main
(
logger
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment