forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rollup precompile config is glob. variable
I decided to implement it this way after trying to integrate code with Arbitrum and having a better understanding of the calls that are made to the NewEvm This approach makes it easier to both override the default config, and to have the option to "not to think about it"
- Loading branch information
Showing
13 changed files
with
52 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
package utils | ||
|
||
import ( | ||
"github.com/ethereum/go-ethereum/core/vm" | ||
"github.com/ethereum/go-ethereum/internal/flags" | ||
"github.com/ethereum/go-ethereum/log" | ||
"github.com/ethereum/go-ethereum/node" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
var ( | ||
L1NodeRPCEndpointFlag = &cli.StringFlag{ | ||
Name: "rollup.l1.rpc_endpoint", | ||
Usage: "L1 node RPC endpoint eg. http://0.0.0.0:8545", | ||
Category: flags.RollupCategory, | ||
Required: true, | ||
} | ||
) | ||
var L1NodeRPCEndpointFlag = &cli.StringFlag{ | ||
Name: "rollup.l1.rpc_endpoint", | ||
Usage: "L1 node RPC endpoint eg. http://0.0.0.0:8545", | ||
Category: flags.RollupCategory, | ||
} | ||
|
||
var RollupFlags = []cli.Flag{ | ||
L1NodeRPCEndpointFlag, | ||
} | ||
|
||
var ( | ||
RollupFlags = []cli.Flag{ | ||
L1NodeRPCEndpointFlag, | ||
// TODO: when we have clearer picture of how do we want rollup "features" (EIPs/RIPs) to be activated | ||
// make this "rule" activated (ie. if not "rule activated" then L1 client can simply be nil) | ||
func ActivateL1RPCEndpoint(ctx *cli.Context, stack *node.Node) { | ||
if !ctx.IsSet(L1NodeRPCEndpointFlag.Name) { | ||
log.Error("L1 node RPC endpoint URL not set", "flag", L1NodeRPCEndpointFlag.Name) | ||
return | ||
} | ||
) | ||
|
||
l1RPCEndpoint := ctx.String(L1NodeRPCEndpointFlag.Name) | ||
stack.RegisterEthClient(l1RPCEndpoint) | ||
vm.SetVmL1RpcClient(stack.EthClient()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.