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
f3989c03
Unverified
Commit
f3989c03
authored
Feb 01, 2022
by
Mark Tyneway
Committed by
GitHub
Feb 01, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2007 from ethereum-optimism/feat/bring-back-unsupported-rpcs
l2geth: bring back unsupported RPC methods
parents
ceea12f3
0bc53656
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
twenty-needles-grin.md
.changeset/twenty-needles-grin.md
+5
-0
api.go
l2geth/internal/ethapi/api.go
+13
-13
No files found.
.changeset/twenty-needles-grin.md
0 → 100644
View file @
f3989c03
---
'
@eth-optimism/l2geth'
:
patch
---
Bring back RPC methods that were previously blocked
l2geth/internal/ethapi/api.go
View file @
f3989c03
...
@@ -51,7 +51,6 @@ import (
...
@@ -51,7 +51,6 @@ import (
)
)
var
(
var
(
errOVMUnsupported
=
errors
.
New
(
"OVM: Unsupported RPC Method"
)
errNoSequencerURL
=
errors
.
New
(
"sequencer transaction forwarding not configured"
)
errNoSequencerURL
=
errors
.
New
(
"sequencer transaction forwarding not configured"
)
)
)
...
@@ -386,6 +385,19 @@ func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs
...
@@ -386,6 +385,19 @@ func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs
log
.
Warn
(
"Failed transaction send attempt"
,
"from"
,
args
.
From
,
"to"
,
args
.
To
,
"value"
,
args
.
Value
.
ToInt
(),
"err"
,
err
)
log
.
Warn
(
"Failed transaction send attempt"
,
"from"
,
args
.
From
,
"to"
,
args
.
To
,
"value"
,
args
.
Value
.
ToInt
(),
"err"
,
err
)
return
common
.
Hash
{},
err
return
common
.
Hash
{},
err
}
}
if
s
.
b
.
IsVerifier
()
{
client
,
err
:=
dialSequencerClientWithTimeout
(
ctx
,
s
.
b
.
SequencerClientHttp
())
if
err
!=
nil
{
return
common
.
Hash
{},
err
}
err
=
client
.
SendTransaction
(
context
.
Background
(),
signed
)
if
err
!=
nil
{
return
common
.
Hash
{},
err
}
return
signed
.
Hash
(),
nil
}
return
SubmitTransaction
(
ctx
,
s
.
b
,
signed
)
return
SubmitTransaction
(
ctx
,
s
.
b
,
signed
)
}
}
...
@@ -1619,9 +1631,6 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c
...
@@ -1619,9 +1631,6 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c
// SendTransaction creates a transaction for the given argument, sign it and submit it to the
// SendTransaction creates a transaction for the given argument, sign it and submit it to the
// transaction pool.
// transaction pool.
func
(
s
*
PublicTransactionPoolAPI
)
SendTransaction
(
ctx
context
.
Context
,
args
SendTxArgs
)
(
common
.
Hash
,
error
)
{
func
(
s
*
PublicTransactionPoolAPI
)
SendTransaction
(
ctx
context
.
Context
,
args
SendTxArgs
)
(
common
.
Hash
,
error
)
{
if
rcfg
.
UsingOVM
{
return
common
.
Hash
{},
errOVMUnsupported
}
// Look up the wallet containing the requested signer
// Look up the wallet containing the requested signer
account
:=
accounts
.
Account
{
Address
:
args
.
From
}
account
:=
accounts
.
Account
{
Address
:
args
.
From
}
...
@@ -1654,9 +1663,6 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Sen
...
@@ -1654,9 +1663,6 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Sen
// FillTransaction fills the defaults (nonce, gas, gasPrice) on a given unsigned transaction,
// FillTransaction fills the defaults (nonce, gas, gasPrice) on a given unsigned transaction,
// and returns it to the caller for further processing (signing + broadcast)
// and returns it to the caller for further processing (signing + broadcast)
func
(
s
*
PublicTransactionPoolAPI
)
FillTransaction
(
ctx
context
.
Context
,
args
SendTxArgs
)
(
*
SignTransactionResult
,
error
)
{
func
(
s
*
PublicTransactionPoolAPI
)
FillTransaction
(
ctx
context
.
Context
,
args
SendTxArgs
)
(
*
SignTransactionResult
,
error
)
{
if
rcfg
.
UsingOVM
{
return
nil
,
errOVMUnsupported
}
// Set some sanity defaults and terminate on failure
// Set some sanity defaults and terminate on failure
if
err
:=
args
.
setDefaults
(
ctx
,
s
.
b
);
err
!=
nil
{
if
err
:=
args
.
setDefaults
(
ctx
,
s
.
b
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -1714,9 +1720,6 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encod
...
@@ -1714,9 +1720,6 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encod
//
//
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign
func
(
s
*
PublicTransactionPoolAPI
)
Sign
(
addr
common
.
Address
,
data
hexutil
.
Bytes
)
(
hexutil
.
Bytes
,
error
)
{
func
(
s
*
PublicTransactionPoolAPI
)
Sign
(
addr
common
.
Address
,
data
hexutil
.
Bytes
)
(
hexutil
.
Bytes
,
error
)
{
if
rcfg
.
UsingOVM
{
return
nil
,
errOVMUnsupported
}
// Look up the wallet containing the requested signer
// Look up the wallet containing the requested signer
account
:=
accounts
.
Account
{
Address
:
addr
}
account
:=
accounts
.
Account
{
Address
:
addr
}
...
@@ -1742,9 +1745,6 @@ type SignTransactionResult struct {
...
@@ -1742,9 +1745,6 @@ type SignTransactionResult struct {
// The node needs to have the private key of the account corresponding with
// The node needs to have the private key of the account corresponding with
// the given from address and it needs to be unlocked.
// the given from address and it needs to be unlocked.
func
(
s
*
PublicTransactionPoolAPI
)
SignTransaction
(
ctx
context
.
Context
,
args
SendTxArgs
)
(
*
SignTransactionResult
,
error
)
{
func
(
s
*
PublicTransactionPoolAPI
)
SignTransaction
(
ctx
context
.
Context
,
args
SendTxArgs
)
(
*
SignTransactionResult
,
error
)
{
if
rcfg
.
UsingOVM
{
return
nil
,
errOVMUnsupported
}
if
args
.
Gas
==
nil
{
if
args
.
Gas
==
nil
{
return
nil
,
fmt
.
Errorf
(
"gas not specified"
)
return
nil
,
fmt
.
Errorf
(
"gas not specified"
)
}
}
...
...
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