From dd39b7c2f5d4059d31bdbad777cfe431af3583f9 Mon Sep 17 00:00:00 2001 From: Ze Date: Wed, 21 Aug 2024 18:46:07 -0700 Subject: [PATCH] refactor(rename): rename iliad to story (#13) * replace Iliad to Story * replace lower case iliad with lower case story * rename toml file --- .github/workflows/ci-s3.yml | 6 +-- client/app/app.go | 2 +- client/app/cmtlog.go | 4 +- client/app/keepers/types.go | 2 +- client/app/sdklog.go | 4 +- client/app/start.go | 18 ++++----- client/cmd/cmd.go | 20 +++++----- client/cmd/flags.go | 6 +-- client/cmd/init.go | 40 +++++++++---------- .../testdata/TestCLIReference_iliad.golden | 12 +++--- .../cmd/testdata/TestCLIReference_init.golden | 16 ++++---- .../cmd/testdata/TestCLIReference_run.golden | 8 ++-- client/cmd/testdata/TestInitFiles.golden | 2 +- .../cmd/testdata/TestRunCmd_defaults.golden | 12 +++--- client/config/config.go | 10 ++--- client/config/config.toml.tmpl | 12 +++--- client/config/testdata/default.toml | 12 +++--- .../testdata/{iliad.toml => story.toml} | 14 +++---- client/genutil/defaults.go | 2 +- client/genutil/evm/predeploys/predeploys.go | 6 +-- .../genutil/evm/predeploys/predeploys_test.go | 12 +++--- client/genutil/genutil.go | 4 +- .../genutil/testdata/TestMakeGenesis.golden | 4 +- client/main.go | 6 +-- client/x/evmengine/types/tx.pb.go | 4 +- client/x/evmengine/types/tx.proto | 2 +- client/x/evmstaking/keeper/deposit.go | 4 +- client/x/evmstaking/keeper/redelegation.go | 6 +-- client/x/evmstaking/keeper/validator.go | 4 +- client/x/evmstaking/keeper/withdraw.go | 4 +- lib/buildinfo/buildinfo.go | 2 +- lib/buildinfo/metrics.go | 2 +- lib/cmd/cmd.go | 2 +- lib/ethclient/ethclient_gen.go | 2 +- lib/ethclient/genwrap/genwrap.go | 9 +++-- lib/evmchain/evmchain.go | 20 +++++----- lib/evmchain/evmchain_internal_test.go | 2 +- lib/log/log.go | 6 +-- lib/log/log_test.go | 2 +- lib/log/testdata/TestSimpleLogs_cli.golden | 2 +- .../testdata/TestSimpleLogs_console.golden | 2 +- lib/log/testdata/TestSimpleLogs_json.golden | 2 +- lib/log/testdata/TestSimpleLogs_logfmt.golden | 2 +- lib/netconf/flag.go | 2 +- lib/netconf/netconf.go | 12 +++--- lib/tutil/rpctest.go | 2 +- scripts/build_docker.sh | 4 +- scripts/tools.go | 2 +- scripts/verifypr/README.md | 2 +- scripts/verifypr/main.go | 2 +- scripts/verifypr/verify.go | 6 +-- 51 files changed, 173 insertions(+), 172 deletions(-) rename client/config/testdata/{iliad.toml => story.toml} (90%) diff --git a/.github/workflows/ci-s3.yml b/.github/workflows/ci-s3.yml index dcb40e7f..53c1a68f 100644 --- a/.github/workflows/ci-s3.yml +++ b/.github/workflows/ci-s3.yml @@ -1,4 +1,4 @@ -name: Build and Upload iliad Binary +name: Build and Upload story Binary on: workflow_dispatch: @@ -27,7 +27,7 @@ jobs: Timestamp: uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main - # Build and upload the iliad binary + # Build and upload the story binary build_and_push: needs: Timestamp runs-on: ubuntu-latest @@ -96,7 +96,7 @@ jobs: mkdir $FOLDER_NAME mv $BIN_NAME_WITH_PATH $FOLDER_NAME/ - echo "Archiving the iliad binary..." + echo "Archiving the story binary..." tar -czvf $ARCHIVE_NAME $FOLDER_NAME if [ $? -ne 0 ]; then diff --git a/client/app/app.go b/client/app/app.go index a633ce3e..e0461ede 100644 --- a/client/app/app.go +++ b/client/app/app.go @@ -39,7 +39,7 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects ) -const Name = "iliad" +const Name = "story" var ( _ runtime.AppI = (*App)(nil) diff --git a/client/app/cmtlog.go b/client/app/cmtlog.go index 0027aed4..fb56363a 100644 --- a/client/app/cmtlog.go +++ b/client/app/cmtlog.go @@ -37,10 +37,10 @@ var dropCometDebugs = map[string]bool{ "Send": true, } -// cmtLogger implements cmtlog.Logger by using the iliad logging pattern. +// cmtLogger implements cmtlog.Logger by using the story logging pattern. // Comet log level is controlled separately in config.toml, since comet logs are very noisy. type cmtLogger struct { - ctx context.Context //nolint:containedctx // This is a wrapper around the iliad logger which is context based. + ctx context.Context //nolint:containedctx // This is a wrapper around the story logger which is context based. level int } diff --git a/client/app/keepers/types.go b/client/app/keepers/types.go index 31aeda4f..b404cc6f 100644 --- a/client/app/keepers/types.go +++ b/client/app/keepers/types.go @@ -31,7 +31,7 @@ type Keepers struct { GovKeeper *govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper - // Iliad + // Story EvmStakingKeeper *evmstakingkeeper.Keeper EVMEngKeeper *evmengkeeper.Keeper } diff --git a/client/app/sdklog.go b/client/app/sdklog.go index 687ce342..7775d831 100644 --- a/client/app/sdklog.go +++ b/client/app/sdklog.go @@ -20,10 +20,10 @@ var dropCosmosDebugs = map[string]bool{ "SAVE TREE": true, } -// sdkLogger implements sdklog.Logger by using the iliad logging pattern. +// sdkLogger implements sdklog.Logger by using the story logging pattern. // Comet log level is controlled separately in config.toml, since comet logs are very noisy. type sdkLogger struct { - ctx context.Context //nolint:containedctx // This is a wrapper around the iliad logger which is context based. + ctx context.Context //nolint:containedctx // This is a wrapper around the story logger which is context based. } func newSDKLogger(ctx context.Context) sdkLogger { diff --git a/client/app/start.go b/client/app/start.go index 9c9fdcdf..ed9c8f36 100644 --- a/client/app/start.go +++ b/client/app/start.go @@ -23,7 +23,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/piplabs/story/client/comet" - iliadcfg "github.com/piplabs/story/client/config" + storycfg "github.com/piplabs/story/client/config" apisvr "github.com/piplabs/story/client/server" "github.com/piplabs/story/lib/buildinfo" "github.com/piplabs/story/lib/errors" @@ -33,13 +33,13 @@ import ( "github.com/piplabs/story/lib/tracer" ) -// Config wraps the iliad (app) and comet (client) configurations. +// Config wraps the story (app) and comet (client) configurations. type Config struct { - iliadcfg.Config + storycfg.Config Comet cmtcfg.Config } -// BackendType returns the iliad config backend type +// BackendType returns the story config backend type // or the comet backend type otherwise. func (c Config) BackendType() dbm.BackendType { if c.Config.BackendType == "" { @@ -49,7 +49,7 @@ func (c Config) BackendType() dbm.BackendType { return dbm.BackendType(c.Config.BackendType) } -// Run runs the iliad client until the context is canceled. +// Run runs the story client until the context is canceled. // //nolint:contextcheck // Explicit new stop context. func Run(ctx context.Context, cfg Config) error { @@ -68,20 +68,20 @@ func Run(ctx context.Context, cfg Config) error { return stopFunc(stopCtx) } -// Start starts the iliad client returning a stop function or an error. +// Start starts the story client returning a stop function or an error. // // Note that the original context used to start the app must be canceled first // before calling the stop function and a fresh context should be passed into the stop function. func Start(ctx context.Context, cfg Config) (func(context.Context) error, error) { - log.Info(ctx, "Starting iliad consensus client") + log.Info(ctx, "Starting story consensus client") if err := cfg.Verify(); err != nil { - return nil, errors.Wrap(err, "verify iliad config") + return nil, errors.Wrap(err, "verify story config") } buildinfo.Instrument(ctx) - tracerIDs := tracer.Identifiers{Network: cfg.Network, Service: "iliad", Instance: cfg.Comet.Moniker} + tracerIDs := tracer.Identifiers{Network: cfg.Network, Service: "story", Instance: cfg.Comet.Moniker} stopTracer, err := tracer.Init(ctx, tracerIDs, cfg.Tracer) if err != nil { return nil, err diff --git a/client/cmd/cmd.go b/client/cmd/cmd.go index 6208103e..bca06f6c 100644 --- a/client/cmd/cmd.go +++ b/client/cmd/cmd.go @@ -1,4 +1,4 @@ -// Package cmd provides the cli for running the iliad consensus client. +// Package cmd provides the cli for running the story consensus client. package cmd import ( @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/piplabs/story/client/app" - iliadcfg "github.com/piplabs/story/client/config" + storycfg "github.com/piplabs/story/client/config" "github.com/piplabs/story/lib/buildinfo" libcmd "github.com/piplabs/story/lib/cmd" "github.com/piplabs/story/lib/log" @@ -16,8 +16,8 @@ import ( // New returns a new root cobra command that handles our command line tool. func New() *cobra.Command { return libcmd.NewRootCmd( - "iliad", - "Iliad is a consensus client implementation for the Story L1 blockchain", + "story", + "Story is a consensus client implementation for the Story L1 blockchain", newRunCmd("run", app.Run), newInitCmd(), buildinfo.NewVersionCmd(), @@ -25,14 +25,14 @@ func New() *cobra.Command { ) } -// newRunCmd returns a new cobra command that runs the iliad consensus client. +// newRunCmd returns a new cobra command that runs the story consensus client. func newRunCmd(name string, runFunc func(context.Context, app.Config) error) *cobra.Command { - iliadCfg := iliadcfg.DefaultConfig() + storyCfg := storycfg.DefaultConfig() logCfg := log.DefaultConfig() cmd := &cobra.Command{ Use: name, - Short: "Runs the iliad consensus client", + Short: "Runs the story consensus client", RunE: func(cmd *cobra.Command, _ []string) error { ctx, err := log.Init(cmd.Context(), logCfg) if err != nil { @@ -42,19 +42,19 @@ func newRunCmd(name string, runFunc func(context.Context, app.Config) error) *co return err } - cometCfg, err := parseCometConfig(ctx, iliadCfg.HomeDir) + cometCfg, err := parseCometConfig(ctx, storyCfg.HomeDir) if err != nil { return err } return runFunc(ctx, app.Config{ - Config: iliadCfg, + Config: storyCfg, Comet: cometCfg, }) }, } - bindRunFlags(cmd, &iliadCfg) + bindRunFlags(cmd, &storyCfg) log.BindFlags(cmd.Flags(), &logCfg) return cmd diff --git a/client/cmd/flags.go b/client/cmd/flags.go index 886356fb..45e478c1 100644 --- a/client/cmd/flags.go +++ b/client/cmd/flags.go @@ -4,13 +4,13 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - iliadcfg "github.com/piplabs/story/client/config" + storycfg "github.com/piplabs/story/client/config" libcmd "github.com/piplabs/story/lib/cmd" "github.com/piplabs/story/lib/netconf" "github.com/piplabs/story/lib/tracer" ) -func bindRunFlags(cmd *cobra.Command, cfg *iliadcfg.Config) { +func bindRunFlags(cmd *cobra.Command, cfg *storycfg.Config) { flags := cmd.Flags() libcmd.BindHomeFlag(flags, &cfg.HomeDir) @@ -33,7 +33,7 @@ func bindRunFlags(cmd *cobra.Command, cfg *iliadcfg.Config) { func bindInitFlags(flags *pflag.FlagSet, cfg *InitConfig) { libcmd.BindHomeFlag(flags, &cfg.HomeDir) netconf.BindFlag(flags, &cfg.Network) - flags.BoolVar(&cfg.TrustedSync, "trusted-sync", cfg.TrustedSync, "Initialize trusted state-sync height and hash by querying the Iliad RPC") + flags.BoolVar(&cfg.TrustedSync, "trusted-sync", cfg.TrustedSync, "Initialize trusted state-sync height and hash by querying the Story RPC") flags.BoolVar(&cfg.Force, "force", cfg.Force, "Force initialization (overwrite existing files)") flags.BoolVar(&cfg.Clean, "clean", cfg.Clean, "Delete home directory before initialization") } diff --git a/client/cmd/init.go b/client/cmd/init.go index b1e9bb6e..cfac44aa 100644 --- a/client/cmd/init.go +++ b/client/cmd/init.go @@ -17,7 +17,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/spf13/cobra" - iliadcfg "github.com/piplabs/story/client/config" + storycfg "github.com/piplabs/story/client/config" libcmd "github.com/piplabs/story/lib/cmd" "github.com/piplabs/story/lib/errors" "github.com/piplabs/story/lib/log" @@ -35,25 +35,25 @@ type InitConfig struct { ExecutionHash common.Hash } -// newInitCmd returns a new cobra command that initializes the files and folders required by iliad. +// newInitCmd returns a new cobra command that initializes the files and folders required by story. func newInitCmd() *cobra.Command { // Default config flags cfg := InitConfig{ - HomeDir: iliadcfg.DefaultHomeDir(), + HomeDir: storycfg.DefaultHomeDir(), Force: false, } cmd := &cobra.Command{ Use: "init", - Short: "Initializes required iliad files and directories", - Long: `Initializes required iliad files and directories. + Short: "Initializes required story files and directories", + Long: `Initializes required story files and directories. Ensures all the following files and directories exist: - / # Iliad home directory + / # Story home directory ├── config # Config directory │ ├── config.toml # CometBFT configuration - │ ├── genesis.json # Iliad chain genesis file - │ ├── iliad.toml # Iliad configuration + │ ├── genesis.json # Story chain genesis file + │ ├── story.toml # Story configuration │ ├── node_key.json # Node P2P identity key │ └── priv_validator_key.json # CometBFT private validator key (back this up and keep it safe) ├── data # Data directory @@ -78,7 +78,7 @@ The home directory should only contain subdirectories, no files, use --force to return cmd } -// InitFiles initializes the files and folders required by iliad. +// InitFiles initializes the files and folders required by story. // It ensures a network and genesis file is generated/downloaded for the provided network. // //nolint:gocognit,nestif // This is just many sequential steps. @@ -87,7 +87,7 @@ func InitFiles(ctx context.Context, initCfg InitConfig) error { return errors.New("required flag --network empty") } - log.Info(ctx, "Initializing iliad files and directories") + log.Info(ctx, "Initializing story files and directories") homeDir := initCfg.HomeDir network := initCfg.Network @@ -98,15 +98,15 @@ func InitFiles(ctx context.Context, initCfg InitConfig) error { // Initialize default configs. comet := DefaultCometConfig(homeDir) - var cfg iliadcfg.Config + var cfg storycfg.Config switch { case network == netconf.Iliad: - cfg = iliadcfg.IliadConfig + cfg = storycfg.IliadConfig case network == netconf.Local: - cfg = iliadcfg.LocalConfig + cfg = storycfg.LocalConfig default: - cfg = iliadcfg.DefaultConfig() + cfg = storycfg.DefaultConfig() cfg.HomeDir = homeDir cfg.Network = network } @@ -147,14 +147,14 @@ func InitFiles(ctx context.Context, initCfg InitConfig) error { log.Info(ctx, "Generated default comet config file", "path", cmtConfigFile) } - // Setup iliad config - iliadConfigFile := cfg.ConfigFile() - if cmtos.FileExists(iliadConfigFile) { - log.Info(ctx, "Found iliad config file", "path", iliadConfigFile) - } else if err := iliadcfg.WriteConfigTOML(cfg, log.DefaultConfig()); err != nil { + // Setup story config + storyConfigFile := cfg.ConfigFile() + if cmtos.FileExists(storyConfigFile) { + log.Info(ctx, "Found story config file", "path", storyConfigFile) + } else if err := storycfg.WriteConfigTOML(cfg, log.DefaultConfig()); err != nil { return err } else { - log.Info(ctx, "Generated default iliad config file", "path", iliadConfigFile) + log.Info(ctx, "Generated default story config file", "path", storyConfigFile) } // Setup comet private validator diff --git a/client/cmd/testdata/TestCLIReference_iliad.golden b/client/cmd/testdata/TestCLIReference_iliad.golden index a5fb8556..b52f814e 100644 --- a/client/cmd/testdata/TestCLIReference_iliad.golden +++ b/client/cmd/testdata/TestCLIReference_iliad.golden @@ -1,17 +1,17 @@ -Iliad is a consensus client implementation for the Story L1 blockchain +Story is a consensus client implementation for the Story L1 blockchain Usage: - iliad [command] + story [command] Available Commands: completion Generate the autocompletion script for the specified shell help Help about any command - init Initializes required iliad files and directories - run Runs the iliad consensus client + init Initializes required story files and directories + run Runs the story consensus client validator Commands for validator operations version Print the version information of this binary Flags: - -h, --help help for iliad + -h, --help help for story -Use "iliad [command] --help" for more information about a command. +Use "story [command] --help" for more information about a command. diff --git a/client/cmd/testdata/TestCLIReference_init.golden b/client/cmd/testdata/TestCLIReference_init.golden index 065b1268..3c9aa6e1 100644 --- a/client/cmd/testdata/TestCLIReference_init.golden +++ b/client/cmd/testdata/TestCLIReference_init.golden @@ -1,11 +1,11 @@ -Initializes required iliad files and directories. +Initializes required story files and directories. Ensures all the following files and directories exist: - / # Iliad home directory + / # Story home directory ├── config # Config directory │ ├── config.toml # CometBFT configuration - │ ├── genesis.json # Iliad chain genesis file - │ ├── iliad.toml # Iliad configuration + │ ├── genesis.json # Story chain genesis file + │ ├── story.toml # Story configuration │ ├── node_key.json # Node P2P identity key │ └── priv_validator_key.json # CometBFT private validator key (back this up and keep it safe) ├── data # Data directory @@ -16,12 +16,12 @@ Existing files are not overwritten, unless --clean is specified. The home directory should only contain subdirectories, no files, use --force to ignore this check. Usage: - iliad init [flags] + story init [flags] Flags: --clean Delete home directory before initialization --force Force initialization (overwrite existing files) -h, --help help for init - --home string The application home directory containing config and data (default "./iliad") - --network string Iliad network to participate in: mainnet, testnet, devnet - --trusted-sync Initialize trusted state-sync height and hash by querying the Iliad RPC + --home string The application home directory containing config and data (default "./story") + --network string Story network to participate in: mainnet, testnet, devnet + --trusted-sync Initialize trusted state-sync height and hash by querying the Story RPC diff --git a/client/cmd/testdata/TestCLIReference_run.golden b/client/cmd/testdata/TestCLIReference_run.golden index fb764cb6..fce25855 100644 --- a/client/cmd/testdata/TestCLIReference_run.golden +++ b/client/cmd/testdata/TestCLIReference_run.golden @@ -1,7 +1,7 @@ -Runs the iliad consensus client +Runs the story consensus client Usage: - iliad run [flags] + story run [flags] Flags: --api-address string The API server address to listen on (default "127.0.0.1:1317") @@ -13,12 +13,12 @@ Flags: --evm-build-delay duration Minimum delay between triggering and fetching a EVM payload build (default 600ms) --evm-build-optimistic Enables optimistic building of EVM payloads on previous block finalize (default true) -h, --help help for run - --home string The application home directory containing config and data (default "./iliad") + --home string The application home directory containing config and data (default "./story") --log-color string Log color (only applicable to console format); auto, force, disable (default "auto") --log-format string Log format; console, json (default "console") --log-level string Log level; debug, info, warn, error (default "info") --min-retain-blocks uint Minimum block height offset during ABCI commit to prune CometBFT blocks - --network string Iliad network to participate in: mainnet, testnet, devnet + --network string Story network to participate in: mainnet, testnet, devnet --pruning string Pruning strategy (default|nothing|everything) (default "nothing") --snapshot-interval uint State sync snapshot interval (default 1000) --snapshot-keep-recent uint State sync snapshot to keep (default 2) diff --git a/client/cmd/testdata/TestInitFiles.golden b/client/cmd/testdata/TestInitFiles.golden index ac4ebce9..669485ad 100644 --- a/client/cmd/testdata/TestInitFiles.golden +++ b/client/cmd/testdata/TestInitFiles.golden @@ -1,6 +1,6 @@ /config/config.toml /config/genesis.json -/config/iliad.toml +/config/story.toml /config/node_key.json /config/priv_validator_key.json /data/priv_validator_state.json diff --git a/client/cmd/testdata/TestRunCmd_defaults.golden b/client/cmd/testdata/TestRunCmd_defaults.golden index 56188c3c..a28df298 100644 --- a/client/cmd/testdata/TestRunCmd_defaults.golden +++ b/client/cmd/testdata/TestRunCmd_defaults.golden @@ -1,5 +1,5 @@ { - "HomeDir": "./iliad", + "HomeDir": "./story", "Network": "", "EthKeyPassword": "", "EngineJWTFile": "", @@ -20,7 +20,7 @@ }, "Comet": { "Version": "0.38.9", - "RootDir": "./iliad", + "RootDir": "./story", "ProxyApp": "tcp://127.0.0.1:26658", "Moniker": "testmoniker", "DBBackend": "goleveldb", @@ -35,7 +35,7 @@ "ABCI": "socket", "FilterPeers": false, "RPC": { - "RootDir": "./iliad", + "RootDir": "./story", "ListenAddress": "tcp://127.0.0.1:26657", "CORSAllowedOrigins": [], "CORSAllowedMethods": [ @@ -68,7 +68,7 @@ "PprofListenAddress": "" }, "P2P": { - "RootDir": "./iliad", + "RootDir": "./story", "ListenAddress": "tcp://0.0.0.0:26656", "ExternalAddress": "", "Seeds": "", @@ -101,7 +101,7 @@ }, "Mempool": { "Type": "nop", - "RootDir": "./iliad", + "RootDir": "./story", "Recheck": true, "RecheckTimeout": 1000000000, "Broadcast": true, @@ -130,7 +130,7 @@ "Version": "v0" }, "Consensus": { - "RootDir": "./iliad", + "RootDir": "./story", "WalPath": "data/cs.wal/wal", "TimeoutPropose": 3000000000, "TimeoutProposeDelta": 500000000, diff --git a/client/config/config.go b/client/config/config.go index f80a381e..0f7863f9 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -24,7 +24,7 @@ import ( ) const ( - configFile = "iliad.toml" + configFile = "story.toml" dataDir = "data" configDir = "config" snapshotDataDir = "snapshots" @@ -78,7 +78,7 @@ var ( } ) -// DefaultConfig returns the default iliad config. +// DefaultConfig returns the default story config. func DefaultConfig() Config { return Config{ HomeDir: DefaultHomeDir(), @@ -126,7 +126,7 @@ func baseDir() string { return "" } -// Config defines all iliad specific config. +// Config defines all story specific config. type Config struct { HomeDir string Network netconf.ID @@ -146,7 +146,7 @@ type Config struct { Tracer tracer.Config } -// ConfigFile returns the default path to the toml iliad config file. +// ConfigFile returns the default path to the toml story config file. func (c Config) ConfigFile() string { return filepath.Join(c.HomeDir, configDir, configFile) } @@ -180,7 +180,7 @@ func (c Config) Verify() error { //go:embed config.toml.tmpl var tomlTemplate []byte -// WriteConfigTOML writes the toml iliad config to disk. +// WriteConfigTOML writes the toml story config to disk. func WriteConfigTOML(cfg Config, logCfg log.Config) error { var buffer bytes.Buffer diff --git a/client/config/config.toml.tmpl b/client/config/config.toml.tmpl index c974491d..5412b180 100644 --- a/client/config/config.toml.tmpl +++ b/client/config/config.toml.tmpl @@ -1,24 +1,24 @@ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml -# The version of the Iliad binary that created or +# The version of the Story binary that created or # last modified the config file. Do not modify this. version = "{{ .Version }}" -# Iliad network to participate in: mainnet, testnet, or devnet. +# Story network to participate in: mainnet, testnet, or devnet. network = "{{ .Network }}" ####################################################################### -### Iliad Options ### +### Story Options ### ####################################################################### -# Iliad execution client Engine API http endpoint. +# Story execution client Engine API http endpoint. engine-endpoint = "{{ .EngineEndpoint }}" -# Iliad execution client JWT file used for authentication. +# Story execution client JWT file used for authentication. engine-jwt-file = "{{ .EngineJWTFile }}" -# SnapshotInterval specifies the height interval at which iliad +# SnapshotInterval specifies the height interval at which story # will take state sync snapshots. Defaults to 1000 (roughly once an hour), setting this to # 0 disables state snapshots. snapshot-interval = {{ .SnapshotInterval }} diff --git a/client/config/testdata/default.toml b/client/config/testdata/default.toml index 996c7fc1..673a5aab 100644 --- a/client/config/testdata/default.toml +++ b/client/config/testdata/default.toml @@ -1,24 +1,24 @@ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml -# The version of the Iliad binary that created or +# The version of the Story binary that created or # last modified the config file. Do not modify this. version = "v0.1.5" -# Iliad network to participate in: mainnet, testnet, or devnet. +# Story network to participate in: mainnet, testnet, or devnet. network = "" ####################################################################### -### Iliad Options ### +### Story Options ### ####################################################################### -# Iliad execution client Engine API http endpoint. +# Story execution client Engine API http endpoint. engine-endpoint = "" -# Iliad execution client JWT file used for authentication. +# Story execution client JWT file used for authentication. engine-jwt-file = "" -# SnapshotInterval specifies the height interval at which iliad +# SnapshotInterval specifies the height interval at which story # will take state sync snapshots. Defaults to 1000 (roughly once an hour), setting this to # 0 disables state snapshots. snapshot-interval = 1000 diff --git a/client/config/testdata/iliad.toml b/client/config/testdata/story.toml similarity index 90% rename from client/config/testdata/iliad.toml rename to client/config/testdata/story.toml index 0d23ee65..aa05b50e 100644 --- a/client/config/testdata/iliad.toml +++ b/client/config/testdata/story.toml @@ -1,24 +1,24 @@ # This is a TOML config file. # For more information, see https://github.com/toml-lang/toml -# The version of the Iliad binary that created or +# The version of the Story binary that created or # last modified the config file. Do not modify this. version = "v0.1.5" -# Iliad network to participate in: mainnet, testnet, or devnet. -network = "iliad" +# Story network to participate in: mainnet, testnet, or devnet. +network = "story" ####################################################################### -### Iliad Options ### +### Story Options ### ####################################################################### -# Iliad execution client Engine API http endpoint. +# Story execution client Engine API http endpoint. engine-endpoint = "http://localhost:8551" -# Iliad execution client JWT file used for authentication. +# Story execution client JWT file used for authentication. engine-jwt-file = "" -# SnapshotInterval specifies the height interval at which iliad +# SnapshotInterval specifies the height interval at which story # will take state sync snapshots. Defaults to 1000 (roughly once an hour), setting this to # 0 disables state snapshots. snapshot-interval = 1000 diff --git a/client/genutil/defaults.go b/client/genutil/defaults.go index 782865b0..61746acf 100644 --- a/client/genutil/defaults.go +++ b/client/genutil/defaults.go @@ -2,7 +2,7 @@ package genutil import "github.com/cometbft/cometbft/types" -// DefaultConsensusParams returns the default cometBFT consensus params for iliad protocol. +// DefaultConsensusParams returns the default cometBFT consensus params for story protocol. func DefaultConsensusParams() *types.ConsensusParams { resp := types.DefaultConsensusParams() resp.ABCI.VoteExtensionsEnableHeight = 1 // Enable vote extensions from the start. diff --git a/client/genutil/evm/predeploys/predeploys.go b/client/genutil/evm/predeploys/predeploys.go index b9c7e4e4..838aaac5 100644 --- a/client/genutil/evm/predeploys/predeploys.go +++ b/client/genutil/evm/predeploys/predeploys.go @@ -17,8 +17,8 @@ import ( ) const ( - // IliadNamespace is namespace of for iliad specific predeploys. - IliadNamespace = "0x121E240000000000000000000000000000000000" + // StoryNamespace is namespace of for story specific predeploys. + StoryNamespace = "0x121E240000000000000000000000000000000000" // IPTokenNamespace is namespace of for IP Token specific predeploys. IPTokenNamespace = "0xcccccc0000000000000000000000000000000000" @@ -40,7 +40,7 @@ const ( var ( // Namespace big.Ints. - iliadNamespace = common.HexToAddress(IliadNamespace).Big() + storyNamespace = common.HexToAddress(StoryNamespace).Big() ipTokenNamespace = common.HexToAddress(IPTokenNamespace).Big() // Predeploy addresses. diff --git a/client/genutil/evm/predeploys/predeploys_test.go b/client/genutil/evm/predeploys/predeploys_test.go index 55d9cee1..08f772b6 100644 --- a/client/genutil/evm/predeploys/predeploys_test.go +++ b/client/genutil/evm/predeploys/predeploys_test.go @@ -14,7 +14,7 @@ import ( var ( // Namespace big.Ints. - mainNamespace = addrToBig(common.HexToAddress(predeploys.IliadNamespace)) + mainNamespace = addrToBig(common.HexToAddress(predeploys.StoryNamespace)) // Predeploy addresses. ipTokenStaking = common.HexToAddress(predeploys.IPTokenStaking) @@ -62,23 +62,23 @@ func TestAlloc(t *testing.T) { // //// check IPTokenStaking proxy // ipTokenStakingAlloc, ok := predeps[ipTokenStaking] - // require.True(t, ok, "iliad stake not found") + // require.True(t, ok, "story stake not found") // require.Equal(t, // proxyCode, // ipTokenStakingAlloc.Code, - // "iliad stake code mismatch") + // "story stake code mismatch") // //// check IPTokenStaking implementation // ipTokenStakingImpl, ok := ipTokenStakingAlloc.Storage[common.HexToHash(predeploys.ProxyImplementationSlot)] - // require.True(t, ok, "iliad stake implementation not found") + // require.True(t, ok, "story stake implementation not found") // // ipTokenStakingImplAlloc, ok := predeps[common.BytesToAddress(ipTokenStakingImpl.Bytes())] - // require.True(t, ok, "iliad stake implementation not found") + // require.True(t, ok, "story stake implementation not found") // // require.Equal(t, // ipTokenStakingCode, // ipTokenStakingImplAlloc.Code, - // "iliad stake implementation mismatch") + // "story stake implementation mismatch") } // namespaceAddr returns the address at the given index in the namespace. diff --git a/client/genutil/genutil.go b/client/genutil/genutil.go index a5c244ef..c0a8dac1 100644 --- a/client/genutil/genutil.go +++ b/client/genutil/genutil.go @@ -36,7 +36,7 @@ import ( ) // slashingWindows overrides the default slashing signed_blocks_window from 100 to 1000 -// since Iliad block period (+-1s) is very fast, roughly 10x normal period of 10s. +// since Story block period (+-1s) is very fast, roughly 10x normal period of 10s. const slashingBlocksWindow = 1000 func MakeGenesis( @@ -57,7 +57,7 @@ func MakeGenesis( // Step 2: Create the app genesis object and store it to disk. appGen := >ypes.AppGenesis{ - AppName: "iliad", + AppName: "story", AppVersion: buildinfo.Version(), GenesisTime: genesisTime.UTC(), ChainID: network.Static().StoryConsensusChainIDStr(), diff --git a/client/genutil/testdata/TestMakeGenesis.golden b/client/genutil/testdata/TestMakeGenesis.golden index 6ab7c3f7..24a15d21 100644 --- a/client/genutil/testdata/TestMakeGenesis.golden +++ b/client/genutil/testdata/TestMakeGenesis.golden @@ -1,8 +1,8 @@ { - "app_name": "iliad", + "app_name": "story", "app_version": "v0.1.5", "genesis_time": "1970-01-01T00:00:01Z", - "chain_id": "iliad-1001651", + "chain_id": "story-1001651", "initial_height": 1, "app_hash": null, "app_state": { diff --git a/client/main.go b/client/main.go index fa102f7c..18ea6e56 100644 --- a/client/main.go +++ b/client/main.go @@ -1,11 +1,11 @@ -// Command iliad is the main entry point for the iliad consensus client. +// Command story is the main entry point for the story consensus client. package main import ( - iliadcmd "github.com/piplabs/story/client/cmd" + storycmd "github.com/piplabs/story/client/cmd" libcmd "github.com/piplabs/story/lib/cmd" ) func main() { - libcmd.Main(iliadcmd.New()) + libcmd.Main(storycmd.New()) } diff --git a/client/x/evmengine/types/tx.pb.go b/client/x/evmengine/types/tx.pb.go index 936173c4..cd21c6ea 100644 --- a/client/x/evmengine/types/tx.pb.go +++ b/client/x/evmengine/types/tx.pb.go @@ -235,7 +235,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgServiceClient interface { - // ExecutionPayload submits a new execution payload from consensus to the IliadEVM. + // ExecutionPayload submits a new execution payload from consensus to the StoryEVM. ExecutionPayload(ctx context.Context, in *MsgExecutionPayload, opts ...grpc.CallOption) (*ExecutionPayloadResponse, error) } @@ -258,7 +258,7 @@ func (c *msgServiceClient) ExecutionPayload(ctx context.Context, in *MsgExecutio // MsgServiceServer is the server API for MsgService service. type MsgServiceServer interface { - // ExecutionPayload submits a new execution payload from consensus to the IliadEVM. + // ExecutionPayload submits a new execution payload from consensus to the StoryEVM. ExecutionPayload(context.Context, *MsgExecutionPayload) (*ExecutionPayloadResponse, error) } diff --git a/client/x/evmengine/types/tx.proto b/client/x/evmengine/types/tx.proto index c9e4a61f..a63379f4 100644 --- a/client/x/evmengine/types/tx.proto +++ b/client/x/evmengine/types/tx.proto @@ -10,7 +10,7 @@ option go_package = "client/x/evmengine/types"; service MsgService { option (cosmos.msg.v1.service) = true; - // ExecutionPayload submits a new execution payload from consensus to the IliadEVM. + // ExecutionPayload submits a new execution payload from consensus to the StoryEVM. rpc ExecutionPayload (MsgExecutionPayload) returns (ExecutionPayloadResponse); } diff --git a/client/x/evmstaking/keeper/deposit.go b/client/x/evmstaking/keeper/deposit.go index 7cd397ca..3ea4af2d 100644 --- a/client/x/evmstaking/keeper/deposit.go +++ b/client/x/evmstaking/keeper/deposit.go @@ -59,8 +59,8 @@ func (k Keeper) ProcessDeposit(ctx context.Context, ev *bindings.IPTokenStakingD } log.Info(ctx, "EVM staking deposit detected, delegating to validator", - "del_iliad", depositorAddr.String(), - "val_iliad", validatorAddr.String(), + "del_story", depositorAddr.String(), + "val_story", validatorAddr.String(), "del_evm_addr", delEvmAddr.String(), "val_evm_addr", valEvmAddr.String(), "amount_coin", amountCoin.String(), diff --git a/client/x/evmstaking/keeper/redelegation.go b/client/x/evmstaking/keeper/redelegation.go index a765fd2d..c2a40822 100644 --- a/client/x/evmstaking/keeper/redelegation.go +++ b/client/x/evmstaking/keeper/redelegation.go @@ -50,9 +50,9 @@ func (k Keeper) ProcessRedelegate(ctx context.Context, ev *bindings.IPTokenStaki amountCoin, _ := IPTokenToBondCoin(ev.Amount) log.Info(ctx, "EVM staking relegation detected", - "del_iliad", depositorAddr.String(), - "val_src_iliad", validatorSrcAddr.String(), - "val_dst_iliad", validatorDstAddr.String(), + "del_story", depositorAddr.String(), + "val_src_story", validatorSrcAddr.String(), + "val_dst_story", validatorDstAddr.String(), "del_evm_addr", delEvmAddr.String(), "val_src_evm_addr", valSrcEvmAddr.String(), "val_dst_evm_addr", valDstEvmAddr.String(), diff --git a/client/x/evmstaking/keeper/validator.go b/client/x/evmstaking/keeper/validator.go index 9d05f98c..1cfb6525 100644 --- a/client/x/evmstaking/keeper/validator.go +++ b/client/x/evmstaking/keeper/validator.go @@ -53,9 +53,9 @@ func (k Keeper) ProcessCreateValidator(ctx context.Context, ev *bindings.IPToken } log.Info(ctx, "EVM staking create validator detected", - "val_iliad", validatorAddr.String(), + "val_story", validatorAddr.String(), "val_pubkey", validatorPubkey.String(), - "del_iliad", delegatorAddr.String(), + "del_story", delegatorAddr.String(), "del_evm_addr", delEvmAddr.String(), "amount_coin", amountCoin.String(), ) diff --git a/client/x/evmstaking/keeper/withdraw.go b/client/x/evmstaking/keeper/withdraw.go index da942edd..5cfe9265 100644 --- a/client/x/evmstaking/keeper/withdraw.go +++ b/client/x/evmstaking/keeper/withdraw.go @@ -257,8 +257,8 @@ func (k Keeper) ProcessWithdraw(ctx context.Context, ev *bindings.IPTokenStaking amountCoin, _ := IPTokenToBondCoin(ev.Amount) log.Debug(ctx, "Processing EVM staking withdraw", - "del_iliad", depositorAddr.String(), - "val_iliad", validatorAddr.String(), + "del_story", depositorAddr.String(), + "val_story", validatorAddr.String(), "del_evm_addr", delEvmAddr.String(), "val_evm_addr", valEvmAddr.String(), "amount", ev.Amount.String(), diff --git a/lib/buildinfo/buildinfo.go b/lib/buildinfo/buildinfo.go index aa8aafb9..104f1407 100644 --- a/lib/buildinfo/buildinfo.go +++ b/lib/buildinfo/buildinfo.go @@ -19,7 +19,7 @@ const ( VersionMeta = "unstable" // Version metadata to append to the version string ) -// Version returns the version of the whole iliad-monorepo and all binaries built from this git commit. +// Version returns the version of the whole story-monorepo and all binaries built from this git commit. func Version() string { return fmt.Sprintf("v%d.%d.%d", VersionMajor, VersionMinor, VersionPatch) } diff --git a/lib/buildinfo/metrics.go b/lib/buildinfo/metrics.go index 733e5149..20b03fe4 100644 --- a/lib/buildinfo/metrics.go +++ b/lib/buildinfo/metrics.go @@ -24,6 +24,6 @@ var ( Namespace: "lib", Subsystem: "buildinfo", Name: "version", - Help: "Constant gauge with label 'version' set to the build info iliad version", + Help: "Constant gauge with label 'version' set to the build info story version", }, []string{"version"}) ) diff --git a/lib/cmd/cmd.go b/lib/cmd/cmd.go index e0ed75e9..a66c1fe8 100644 --- a/lib/cmd/cmd.go +++ b/lib/cmd/cmd.go @@ -1,5 +1,5 @@ // Package cmd provides a common utilities and helper function to standarise -// the way iliad apps use cobra and viper to produce consistent cli experience +// the way story apps use cobra and viper to produce consistent cli experience // for both users and devs. package cmd diff --git a/lib/ethclient/ethclient_gen.go b/lib/ethclient/ethclient_gen.go index b3b9d1dd..f41a9f02 100644 --- a/lib/ethclient/ethclient_gen.go +++ b/lib/ethclient/ethclient_gen.go @@ -13,7 +13,7 @@ import ( "github.com/piplabs/story/lib/tracer" ) -// Client defines all ethereum interfaces used in iliad. +// Client defines all ethereum interfaces used in story. type Client interface { ethereum.BlockNumberReader ethereum.ChainIDReader diff --git a/lib/ethclient/genwrap/genwrap.go b/lib/ethclient/genwrap/genwrap.go index 7a1f4826..087fdc49 100644 --- a/lib/ethclient/genwrap/genwrap.go +++ b/lib/ethclient/genwrap/genwrap.go @@ -11,18 +11,19 @@ import ( "bytes" "context" "fmt" - "github.com/piplabs/story/lib/errors" - "github.com/piplabs/story/lib/log" "go/ast" "go/printer" "go/token" - "golang.org/x/tools/imports" "os" "regexp" "sort" "strings" "text/template" + "github.com/piplabs/story/lib/errors" + "github.com/piplabs/story/lib/log" + "golang.org/x/tools/imports" + _ "github.com/ethereum/go-ethereum" "golang.org/x/tools/go/packages" ) @@ -40,7 +41,7 @@ import ( {{- end}} ) -// Client defines all ethereum interfaces used in iliad. +// Client defines all ethereum interfaces used in story. type Client interface { {{range .Providers}} ethereum.{{.}} {{end -}} diff --git a/lib/evmchain/evmchain.go b/lib/evmchain/evmchain.go index 24587d98..6c34f8d5 100644 --- a/lib/evmchain/evmchain.go +++ b/lib/evmchain/evmchain.go @@ -9,17 +9,17 @@ type Token string const ( // Mainnets. - IDIliadMainnet uint64 = 1514 + IDStoryMainnet uint64 = 1514 // Local Testet. IDLocal uint64 = 1511 // Testnets. - IDIliadTestnet uint64 = 1511 + IDStoryTestnet uint64 = 1511 IDIliad uint64 = 1513 - iliadEVMName = "story_evm" - iliadEVMBlockPeriod = time.Second * 2 + storyEVMName = "story_evm" + storyEVMBlockPeriod = time.Second * 2 IP Token = "IP" ETH Token = "ETH" @@ -48,16 +48,16 @@ func MetadataByName(name string) (Metadata, bool) { } var static = map[uint64]Metadata{ - IDIliadTestnet: { - ChainID: IDIliadTestnet, - Name: iliadEVMName, - BlockPeriod: iliadEVMBlockPeriod, + IDStoryTestnet: { + ChainID: IDStoryTestnet, + Name: storyEVMName, + BlockPeriod: storyEVMBlockPeriod, NativeToken: IP, }, IDIliad: { ChainID: IDIliad, - Name: iliadEVMName, - BlockPeriod: iliadEVMBlockPeriod, + Name: storyEVMName, + BlockPeriod: storyEVMBlockPeriod, NativeToken: IP, }, } diff --git a/lib/evmchain/evmchain_internal_test.go b/lib/evmchain/evmchain_internal_test.go index 5b054e38..bf71c1ae 100644 --- a/lib/evmchain/evmchain_internal_test.go +++ b/lib/evmchain/evmchain_internal_test.go @@ -16,7 +16,7 @@ func TestVerify(t *testing.T) { require.Equal(t, chainID, metadata.ChainID) require.NotEmpty(t, metadata.BlockPeriod) - if metadata.Name != iliadEVMName { + if metadata.Name != storyEVMName { require.False(t, uniqNames[metadata.Name]) } require.False(t, uniqChainIDs[metadata.ChainID]) diff --git a/lib/log/log.go b/lib/log/log.go index b09f01f2..1d82065c 100644 --- a/lib/log/log.go +++ b/lib/log/log.go @@ -108,7 +108,7 @@ func errAttrs(err error) []any { StackTrace() pkgerrors.StackTrace } - type iliadErr interface { + type storyErr interface { Attrs() []any } @@ -117,9 +117,9 @@ func errAttrs(err error) []any { // Go up the cause chain (from the outermost error to the innermost error) for { - // Use the first encountered iliadErr's attributes. + // Use the first encountered storyErr's attributes. if len(attrs) == 0 { - if serr, ok := err.(iliadErr); ok { + if serr, ok := err.(storyErr); ok { attrs = serr.Attrs() } } diff --git a/lib/log/log_test.go b/lib/log/log_test.go index 4d7e0500..077020d2 100644 --- a/lib/log/log_test.go +++ b/lib/log/log_test.go @@ -42,7 +42,7 @@ func TestSimpleLogs(t *testing.T) { } { // Test cometBFT wrapping our errors in pkg errors err := errors.New("new", "new", "new") - err = errors.Wrap(err, "iliad wrap", "wrap", "wrap") + err = errors.Wrap(err, "story wrap", "wrap", "wrap") err = pkgerrors.Wrap(err, "pkg wrap") log.Warn(ctx, "Pkg wrapped error", err) } diff --git a/lib/log/testdata/TestSimpleLogs_cli.golden b/lib/log/testdata/TestSimpleLogs_cli.golden index c7210ea9..41b66896 100644 --- a/lib/log/testdata/TestSimpleLogs_cli.golden +++ b/lib/log/testdata/TestSimpleLogs_cli.golden @@ -6,4 +6,4 @@ err1 err2 err="second: first" 2=2 1=1 ctx debug message ctx_key1=ctx_value1 debug_key1=debug_value1 ctx info message ctx_key1=ctx_value1 ctx_key2=ctx_value2 info_key2=info_value2 -Pkg wrapped error err="pkg wrap: iliad wrap: new" wrap=wrap new=new +Pkg wrapped error err="pkg wrap: story wrap: new" wrap=wrap new=new diff --git a/lib/log/testdata/TestSimpleLogs_console.golden b/lib/log/testdata/TestSimpleLogs_console.golden index 4f13bcdb..47b67cd3 100644 --- a/lib/log/testdata/TestSimpleLogs_console.golden +++ b/lib/log/testdata/TestSimpleLogs_console.golden @@ -6,4 +6,4 @@ 00-00-00 00:00:00 ERRO err2 err="second: first" 2=2 1=1 stacktrace= 00-00-00 00:00:00 DEBU ctx debug message ctx_key1=ctx_value1 debug_key1=debug_value1 00-00-00 00:00:00 INFO ctx info message ctx_key1=ctx_value1 ctx_key2=ctx_value2 info_key2=info_value2 -00-00-00 00:00:00 WARN Pkg wrapped error err="pkg wrap: iliad wrap: new" wrap=wrap new=new stacktrace= +00-00-00 00:00:00 WARN Pkg wrapped error err="pkg wrap: story wrap: new" wrap=wrap new=new stacktrace= diff --git a/lib/log/testdata/TestSimpleLogs_json.golden b/lib/log/testdata/TestSimpleLogs_json.golden index 5407e8ed..5422b4b0 100644 --- a/lib/log/testdata/TestSimpleLogs_json.golden +++ b/lib/log/testdata/TestSimpleLogs_json.golden @@ -6,4 +6,4 @@ {"time":"00-00-00 00:00:00","level":"ERROR","source":"","msg":"err2","err":"second: first","2":2,"1":1,"source":""} {"time":"00-00-00 00:00:00","level":"DEBUG","source":"","msg":"ctx debug message","ctx_key1":"ctx_value1","debug_key1":"debug_value1"} {"time":"00-00-00 00:00:00","level":"INFO","source":"","msg":"ctx info message","ctx_key1":"ctx_value1","ctx_key2":"ctx_value2","info_key2":"info_value2"} -{"time":"00-00-00 00:00:00","level":"WARN","source":"","msg":"Pkg wrapped error","err":"pkg wrap: iliad wrap: new","wrap":"wrap","new":"new","source":""} +{"time":"00-00-00 00:00:00","level":"WARN","source":"","msg":"Pkg wrapped error","err":"pkg wrap: story wrap: new","wrap":"wrap","new":"new","source":""} diff --git a/lib/log/testdata/TestSimpleLogs_logfmt.golden b/lib/log/testdata/TestSimpleLogs_logfmt.golden index c4ccb98d..15ff69d1 100644 --- a/lib/log/testdata/TestSimpleLogs_logfmt.golden +++ b/lib/log/testdata/TestSimpleLogs_logfmt.golden @@ -6,4 +6,4 @@ time="00-00-00 00:00:00" level=WARN source= msg=err1 err=first 1=1 sourc time="00-00-00 00:00:00" level=ERROR source= msg=err2 err="second: first" 2=2 1=1 source= time="00-00-00 00:00:00" level=DEBUG source= msg="ctx debug message" ctx_key1=ctx_value1 debug_key1=debug_value1 time="00-00-00 00:00:00" level=INFO source= msg="ctx info message" ctx_key1=ctx_value1 ctx_key2=ctx_value2 info_key2=info_value2 -time="00-00-00 00:00:00" level=WARN source= msg="Pkg wrapped error" err="pkg wrap: iliad wrap: new" wrap=wrap new=new source= +time="00-00-00 00:00:00" level=WARN source= msg="Pkg wrapped error" err="pkg wrap: story wrap: new" wrap=wrap new=new source= diff --git a/lib/netconf/flag.go b/lib/netconf/flag.go index 6deb11a3..514ff989 100644 --- a/lib/netconf/flag.go +++ b/lib/netconf/flag.go @@ -4,5 +4,5 @@ import "github.com/spf13/pflag" // BindFlag binds the network identifier flag. func BindFlag(flags *pflag.FlagSet, network *ID) { - flags.StringVar((*string)(network), "network", string(*network), "Iliad network to participate in: mainnet, testnet, devnet") + flags.StringVar((*string)(network), "network", string(*network), "Story network to participate in: mainnet, testnet, devnet") } diff --git a/lib/netconf/netconf.go b/lib/netconf/netconf.go index e8225613..6b73e9db 100644 --- a/lib/netconf/netconf.go +++ b/lib/netconf/netconf.go @@ -1,13 +1,13 @@ -// Package netconf provides the configuration of an Iliad network, an instance -// of the Iliad cross chain protocol. +// Package netconf provides the configuration of an Story network, an instance +// of the Story cross chain protocol. package netconf import ( "time" ) -// Network defines a deployment of the Iliad cross chain protocol. -// It spans an iliad chain (both execution and consensus) and a set of +// Network defines a deployment of the Story cross chain protocol. +// It spans an story chain (both execution and consensus) and a set of // supported EVMs. type Network struct { ID ID `json:"name"` // ID of the network. e.g. "simnet", "testnet", "staging", "mainnet" @@ -37,8 +37,8 @@ func (n Network) Chain(id uint64) (Chain, bool) { } // Chain defines the configuration of an execution chain that supports -// the Iliad cross chain protocol. This is most supported EVMs, but -// also the Iliad EVM, and the Iliad Consensus chain. +// the Story cross chain protocol. This is most supported EVMs, but +// also the Story EVM, and the Story Consensus chain. type Chain struct { ID uint64 // Chain ID asa per https://chainlist.org Name string // Chain name as per https://chainlist.org diff --git a/lib/tutil/rpctest.go b/lib/tutil/rpctest.go index 4a96f4e7..b4a0ba75 100644 --- a/lib/tutil/rpctest.go +++ b/lib/tutil/rpctest.go @@ -22,7 +22,7 @@ var ( privValStateJSON []byte ) -// PrepRPCTestConfig creates the require cometbft config on disk for rpctest package to work with iliad app. +// PrepRPCTestConfig creates the require cometbft config on disk for rpctest package to work with story app. func PrepRPCTestConfig(t *testing.T) *config.Config { t.Helper() diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh index ae873474..75589563 100755 --- a/scripts/build_docker.sh +++ b/scripts/build_docker.sh @@ -16,6 +16,6 @@ GITREF=$(git rev-parse --short=7 HEAD) cd dist/${APP}* || exit 1 -docker build -f "../../${APP}/Dockerfile" . -t "iliadops/${APP}:${GITREF}" +docker build -f "../../${APP}/Dockerfile" . -t "storyops/${APP}:${GITREF}" -echo "Built docker image: iliadops/${APP}:${GITREF}" +echo "Built docker image: storyops/${APP}:${GITREF}" diff --git a/scripts/tools.go b/scripts/tools.go index a7f8edac..ce4d3da5 100644 --- a/scripts/tools.go +++ b/scripts/tools.go @@ -1,4 +1,4 @@ -// This file contains build time developer tools used in the iliad repo. +// This file contains build time developer tools used in the story repo. // We use go.mod to control the versions of these tools and dependabot to keep them up to date. // To install all the tools run: go generate tools.go // For more info on this pattern, see https://www.jvt.me/posts/2022/06/15/go-tools-dependency-management/. diff --git a/scripts/verifypr/README.md b/scripts/verifypr/README.md index 3daad59c..8d07ef75 100644 --- a/scripts/verifypr/README.md +++ b/scripts/verifypr/README.md @@ -1,6 +1,6 @@ # verifypr Simple script that is called by [verifypr](../../.github/workflows/verifypr.yml) github action -that verifies iliad PRs against the conventional commit template. +that verifies story PRs against the conventional commit template. See supported types [here](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum) diff --git a/scripts/verifypr/main.go b/scripts/verifypr/main.go index 842f7077..d03432f5 100644 --- a/scripts/verifypr/main.go +++ b/scripts/verifypr/main.go @@ -1,6 +1,6 @@ // Copyright © 2022-2023 Obol Labs Inc. Licensed under the terms of a Business Source License 1.1 -// Command verifypr provides a tool to verify iliad PRs against our specific conventional commit template. +// Command verifypr provides a tool to verify story PRs against our specific conventional commit template. package main import ( diff --git a/scripts/verifypr/verify.go b/scripts/verifypr/verify.go index 3fefcaae..4ca88644 100644 --- a/scripts/verifypr/verify.go +++ b/scripts/verifypr/verify.go @@ -1,4 +1,4 @@ -// Command verifypr provides a tool to verify iliad PRs against the conventional commit template. +// Command verifypr provides a tool to verify story PRs against the conventional commit template. package main import ( @@ -34,7 +34,7 @@ func run() error { return nil } - log.Printf("Verifying iliad PR against template\n") + log.Printf("Verifying story PR against template\n") log.Printf("PR Title: %s\n", pr.Title) log.Printf("## PR Body:\n%s\n####\n", pr.Body) @@ -70,7 +70,7 @@ func prFromEnv() (PR, error) { return pr, nil } -// verify returns an error if the commit message doesn't correspond to the iliad conventional commit template. +// verify returns an error if the commit message doesn't correspond to the story conventional commit template. func verify(commitMsg string) error { // Fix line endings, since conventional commit parser doesn't support CRLF. commitMsg = strings.ReplaceAll(commitMsg, "\r\n", "\n")