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
55f217d5
Unverified
Commit
55f217d5
authored
Oct 20, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-service,op-node,op-program: default to new standard rpc-kind with eth_getBlockReceipts support
parent
7591f192
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
35 additions
and
18 deletions
+35
-18
l1_replica.go
op-e2e/actions/l1_replica.go
+1
-1
l1_replica_test.go
op-e2e/actions/l1_replica_test.go
+1
-1
l2_sequencer_test.go
op-e2e/actions/l2_sequencer_test.go
+1
-1
reorg_test.go
op-e2e/actions/reorg_test.go
+2
-2
setup.go
op-e2e/setup.go
+1
-1
flags.go
op-node/flags/flags.go
+1
-1
main_test.go
op-program/host/cmd/main_test.go
+1
-1
config.go
op-program/host/config/config.go
+1
-1
flags.go
op-program/host/flags/flags.go
+1
-1
eth_client_test.go
op-service/sources/eth_client_test.go
+4
-4
l2_client.go
op-service/sources/l2_client.go
+1
-1
receipts.go
op-service/sources/receipts.go
+10
-3
receipts_test.go
op-service/sources/receipts_test.go
+10
-0
No files found.
op-e2e/actions/l1_replica.go
View file @
55f217d5
...
@@ -180,7 +180,7 @@ func (s *L1Replica) RPCClient() client.RPC {
...
@@ -180,7 +180,7 @@ func (s *L1Replica) RPCClient() client.RPC {
}
}
func
(
s
*
L1Replica
)
L1Client
(
t
Testing
,
cfg
*
rollup
.
Config
)
*
sources
.
L1Client
{
func
(
s
*
L1Replica
)
L1Client
(
t
Testing
,
cfg
*
rollup
.
Config
)
*
sources
.
L1Client
{
l1F
,
err
:=
sources
.
NewL1Client
(
s
.
RPCClient
(),
s
.
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
cfg
,
false
,
sources
.
RPCKind
Basic
))
l1F
,
err
:=
sources
.
NewL1Client
(
s
.
RPCClient
(),
s
.
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
cfg
,
false
,
sources
.
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
return
l1F
return
l1F
}
}
...
...
op-e2e/actions/l1_replica_test.go
View file @
55f217d5
...
@@ -42,7 +42,7 @@ func TestL1Replica_ActL1RPCFail(gt *testing.T) {
...
@@ -42,7 +42,7 @@ func TestL1Replica_ActL1RPCFail(gt *testing.T) {
// mock an RPC failure
// mock an RPC failure
replica
.
ActL1RPCFail
(
t
)
replica
.
ActL1RPCFail
(
t
)
// check RPC failure
// check RPC failure
l1Cl
,
err
:=
sources
.
NewL1Client
(
replica
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Basic
))
l1Cl
,
err
:=
sources
.
NewL1Client
(
replica
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
_
,
err
=
l1Cl
.
InfoByLabel
(
t
.
Ctx
(),
eth
.
Unsafe
)
_
,
err
=
l1Cl
.
InfoByLabel
(
t
.
Ctx
(),
eth
.
Unsafe
)
require
.
ErrorContains
(
t
,
err
,
"mock"
)
require
.
ErrorContains
(
t
,
err
,
"mock"
)
...
...
op-e2e/actions/l2_sequencer_test.go
View file @
55f217d5
...
@@ -21,7 +21,7 @@ func setupSequencerTest(t Testing, sd *e2eutils.SetupData, log log.Logger) (*L1M
...
@@ -21,7 +21,7 @@ func setupSequencerTest(t Testing, sd *e2eutils.SetupData, log log.Logger) (*L1M
miner
:=
NewL1Miner
(
t
,
log
,
sd
.
L1Cfg
)
miner
:=
NewL1Miner
(
t
,
log
,
sd
.
L1Cfg
)
l1F
,
err
:=
sources
.
NewL1Client
(
miner
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Basic
))
l1F
,
err
:=
sources
.
NewL1Client
(
miner
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
engine
:=
NewL2Engine
(
t
,
log
,
sd
.
L2Cfg
,
sd
.
RollupCfg
.
Genesis
.
L1
,
jwtPath
)
engine
:=
NewL2Engine
(
t
,
log
,
sd
.
L2Cfg
,
sd
.
RollupCfg
.
Genesis
.
L1
,
jwtPath
)
l2Cl
,
err
:=
sources
.
NewEngineClient
(
engine
.
RPCClient
(),
log
,
nil
,
sources
.
EngineClientDefaultConfig
(
sd
.
RollupCfg
))
l2Cl
,
err
:=
sources
.
NewEngineClient
(
engine
.
RPCClient
(),
log
,
nil
,
sources
.
EngineClientDefaultConfig
(
sd
.
RollupCfg
))
...
...
op-e2e/actions/reorg_test.go
View file @
55f217d5
...
@@ -572,7 +572,7 @@ func TestRestartOpGeth(gt *testing.T) {
...
@@ -572,7 +572,7 @@ func TestRestartOpGeth(gt *testing.T) {
jwtPath
:=
e2eutils
.
WriteDefaultJWT
(
t
)
jwtPath
:=
e2eutils
.
WriteDefaultJWT
(
t
)
// L1
// L1
miner
:=
NewL1Miner
(
t
,
log
,
sd
.
L1Cfg
)
miner
:=
NewL1Miner
(
t
,
log
,
sd
.
L1Cfg
)
l1F
,
err
:=
sources
.
NewL1Client
(
miner
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Basic
))
l1F
,
err
:=
sources
.
NewL1Client
(
miner
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
// Sequencer
// Sequencer
seqEng
:=
NewL2Engine
(
t
,
log
,
sd
.
L2Cfg
,
sd
.
RollupCfg
.
Genesis
.
L1
,
jwtPath
,
dbOption
)
seqEng
:=
NewL2Engine
(
t
,
log
,
sd
.
L2Cfg
,
sd
.
RollupCfg
.
Genesis
.
L1
,
jwtPath
,
dbOption
)
...
@@ -667,7 +667,7 @@ func TestConflictingL2Blocks(gt *testing.T) {
...
@@ -667,7 +667,7 @@ func TestConflictingL2Blocks(gt *testing.T) {
altSeqEng
:=
NewL2Engine
(
t
,
log
,
sd
.
L2Cfg
,
sd
.
RollupCfg
.
Genesis
.
L1
,
jwtPath
)
altSeqEng
:=
NewL2Engine
(
t
,
log
,
sd
.
L2Cfg
,
sd
.
RollupCfg
.
Genesis
.
L1
,
jwtPath
)
altSeqEngCl
,
err
:=
sources
.
NewEngineClient
(
altSeqEng
.
RPCClient
(),
log
,
nil
,
sources
.
EngineClientDefaultConfig
(
sd
.
RollupCfg
))
altSeqEngCl
,
err
:=
sources
.
NewEngineClient
(
altSeqEng
.
RPCClient
(),
log
,
nil
,
sources
.
EngineClientDefaultConfig
(
sd
.
RollupCfg
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
l1F
,
err
:=
sources
.
NewL1Client
(
miner
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Basic
))
l1F
,
err
:=
sources
.
NewL1Client
(
miner
.
RPCClient
(),
log
,
nil
,
sources
.
L1ClientDefaultConfig
(
sd
.
RollupCfg
,
false
,
sources
.
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
altSequencer
:=
NewL2Sequencer
(
t
,
log
,
l1F
,
altSeqEngCl
,
sd
.
RollupCfg
,
0
)
altSequencer
:=
NewL2Sequencer
(
t
,
log
,
l1F
,
altSeqEngCl
,
sd
.
RollupCfg
,
0
)
altBatcher
:=
NewL2Batcher
(
log
,
sd
.
RollupCfg
,
&
BatcherCfg
{
altBatcher
:=
NewL2Batcher
(
log
,
sd
.
RollupCfg
,
&
BatcherCfg
{
...
...
op-e2e/setup.go
View file @
55f217d5
...
@@ -775,7 +775,7 @@ func configureL1(rollupNodeCfg *rollupNode.Config, l1Node EthInstance) {
...
@@ -775,7 +775,7 @@ func configureL1(rollupNodeCfg *rollupNode.Config, l1Node EthInstance) {
rollupNodeCfg
.
L1
=
&
rollupNode
.
L1EndpointConfig
{
rollupNodeCfg
.
L1
=
&
rollupNode
.
L1EndpointConfig
{
L1NodeAddr
:
l1EndpointConfig
,
L1NodeAddr
:
l1EndpointConfig
,
L1TrustRPC
:
false
,
L1TrustRPC
:
false
,
L1RPCKind
:
sources
.
RPCKind
Basic
,
L1RPCKind
:
sources
.
RPCKind
Standard
,
RateLimit
:
0
,
RateLimit
:
0
,
BatchSize
:
20
,
BatchSize
:
20
,
HttpPollInterval
:
time
.
Millisecond
*
100
,
HttpPollInterval
:
time
.
Millisecond
*
100
,
...
...
op-node/flags/flags.go
View file @
55f217d5
...
@@ -78,7 +78,7 @@ var (
...
@@ -78,7 +78,7 @@ var (
openum
.
EnumString
(
sources
.
RPCProviderKinds
),
openum
.
EnumString
(
sources
.
RPCProviderKinds
),
EnvVars
:
prefixEnvVars
(
"L1_RPC_KIND"
),
EnvVars
:
prefixEnvVars
(
"L1_RPC_KIND"
),
Value
:
func
()
*
sources
.
RPCProviderKind
{
Value
:
func
()
*
sources
.
RPCProviderKind
{
out
:=
sources
.
RPCKind
Basic
out
:=
sources
.
RPCKind
Standard
return
&
out
return
&
out
}(),
}(),
}
}
...
...
op-program/host/cmd/main_test.go
View file @
55f217d5
...
@@ -210,7 +210,7 @@ func TestL1TrustRPC(t *testing.T) {
...
@@ -210,7 +210,7 @@ func TestL1TrustRPC(t *testing.T) {
func
TestL1RPCKind
(
t
*
testing
.
T
)
{
func
TestL1RPCKind
(
t
*
testing
.
T
)
{
t
.
Run
(
"DefaultBasic"
,
func
(
t
*
testing
.
T
)
{
t
.
Run
(
"DefaultBasic"
,
func
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgs
())
cfg
:=
configForArgs
(
t
,
addRequiredArgs
())
require
.
Equal
(
t
,
sources
.
RPCKind
Basic
,
cfg
.
L1RPCKind
)
require
.
Equal
(
t
,
sources
.
RPCKind
Standard
,
cfg
.
L1RPCKind
)
})
})
for
_
,
kind
:=
range
sources
.
RPCProviderKinds
{
for
_
,
kind
:=
range
sources
.
RPCProviderKinds
{
t
.
Run
(
kind
.
String
(),
func
(
t
*
testing
.
T
)
{
t
.
Run
(
kind
.
String
(),
func
(
t
*
testing
.
T
)
{
...
...
op-program/host/config/config.go
View file @
55f217d5
...
@@ -130,7 +130,7 @@ func NewConfig(
...
@@ -130,7 +130,7 @@ func NewConfig(
L2OutputRoot
:
l2OutputRoot
,
L2OutputRoot
:
l2OutputRoot
,
L2Claim
:
l2Claim
,
L2Claim
:
l2Claim
,
L2ClaimBlockNumber
:
l2ClaimBlockNum
,
L2ClaimBlockNumber
:
l2ClaimBlockNum
,
L1RPCKind
:
sources
.
RPCKind
Basic
,
L1RPCKind
:
sources
.
RPCKind
Standard
,
IsCustomChainConfig
:
isCustomConfig
,
IsCustomChainConfig
:
isCustomConfig
,
}
}
}
}
...
...
op-program/host/flags/flags.go
View file @
55f217d5
...
@@ -86,7 +86,7 @@ var (
...
@@ -86,7 +86,7 @@ var (
openum
.
EnumString
(
sources
.
RPCProviderKinds
),
openum
.
EnumString
(
sources
.
RPCProviderKinds
),
EnvVars
:
prefixEnvVars
(
"L1_RPC_KIND"
),
EnvVars
:
prefixEnvVars
(
"L1_RPC_KIND"
),
Value
:
func
()
*
sources
.
RPCProviderKind
{
Value
:
func
()
*
sources
.
RPCProviderKind
{
out
:=
sources
.
RPCKind
Basic
out
:=
sources
.
RPCKind
Standard
return
&
out
return
&
out
}(),
}(),
}
}
...
...
op-service/sources/eth_client_test.go
View file @
55f217d5
...
@@ -52,7 +52,7 @@ var testEthClientConfig = &EthClientConfig{
...
@@ -52,7 +52,7 @@ var testEthClientConfig = &EthClientConfig{
MaxConcurrentRequests
:
10
,
MaxConcurrentRequests
:
10
,
TrustRPC
:
false
,
TrustRPC
:
false
,
MustBePostMerge
:
false
,
MustBePostMerge
:
false
,
RPCProviderKind
:
RPCKind
Basic
,
RPCProviderKind
:
RPCKind
Standard
,
}
}
func
randHash
()
(
out
common
.
Hash
)
{
func
randHash
()
(
out
common
.
Hash
)
{
...
@@ -133,7 +133,7 @@ func TestEthClient_InfoByNumber(t *testing.T) {
...
@@ -133,7 +133,7 @@ func TestEthClient_InfoByNumber(t *testing.T) {
"eth_getBlockByNumber"
,
[]
any
{
n
.
String
(),
false
})
.
Run
(
func
(
args
mock
.
Arguments
)
{
"eth_getBlockByNumber"
,
[]
any
{
n
.
String
(),
false
})
.
Run
(
func
(
args
mock
.
Arguments
)
{
*
args
[
1
]
.
(
**
rpcHeader
)
=
rhdr
*
args
[
1
]
.
(
**
rpcHeader
)
=
rhdr
})
.
Return
([]
error
{
nil
})
})
.
Return
([]
error
{
nil
})
s
,
err
:=
NewL1Client
(
m
,
nil
,
nil
,
L1ClientDefaultConfig
(
&
rollup
.
Config
{
SeqWindowSize
:
10
},
true
,
RPCKind
Basic
))
s
,
err
:=
NewL1Client
(
m
,
nil
,
nil
,
L1ClientDefaultConfig
(
&
rollup
.
Config
{
SeqWindowSize
:
10
},
true
,
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
info
,
err
:=
s
.
InfoByNumber
(
ctx
,
uint64
(
n
))
info
,
err
:=
s
.
InfoByNumber
(
ctx
,
uint64
(
n
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
@@ -152,7 +152,7 @@ func TestEthClient_WrongInfoByNumber(t *testing.T) {
...
@@ -152,7 +152,7 @@ func TestEthClient_WrongInfoByNumber(t *testing.T) {
"eth_getBlockByNumber"
,
[]
any
{
n
.
String
(),
false
})
.
Run
(
func
(
args
mock
.
Arguments
)
{
"eth_getBlockByNumber"
,
[]
any
{
n
.
String
(),
false
})
.
Run
(
func
(
args
mock
.
Arguments
)
{
*
args
[
1
]
.
(
**
rpcHeader
)
=
&
rhdr2
*
args
[
1
]
.
(
**
rpcHeader
)
=
&
rhdr2
})
.
Return
([]
error
{
nil
})
})
.
Return
([]
error
{
nil
})
s
,
err
:=
NewL1Client
(
m
,
nil
,
nil
,
L1ClientDefaultConfig
(
&
rollup
.
Config
{
SeqWindowSize
:
10
},
true
,
RPCKind
Basic
))
s
,
err
:=
NewL1Client
(
m
,
nil
,
nil
,
L1ClientDefaultConfig
(
&
rollup
.
Config
{
SeqWindowSize
:
10
},
true
,
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
_
,
err
=
s
.
InfoByNumber
(
ctx
,
uint64
(
n
))
_
,
err
=
s
.
InfoByNumber
(
ctx
,
uint64
(
n
))
require
.
Error
(
t
,
err
,
"cannot accept the wrong block"
)
require
.
Error
(
t
,
err
,
"cannot accept the wrong block"
)
...
@@ -171,7 +171,7 @@ func TestEthClient_WrongInfoByHash(t *testing.T) {
...
@@ -171,7 +171,7 @@ func TestEthClient_WrongInfoByHash(t *testing.T) {
"eth_getBlockByHash"
,
[]
any
{
k
,
false
})
.
Run
(
func
(
args
mock
.
Arguments
)
{
"eth_getBlockByHash"
,
[]
any
{
k
,
false
})
.
Run
(
func
(
args
mock
.
Arguments
)
{
*
args
[
1
]
.
(
**
rpcHeader
)
=
&
rhdr2
*
args
[
1
]
.
(
**
rpcHeader
)
=
&
rhdr2
})
.
Return
([]
error
{
nil
})
})
.
Return
([]
error
{
nil
})
s
,
err
:=
NewL1Client
(
m
,
nil
,
nil
,
L1ClientDefaultConfig
(
&
rollup
.
Config
{
SeqWindowSize
:
10
},
true
,
RPCKind
Basic
))
s
,
err
:=
NewL1Client
(
m
,
nil
,
nil
,
L1ClientDefaultConfig
(
&
rollup
.
Config
{
SeqWindowSize
:
10
},
true
,
RPCKind
Standard
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
_
,
err
=
s
.
InfoByHash
(
ctx
,
k
)
_
,
err
=
s
.
InfoByHash
(
ctx
,
k
)
require
.
Error
(
t
,
err
,
"cannot accept the wrong block"
)
require
.
Error
(
t
,
err
,
"cannot accept the wrong block"
)
...
...
op-service/sources/l2_client.go
View file @
55f217d5
...
@@ -51,7 +51,7 @@ func L2ClientDefaultConfig(config *rollup.Config, trustRPC bool) *L2ClientConfig
...
@@ -51,7 +51,7 @@ func L2ClientDefaultConfig(config *rollup.Config, trustRPC bool) *L2ClientConfig
MaxConcurrentRequests
:
10
,
MaxConcurrentRequests
:
10
,
TrustRPC
:
trustRPC
,
TrustRPC
:
trustRPC
,
MustBePostMerge
:
true
,
MustBePostMerge
:
true
,
RPCProviderKind
:
RPCKind
Basic
,
RPCProviderKind
:
RPCKind
Standard
,
MethodResetDuration
:
time
.
Minute
,
MethodResetDuration
:
time
.
Minute
,
},
},
// Not bounded by span, to cover find-sync-start range fully for speedy recovery after errors.
// Not bounded by span, to cover find-sync-start range fully for speedy recovery after errors.
...
...
op-service/sources/receipts.go
View file @
55f217d5
...
@@ -123,6 +123,7 @@ const (
...
@@ -123,6 +123,7 @@ const (
RPCKindErigon
RPCProviderKind
=
"erigon"
RPCKindErigon
RPCProviderKind
=
"erigon"
RPCKindBasic
RPCProviderKind
=
"basic"
// try only the standard most basic receipt fetching
RPCKindBasic
RPCProviderKind
=
"basic"
// try only the standard most basic receipt fetching
RPCKindAny
RPCProviderKind
=
"any"
// try any method available
RPCKindAny
RPCProviderKind
=
"any"
// try any method available
RPCKindStandard
RPCProviderKind
=
"standard"
// try standard methods, including newer optimized standard RPC methods
)
)
var
RPCProviderKinds
=
[]
RPCProviderKind
{
var
RPCProviderKinds
=
[]
RPCProviderKind
{
...
@@ -135,6 +136,7 @@ var RPCProviderKinds = []RPCProviderKind{
...
@@ -135,6 +136,7 @@ var RPCProviderKinds = []RPCProviderKind{
RPCKindErigon
,
RPCKindErigon
,
RPCKindBasic
,
RPCKindBasic
,
RPCKindAny
,
RPCKindAny
,
RPCKindStandard
,
}
}
func
(
kind
RPCProviderKind
)
String
()
string
{
func
(
kind
RPCProviderKind
)
String
()
string
{
...
@@ -235,11 +237,14 @@ const (
...
@@ -235,11 +237,14 @@ const (
// - Alchemy: https://docs.alchemy.com/reference/eth-getblockreceipts
// - Alchemy: https://docs.alchemy.com/reference/eth-getblockreceipts
// - Nethermind: https://docs.nethermind.io/nethermind/ethereum-client/json-rpc/parity#parity_getblockreceipts
// - Nethermind: https://docs.nethermind.io/nethermind/ethereum-client/json-rpc/parity#parity_getblockreceipts
ParityGetBlockReceipts
ParityGetBlockReceipts
// EthGetBlockReceipts is a non-standard receipt fetching method in the eth namespace,
// EthGetBlockReceipts is a
previously
non-standard receipt fetching method in the eth namespace,
// supported by some RPC platforms.
// supported by some RPC platforms.
// This since has been standardized in https://github.com/ethereum/execution-apis/pull/438 and adopted in Geth:
// https://github.com/ethereum/go-ethereum/pull/27702
// Available in:
// Available in:
// - Alchemy: 500 CU total (and deprecated)
// - Alchemy: 500 CU total (and deprecated)
// - QuickNode: 59 credits total (does not seem to work with block hash arg, inaccurate docs)
// - QuickNode: 59 credits total (does not seem to work with block hash arg, inaccurate docs)
// - Standard, incl. Geth, Besu and Reth, and Nethermind has a PR in review.
// Method: eth_getBlockReceipts
// Method: eth_getBlockReceipts
// Params:
// Params:
// - QuickNode: string, "quantity or tag", docs say incl. block hash, but API does not actually accept it.
// - QuickNode: string, "quantity or tag", docs say incl. block hash, but API does not actually accept it.
...
@@ -296,6 +301,8 @@ func AvailableReceiptsFetchingMethods(kind RPCProviderKind) ReceiptsFetchingMeth
...
@@ -296,6 +301,8 @@ func AvailableReceiptsFetchingMethods(kind RPCProviderKind) ReceiptsFetchingMeth
return
AlchemyGetTransactionReceipts
|
EthGetBlockReceipts
|
return
AlchemyGetTransactionReceipts
|
EthGetBlockReceipts
|
DebugGetRawReceipts
|
ErigonGetBlockReceiptsByBlockHash
|
DebugGetRawReceipts
|
ErigonGetBlockReceiptsByBlockHash
|
ParityGetBlockReceipts
|
EthGetTransactionReceiptBatch
ParityGetBlockReceipts
|
EthGetTransactionReceiptBatch
case
RPCKindStandard
:
return
EthGetBlockReceipts
|
EthGetTransactionReceiptBatch
default
:
default
:
return
EthGetTransactionReceiptBatch
return
EthGetTransactionReceiptBatch
}
}
...
...
op-service/sources/receipts_test.go
View file @
55f217d5
...
@@ -305,6 +305,16 @@ func TestEthClient_FetchReceipts(t *testing.T) {
...
@@ -305,6 +305,16 @@ func TestEthClient_FetchReceipts(t *testing.T) {
providerKind
:
RPCKindBasic
,
providerKind
:
RPCKindBasic
,
setup
:
fallbackCase
(
4
,
EthGetTransactionReceiptBatch
),
setup
:
fallbackCase
(
4
,
EthGetTransactionReceiptBatch
),
},
},
{
name
:
"standard"
,
providerKind
:
RPCKindStandard
,
setup
:
fallbackCase
(
4
,
EthGetBlockReceipts
),
},
{
name
:
"standard fallback"
,
providerKind
:
RPCKindStandard
,
setup
:
fallbackCase
(
4
,
EthGetBlockReceipts
,
EthGetTransactionReceiptBatch
),
},
{
{
name
:
"any discovers alchemy"
,
name
:
"any discovers alchemy"
,
providerKind
:
RPCKindAny
,
providerKind
:
RPCKindAny
,
...
...
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