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
ee39f95e
Commit
ee39f95e
authored
Nov 09, 2023
by
joohhnnn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix format from 'make lint-go'
parent
dd9c9965
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
23 deletions
+20
-23
main.go
op-proposer/cmd/main.go
+0
-1
noop.go
op-proposer/metrics/noop.go
+1
-1
config.go
op-proposer/proposer/config.go
+0
-1
driver.go
op-proposer/proposer/driver.go
+8
-9
service.go
op-proposer/proposer/service.go
+11
-11
No files found.
op-proposer/cmd/main.go
View file @
ee39f95e
...
@@ -43,4 +43,3 @@ func main() {
...
@@ -43,4 +43,3 @@ func main() {
log
.
Crit
(
"Application failed"
,
"message"
,
err
)
log
.
Crit
(
"Application failed"
,
"message"
,
err
)
}
}
}
}
op-proposer/metrics/noop.go
View file @
ee39f95e
...
@@ -27,4 +27,4 @@ func (*noopMetrics) RecordL2BlocksProposed(l2ref eth.L2BlockRef) {}
...
@@ -27,4 +27,4 @@ func (*noopMetrics) RecordL2BlocksProposed(l2ref eth.L2BlockRef) {}
func
(
*
noopMetrics
)
StartBalanceMetrics
(
log
.
Logger
,
*
ethclient
.
Client
,
common
.
Address
)
io
.
Closer
{
func
(
*
noopMetrics
)
StartBalanceMetrics
(
log
.
Logger
,
*
ethclient
.
Client
,
common
.
Address
)
io
.
Closer
{
return
nil
return
nil
}
}
\ No newline at end of file
op-proposer/proposer/config.go
View file @
ee39f95e
...
@@ -6,7 +6,6 @@ import (
...
@@ -6,7 +6,6 @@ import (
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2"
"github.com/ethereum-optimism/optimism/op-proposer/flags"
"github.com/ethereum-optimism/optimism/op-proposer/flags"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
opmetrics
"github.com/ethereum-optimism/optimism/op-service/metrics"
opmetrics
"github.com/ethereum-optimism/optimism/op-service/metrics"
oppprof
"github.com/ethereum-optimism/optimism/op-service/pprof"
oppprof
"github.com/ethereum-optimism/optimism/op-service/pprof"
...
...
op-proposer/proposer/driver.go
View file @
ee39f95e
...
@@ -9,7 +9,6 @@ import (
...
@@ -9,7 +9,6 @@ import (
"sync"
"sync"
"time"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
...
@@ -66,8 +65,8 @@ type L2OutputSubmitter struct {
...
@@ -66,8 +65,8 @@ type L2OutputSubmitter struct {
mutex
sync
.
Mutex
mutex
sync
.
Mutex
running
bool
running
bool
l2ooContract
*
bindings
.
L2OutputOracleCaller
l2ooContract
*
bindings
.
L2OutputOracleCaller
l2ooABI
*
abi
.
ABI
l2ooABI
*
abi
.
ABI
}
}
// NewL2OutputSubmitter creates a new L2 Output Submitter
// NewL2OutputSubmitter creates a new L2 Output Submitter
...
@@ -97,12 +96,12 @@ func NewL2OutputSubmitter(setup DriverSetup) (*L2OutputSubmitter, error) {
...
@@ -97,12 +96,12 @@ func NewL2OutputSubmitter(setup DriverSetup) (*L2OutputSubmitter, error) {
return
&
L2OutputSubmitter
{
return
&
L2OutputSubmitter
{
DriverSetup
:
setup
,
DriverSetup
:
setup
,
done
:
make
(
chan
struct
{}),
done
:
make
(
chan
struct
{}),
ctx
:
ctx
,
ctx
:
ctx
,
cancel
:
cancel
,
cancel
:
cancel
,
l2ooContract
:
l2ooContract
,
l2ooContract
:
l2ooContract
,
l2ooABI
:
parsed
,
l2ooABI
:
parsed
,
},
nil
},
nil
}
}
...
@@ -132,7 +131,7 @@ func (l *L2OutputSubmitter) StopL2OutputSubmittingIfRunning() error {
...
@@ -132,7 +131,7 @@ func (l *L2OutputSubmitter) StopL2OutputSubmittingIfRunning() error {
return
err
return
err
}
}
func
(
l
*
L2OutputSubmitter
)
StopL2OutputSubmitting
()
error
{
func
(
l
*
L2OutputSubmitter
)
StopL2OutputSubmitting
()
error
{
l
.
Log
.
Info
(
"Stopping Proposer"
)
l
.
Log
.
Info
(
"Stopping Proposer"
)
l
.
mutex
.
Lock
()
l
.
mutex
.
Lock
()
...
...
op-proposer/proposer/service.go
View file @
ee39f95e
...
@@ -26,28 +26,28 @@ import (
...
@@ -26,28 +26,28 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
)
)
type
ProposerConfig
struct
{
type
ProposerConfig
struct
{
// How frequently to poll L2 for new finalized outputs
// How frequently to poll L2 for new finalized outputs
PollInterval
time
.
Duration
PollInterval
time
.
Duration
NetworkTimeout
time
.
Duration
NetworkTimeout
time
.
Duration
L2OutputOracleAddr
common
.
Address
L2OutputOracleAddr
common
.
Address
// AllowNonFinalized enables the proposal of safe, but non-finalized L2 blocks.
// AllowNonFinalized enables the proposal of safe, but non-finalized L2 blocks.
// The L1 block-hash embedded in the proposal TX is checked and should ensure the proposal
// The L1 block-hash embedded in the proposal TX is checked and should ensure the proposal
// is never valid on an alternative L1 chain that would produce different L2 data.
// is never valid on an alternative L1 chain that would produce different L2 data.
// This option is not necessary when higher proposal latency is acceptable and L1 is healthy.
// This option is not necessary when higher proposal latency is acceptable and L1 is healthy.
AllowNonFinalized
bool
AllowNonFinalized
bool
}
}
type
ProposerService
struct
{
type
ProposerService
struct
{
Log
log
.
Logger
Log
log
.
Logger
Metrics
metrics
.
Metricer
Metrics
metrics
.
Metricer
ProposerConfig
ProposerConfig
TxManager
txmgr
.
TxManager
TxManager
txmgr
.
TxManager
L1Client
*
ethclient
.
Client
L1Client
*
ethclient
.
Client
RollupClient
*
sources
.
RollupClient
RollupClient
*
sources
.
RollupClient
driver
*
L2OutputSubmitter
driver
*
L2OutputSubmitter
...
@@ -307,4 +307,4 @@ var _ cliapp.Lifecycle = (*ProposerService)(nil)
...
@@ -307,4 +307,4 @@ var _ cliapp.Lifecycle = (*ProposerService)(nil)
// to start/stop/restart the L2Output-submission work, for use in testing.
// to start/stop/restart the L2Output-submission work, for use in testing.
func
(
ps
*
ProposerService
)
Driver
()
rpc
.
ProposerDriver
{
func
(
ps
*
ProposerService
)
Driver
()
rpc
.
ProposerDriver
{
return
ps
.
driver
return
ps
.
driver
}
}
\ No newline at end of file
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