go-ethereum/cmd/utils/taiko_flags.go
David a2cbf904ea
feat(beacon): introduce soft blocks (#342)
* feat(beacon): introduce soft blocks

* feat: update api.go

* chore(ci): update CI

* feat: update L1Origin

* feat: update `verifyHeader`

* test: update tests

* feat: update consensus

* feat: update consensus

* feat: update genesis

* feat: remove timestamp check in prepareWork

* feat: merge changes in #281

* Update eth/catalyst/api.go

Co-authored-by: maskpp <maskpp266@gmail.com>

* Update internal/ethapi/taiko_preconf.go

Co-authored-by: maskpp <maskpp266@gmail.com>

* fix consensus test

* revert commit f1df58

* fix consensus test (#349)

* Update eth/catalyst/api.go

Co-authored-by: maskpp <maskpp266@gmail.com>

* feat: add back timestamp check in worker

* add genesis

* temp fix for old l1origin

* nil value

* feat: rename to `L1OriginLegacy`

* feat: change `common.Big0` as the default value for legacy l1Origin, to make `IsSoftblock` return `false`

* feat(beacon): change the reorg log level (#350)

* use debug log level to avoid logging too many logs when frequently soft block reorg.

* use debug log level to avoid logging too many logs when frequently soft block reorg.

* feat: check --taiko flag

---------

Co-authored-by: David <david@taiko.xyz>

* add rlp optional flag (#353)

* fix lint

* fix test case

* feat(l1Origin): remove the reverted l1Origins (#355)

* remove the reverted l1Origins

* feat: add more comments

---------

Co-authored-by: David <david@taiko.xyz>

* only forward txs

* chore: update ci

---------

Co-authored-by: maskpp <maskpp266@gmail.com>
Co-authored-by: Jeffery Walsh <cyberhorsey@gmail.com>
2025-01-07 16:25:44 +08:00

48 lines
1.2 KiB
Go

package utils
import (
"os"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/internal/flags"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
"github.com/urfave/cli/v2"
)
var (
TaikoFlag = &cli.BoolFlag{
Name: "taiko",
Usage: "Taiko network",
Category: flags.TaikoCategory,
}
PreconfirmationForwardingURLFlag = &cli.StringFlag{
Name: "taiko.preconfirmationForwardingUrl",
Usage: "URL to forward RPC requests before confirmation",
Category: flags.TaikoCategory,
}
)
// RegisterTaikoAPIs initializes and registers the Taiko RPC APIs.
func RegisterTaikoAPIs(stack *node.Node, cfg *ethconfig.Config, backend *eth.Ethereum) {
if os.Getenv("TAIKO_TEST") != "" {
return
}
// Add methods under "taiko_" RPC namespace to the available APIs list
stack.RegisterAPIs([]rpc.API{
{
Namespace: "taiko",
Version: params.VersionWithMeta,
Service: eth.NewTaikoAPIBackend(backend),
Public: true,
},
{
Namespace: "taikoAuth",
Version: params.VersionWithMeta,
Service: eth.NewTaikoAuthAPIBackend(backend),
Authenticated: true,
},
})
}