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
30f3027b
Unverified
Commit
30f3027b
authored
May 20, 2024
by
Tien Nguyen
Committed by
GitHub
May 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-plasma: a litle fixed missing error check and godoc (#10587)
parent
df5add3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
daclient.go
op-plasma/daclient.go
+1
-1
damgr.go
op-plasma/damgr.go
+6
-3
params.go
op-plasma/params.go
+1
-1
No files found.
op-plasma/daclient.go
View file @
30f3027b
...
@@ -103,7 +103,7 @@ func (c *DAClient) setInputWithCommit(ctx context.Context, comm CommitmentData,
...
@@ -103,7 +103,7 @@ func (c *DAClient) setInputWithCommit(ctx context.Context, comm CommitmentData,
return
nil
return
nil
}
}
// setInput
s
sets the input data and reads the respective DA generated commitment.
// setInput sets the input data and reads the respective DA generated commitment.
func
(
c
*
DAClient
)
setInput
(
ctx
context
.
Context
,
img
[]
byte
)
(
CommitmentData
,
error
)
{
func
(
c
*
DAClient
)
setInput
(
ctx
context
.
Context
,
img
[]
byte
)
(
CommitmentData
,
error
)
{
if
len
(
img
)
==
0
{
if
len
(
img
)
==
0
{
return
nil
,
ErrInvalidInput
return
nil
,
ErrInvalidInput
...
...
op-plasma/damgr.go
View file @
30f3027b
...
@@ -95,7 +95,7 @@ func NewPlasmaDAWithStorage(log log.Logger, cfg Config, storage DAStorage, metri
...
@@ -95,7 +95,7 @@ func NewPlasmaDAWithStorage(log log.Logger, cfg Config, storage DAStorage, metri
}
}
}
}
// NewPlasmaWithState creates a plasma storage from initial state used for testing in isolation.
// NewPlasma
DA
WithState creates a plasma storage from initial state used for testing in isolation.
// We pass the L1Fetcher to each method so it is kept in sync with the conf depth of the pipeline.
// We pass the L1Fetcher to each method so it is kept in sync with the conf depth of the pipeline.
func
NewPlasmaDAWithState
(
log
log
.
Logger
,
cfg
Config
,
storage
DAStorage
,
metrics
Metricer
,
state
*
State
)
*
DA
{
func
NewPlasmaDAWithState
(
log
log
.
Logger
,
cfg
Config
,
storage
DAStorage
,
metrics
Metricer
,
state
*
State
)
*
DA
{
return
&
DA
{
return
&
DA
{
...
@@ -410,10 +410,13 @@ func DecodeChallengeStatusEvent(log *types.Log) (*bindings.DataAvailabilityChall
...
@@ -410,10 +410,13 @@ func DecodeChallengeStatusEvent(log *types.Log) (*bindings.DataAvailabilityChall
// DecodeResolvedInput decodes the preimage bytes from the tx input data.
// DecodeResolvedInput decodes the preimage bytes from the tx input data.
func
DecodeResolvedInput
(
data
[]
byte
)
([]
byte
,
error
)
{
func
DecodeResolvedInput
(
data
[]
byte
)
([]
byte
,
error
)
{
dacAbi
,
_
:=
bindings
.
DataAvailabilityChallengeMetaData
.
GetAbi
()
dacAbi
,
err
:=
bindings
.
DataAvailabilityChallengeMetaData
.
GetAbi
()
if
err
!=
nil
{
return
nil
,
err
}
args
:=
make
(
map
[
string
]
interface
{})
args
:=
make
(
map
[
string
]
interface
{})
err
:
=
dacAbi
.
Methods
[
"resolve"
]
.
Inputs
.
UnpackIntoMap
(
args
,
data
[
4
:
])
err
=
dacAbi
.
Methods
[
"resolve"
]
.
Inputs
.
UnpackIntoMap
(
args
,
data
[
4
:
])
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
op-plasma/params.go
View file @
30f3027b
package
plasma
package
plasma
// Max
input s
ize ensures the canonical chain cannot include input batches too large to
// Max
InputS
ize ensures the canonical chain cannot include input batches too large to
// challenge in the Data Availability Challenge contract. Value in number of bytes.
// challenge in the Data Availability Challenge contract. Value in number of bytes.
// This value can only be changed in a hard fork.
// This value can only be changed in a hard fork.
const
MaxInputSize
=
130672
const
MaxInputSize
=
130672
...
...
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