itests: Default enable Eth rpc
This commit is contained in:
parent
66f5ee4ae9
commit
60dbd59aa0
@ -40,9 +40,7 @@ func TestDeployment(t *testing.T) {
|
|||||||
kit.WithCfgOpt(func(cfg *config.FullNode) error {
|
kit.WithCfgOpt(func(cfg *config.FullNode) error {
|
||||||
cfg.ActorEvent.EnableRealTimeFilterAPI = true
|
cfg.ActorEvent.EnableRealTimeFilterAPI = true
|
||||||
return nil
|
return nil
|
||||||
}),
|
}))
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
|
||||||
ens.InterconnectAll().BeginMining(blockTime)
|
ens.InterconnectAll().BeginMining(blockTime)
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||||
|
@ -204,7 +204,7 @@ func TestEthNewFilterCatchAll(t *testing.T) {
|
|||||||
kit.QuietMiningLogs()
|
kit.QuietMiningLogs()
|
||||||
|
|
||||||
blockTime := 100 * time.Millisecond
|
blockTime := 100 * time.Millisecond
|
||||||
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.RealTimeFilterAPI(), kit.EthRPC())
|
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.RealTimeFilterAPI())
|
||||||
ens.InterconnectAll().BeginMining(blockTime)
|
ens.InterconnectAll().BeginMining(blockTime)
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||||
|
@ -28,7 +28,6 @@ func TestTransactionHashLookup(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
@ -120,7 +119,6 @@ func TestTransactionHashLookupBlsFilecoinMessage(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
@ -190,7 +188,6 @@ func TestTransactionHashLookupSecpFilecoinMessage(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
@ -267,7 +264,6 @@ func TestTransactionHashLookupNonexistentMessage(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
@ -298,7 +294,6 @@ func TestEthGetMessageCidByTransactionHashEthTx(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
@ -395,7 +390,6 @@ func TestEthGetMessageCidByTransactionHashSecp(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
@ -466,7 +460,6 @@ func TestEthGetMessageCidByTransactionHashBLS(t *testing.T) {
|
|||||||
t,
|
t,
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ThroughRPC(),
|
kit.ThroughRPC(),
|
||||||
kit.EthRPC(),
|
|
||||||
)
|
)
|
||||||
ens.InterconnectAll().BeginMining(blocktime)
|
ens.InterconnectAll().BeginMining(blocktime)
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
func TestValueTransferValidSignature(t *testing.T) {
|
func TestValueTransferValidSignature(t *testing.T) {
|
||||||
blockTime := 100 * time.Millisecond
|
blockTime := 100 * time.Millisecond
|
||||||
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.EthRPC())
|
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC())
|
||||||
|
|
||||||
ens.InterconnectAll().BeginMining(blockTime)
|
ens.InterconnectAll().BeginMining(blockTime)
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ func TestLegacyTransaction(t *testing.T) {
|
|||||||
func TestContractDeploymentValidSignature(t *testing.T) {
|
func TestContractDeploymentValidSignature(t *testing.T) {
|
||||||
|
|
||||||
blockTime := 100 * time.Millisecond
|
blockTime := 100 * time.Millisecond
|
||||||
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.EthRPC())
|
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC())
|
||||||
|
|
||||||
ens.InterconnectAll().BeginMining(blockTime)
|
ens.InterconnectAll().BeginMining(blockTime)
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ func TestContractDeploymentValidSignature(t *testing.T) {
|
|||||||
|
|
||||||
func TestContractInvocation(t *testing.T) {
|
func TestContractInvocation(t *testing.T) {
|
||||||
blockTime := 100 * time.Millisecond
|
blockTime := 100 * time.Millisecond
|
||||||
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.EthRPC())
|
client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC())
|
||||||
|
|
||||||
ens.InterconnectAll().BeginMining(blockTime)
|
ens.InterconnectAll().BeginMining(blockTime)
|
||||||
|
|
||||||
|
@ -132,3 +132,10 @@ func TestFEVMDelegateCall(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, result, expectedResultActor)
|
require.Equal(t, result, expectedResultActor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestEVMRpcDisable(t *testing.T) {
|
||||||
|
client, _, _ := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.DisableEthRPC())
|
||||||
|
|
||||||
|
_, err := client.EthBlockNumber(context.Background())
|
||||||
|
require.ErrorContains(t, err, "module disabled, enable with Fevm.EnableEthPRC")
|
||||||
|
}
|
||||||
|
@ -58,6 +58,15 @@ var DefaultNodeOpts = nodeOpts{
|
|||||||
sectors: DefaultPresealsPerBootstrapMiner,
|
sectors: DefaultPresealsPerBootstrapMiner,
|
||||||
sectorSize: abi.SectorSize(2 << 10), // 2KiB.
|
sectorSize: abi.SectorSize(2 << 10), // 2KiB.
|
||||||
|
|
||||||
|
cfgOpts: []CfgOption{
|
||||||
|
func(cfg *config.FullNode) error {
|
||||||
|
// test defaults
|
||||||
|
|
||||||
|
cfg.Fevm.EnableEthPRC = true
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
workerTasks: []sealtasks.TaskType{sealtasks.TTFetch, sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFinalizeUnsealed},
|
workerTasks: []sealtasks.TaskType{sealtasks.TTFetch, sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFinalizeUnsealed},
|
||||||
workerStorageOpt: func(store paths.Store) paths.Store { return store },
|
workerStorageOpt: func(store paths.Store) paths.Store { return store },
|
||||||
}
|
}
|
||||||
@ -297,9 +306,9 @@ func HistoricFilterAPI(dbpath string) NodeOpt {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func EthRPC() NodeOpt {
|
func DisableEthRPC() NodeOpt {
|
||||||
return WithCfgOpt(func(cfg *config.FullNode) error {
|
return WithCfgOpt(func(cfg *config.FullNode) error {
|
||||||
cfg.Fevm.EnableEthPRC = true
|
cfg.Fevm.EnableEthPRC = false
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user