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
cd3f9d51
Unverified
Commit
cd3f9d51
authored
Oct 13, 2023
by
Joshua Gutow
Committed by
GitHub
Oct 13, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7661 from ethereum-optimism/jg/admin_api_proposer
op-proposer: Enable default Admin RPC
parents
398a09b4
c444974c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
metrics.go
op-proposer/metrics/metrics.go
+2
-0
l2_output_submitter.go
op-proposer/proposer/l2_output_submitter.go
+4
-0
api.go
op-service/rpc/api.go
+8
-0
docker-compose.yml
ops-bedrock/docker-compose.yml
+2
-0
No files found.
op-proposer/metrics/metrics.go
View file @
cd3f9d51
...
...
@@ -37,6 +37,7 @@ type Metrics struct {
opmetrics
.
RefMetrics
txmetrics
.
TxMetrics
opmetrics
.
RPCMetrics
info
prometheus
.
GaugeVec
up
prometheus
.
Gauge
...
...
@@ -60,6 +61,7 @@ func NewMetrics(procName string) *Metrics {
RefMetrics
:
opmetrics
.
MakeRefMetrics
(
ns
,
factory
),
TxMetrics
:
txmetrics
.
MakeTxMetrics
(
ns
,
factory
),
RPCMetrics
:
opmetrics
.
MakeRPCMetrics
(
ns
,
factory
),
info
:
*
factory
.
NewGaugeVec
(
prometheus
.
GaugeOpts
{
Namespace
:
ns
,
...
...
op-proposer/proposer/l2_output_submitter.go
View file @
cd3f9d51
...
...
@@ -106,6 +106,10 @@ func Main(version string, cliCtx *cli.Context) error {
rpcCfg
:=
cfg
.
RPCConfig
server
:=
oprpc
.
NewServer
(
rpcCfg
.
ListenAddr
,
rpcCfg
.
ListenPort
,
version
,
oprpc
.
WithLogger
(
l
))
if
rpcCfg
.
EnableAdmin
{
server
.
AddAPI
(
oprpc
.
ToGethAdminAPI
(
oprpc
.
NewCommonAdminAPI
(
&
m
.
RPCMetrics
,
l
)))
l
.
Info
(
"Admin RPC enabled"
)
}
if
err
:=
server
.
Start
();
err
!=
nil
{
return
fmt
.
Errorf
(
"error starting RPC server: %w"
,
err
)
}
...
...
op-service/rpc/api.go
View file @
cd3f9d51
...
...
@@ -7,8 +7,16 @@ import (
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum-optimism/optimism/op-service/metrics"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rpc"
)
func
ToGethAdminAPI
(
api
*
CommonAdminAPI
)
rpc
.
API
{
return
rpc
.
API
{
Namespace
:
"admin"
,
Service
:
api
,
}
}
type
CommonAdminAPI
struct
{
M
metrics
.
RPCMetricer
log
log
.
Logger
...
...
ops-bedrock/docker-compose.yml
View file @
cd3f9d51
...
...
@@ -94,6 +94,7 @@ services:
ports
:
-
"
6062:6060"
-
"
7302:7300"
-
"
6546:8545"
environment
:
OP_PROPOSER_L1_ETH_RPC
:
http://l1:8545
OP_PROPOSER_ROLLUP_RPC
:
http://op-node:8545
...
...
@@ -105,6 +106,7 @@ services:
OP_PROPOSER_PPROF_ENABLED
:
"
true"
OP_PROPOSER_METRICS_ENABLED
:
"
true"
OP_PROPOSER_ALLOW_NON_FINALIZED
:
"
true"
OP_PROPOSER_RPC_ENABLE_ADMIN
:
"
true"
op-batcher
:
depends_on
:
...
...
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