Skip to content

Commit

Permalink
repo: rename plasma --> altDA (ethereum-optimism#11370)
Browse files Browse the repository at this point in the history
* update superchain-registry import

* replace all plasma with altda

* replace plasma with altda in filenames

* contracts: update snapshots

* go: update superchain import

* go: update superchain import after rebase

* go: run mod tidy

* op-batcher: fix altda env vars passed in devnet docker-compose

* go: update superchain import

* go: use main commit for superchain import
  • Loading branch information
bitwiseguy authored Aug 14, 2024
1 parent eaed52d commit 0bb2ff5
Show file tree
Hide file tree
Showing 75 changed files with 500 additions and 561 deletions.
70 changes: 35 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,17 @@ jobs:
name: Copy L2OO allocs to .devnet-l2oo
command: cp -r .devnet/ .devnet-l2oo/
- run:
name: Generate Plasma allocs
command: DEVNET_PLASMA="true" make devnet-allocs
name: Generate AltDA allocs
command: DEVNET_ALTDA="true" make devnet-allocs
- run:
name: Copy Plasma allocs to .devnet-plasma
command: cp -r .devnet/ .devnet-plasma/
name: Copy AltDA allocs to .devnet-altda
command: cp -r .devnet/ .devnet-altda/
- run:
name: Generate Generic Plasma allocs
command: DEVNET_PLASMA="true" GENERIC_PLASMA="true" make devnet-allocs
name: Generate Generic AltDA allocs
command: DEVNET_ALTDA="true" GENERIC_ALTDA="true" make devnet-allocs
- run:
name: Copy Plasma allocs to .devnet-plasma
command: cp -r .devnet/ .devnet-plasma-generic/
name: Copy AltDA allocs to .devnet-altda
command: cp -r .devnet/ .devnet-altda-generic/
- run:
name: Generate default allocs
command: make devnet-allocs
Expand All @@ -239,18 +239,18 @@ jobs:
- ".devnet-l2oo/allocs-l2-ecotone.json"
- ".devnet-l2oo/allocs-l2-fjord.json"
- ".devnet-l2oo/allocs-l2-granite.json"
- ".devnet-plasma/allocs-l1.json"
- ".devnet-plasma/addresses.json"
- ".devnet-plasma/allocs-l2-delta.json"
- ".devnet-plasma/allocs-l2-ecotone.json"
- ".devnet-plasma/allocs-l2-fjord.json"
- ".devnet-plasma/allocs-l2-granite.json"
- ".devnet-plasma-generic/allocs-l1.json"
- ".devnet-plasma-generic/addresses.json"
- ".devnet-plasma-generic/allocs-l2-delta.json"
- ".devnet-plasma-generic/allocs-l2-ecotone.json"
- ".devnet-plasma-generic/allocs-l2-fjord.json"
- ".devnet-plasma-generic/allocs-l2-granite.json"
- ".devnet-altda/allocs-l1.json"
- ".devnet-altda/addresses.json"
- ".devnet-altda/allocs-l2-delta.json"
- ".devnet-altda/allocs-l2-ecotone.json"
- ".devnet-altda/allocs-l2-fjord.json"
- ".devnet-altda/allocs-l2-granite.json"
- ".devnet-altda-generic/allocs-l1.json"
- ".devnet-altda-generic/addresses.json"
- ".devnet-altda-generic/allocs-l2-delta.json"
- ".devnet-altda-generic/allocs-l2-ecotone.json"
- ".devnet-altda-generic/allocs-l2-fjord.json"
- ".devnet-altda-generic/allocs-l2-granite.json"
- "packages/contracts-bedrock/deploy-config/devnetL1.json"
- "packages/contracts-bedrock/deployments/devnetL1"
- notify-failures-on-develop
Expand Down Expand Up @@ -838,11 +838,11 @@ jobs:
command: echo 'export OP_E2E_USE_L2OO=true' >> $BASH_ENV
- when:
condition:
equal: ['-plasma', <<parameters.variant>>]
equal: ['-altda', <<parameters.variant>>]
steps:
- run:
name: Set OP_E2E_USE_PLASMA = true
command: echo 'export OP_E2E_USE_PLASMA=true' >> $BASH_ENV
name: Set OP_E2E_USE_ALTDA = true
command: echo 'export OP_E2E_USE_ALTDA=true' >> $BASH_ENV
- check-changed:
patterns: op-(.+),cannon,contracts-bedrock
- run:
Expand Down Expand Up @@ -1067,26 +1067,26 @@ jobs:
DEVNET_NO_BUILD: 'true'
# Default value; Can be overridden.
DEVNET_L2OO: 'false'
DEVNET_PLASMA: 'false'
DEVNET_ALTDA: 'false'
steps:
- checkout
- when:
condition:
equal: ['plasma', <<parameters.variant>>]
equal: ['altda', <<parameters.variant>>]
steps:
- run:
name: Set DEVNET_PLASMA = true
command: echo 'export DEVNET_PLASMA=true' >> $BASH_ENV
name: Set DEVNET_ALTDA = true
command: echo 'export DEVNET_ALTDA=true' >> $BASH_ENV
- when:
condition:
equal: ['plasma-generic', <<parameters.variant>>]
equal: ['altda-generic', <<parameters.variant>>]
steps:
- run:
name: Set DEVNET_PLASMA = true
command: echo 'export DEVNET_PLASMA=true' >> $BASH_ENV
name: Set DEVNET_ALTDA = true
command: echo 'export DEVNET_ALTDA=true' >> $BASH_ENV
- run:
name: Set GENERIC_PLASMA = true
command: echo 'export GENERIC_PLASMA=true' >> $BASH_ENV
name: Set GENERIC_ALTDA = true
command: echo 'export GENERIC_ALTDA=true' >> $BASH_ENV
- check-changed:
patterns: op-(.+),packages,ops-bedrock,bedrock-devnet
- run:
Expand Down Expand Up @@ -1576,7 +1576,7 @@ workflows:
name: op-e2e-action-tests<< matrix.variant >>
matrix:
parameters:
variant: ["", "-l2oo", "-plasma"]
variant: ["", "-l2oo", "-altda"]
module: op-e2e
target: test-actions
parallelism: 1
Expand Down Expand Up @@ -1621,7 +1621,7 @@ workflows:
- op-e2e-HTTP-tests
- op-e2e-fault-proof-tests
- op-e2e-action-tests
- op-e2e-action-tests-plasma
- op-e2e-action-tests-altda
- docker-build:
name: op-node-docker-build
docker_name: op-node
Expand Down Expand Up @@ -1678,7 +1678,7 @@ workflows:
- devnet:
matrix:
parameters:
variant: ["default", "plasma", "plasma-generic"]
variant: ["default", "altda", "altda-generic"]
requires:
- pnpm-monorepo
- op-batcher-docker-build
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/op-heartbeat @ethereum-optimism/go-reviewers
/op-node @ethereum-optimism/go-reviewers
/op-node/rollup @protolambda @ajsutton
/op-plasma @ethereum-optimism/go-reviewers
/op-alt-da @ethereum-optimism/go-reviewers
/op-preimage @ethereum-optimism/go-reviewers
/op-program @ethereum-optimism/go-reviewers
/op-proposer @ethereum-optimism/go-reviewers
Expand Down
30 changes: 15 additions & 15 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
# Global environment variables
DEVNET_NO_BUILD = os.getenv('DEVNET_NO_BUILD') == "true"
DEVNET_L2OO = os.getenv('DEVNET_L2OO') == "true"
DEVNET_PLASMA = os.getenv('DEVNET_PLASMA') == "true"
GENERIC_PLASMA = os.getenv('GENERIC_PLASMA') == "true"
DEVNET_ALTDA = os.getenv('DEVNET_ALTDA') == "true"
GENERIC_ALTDA = os.getenv('GENERIC_ALTDA') == "true"

class Bunch:
def __init__(self, **kwds):
Expand Down Expand Up @@ -123,9 +123,9 @@ def init_devnet_l1_deploy_config(paths, update_timestamp=False):
deploy_config['l1GenesisBlockTimestamp'] = '{:#x}'.format(int(time.time()))
if DEVNET_L2OO:
deploy_config['useFaultProofs'] = False
if DEVNET_PLASMA:
deploy_config['usePlasma'] = True
if GENERIC_PLASMA:
if DEVNET_ALTDA:
deploy_config['useAltDA'] = True
if GENERIC_ALTDA:
deploy_config['daCommitmentType'] = "GenericCommitment"
write_json(paths.devnet_config_path, deploy_config)

Expand Down Expand Up @@ -175,7 +175,7 @@ def devnet_deploy(paths):
log.info('L1 genesis already generated.')
else:
log.info('Generating L1 genesis.')
if not os.path.exists(paths.allocs_l1_path) or DEVNET_L2OO or DEVNET_PLASMA:
if not os.path.exists(paths.allocs_l1_path) or DEVNET_L2OO or DEVNET_ALTDA:
# If this is a devnet variant then we need to generate the allocs
# file here always. This is because CI will run devnet-allocs
# without setting the appropriate env var which means the allocs will be wrong.
Expand Down Expand Up @@ -267,19 +267,19 @@ def devnet_deploy(paths):
docker_env['DG_TYPE'] = '254'
docker_env['PROPOSAL_INTERVAL'] = '12s'

if DEVNET_PLASMA:
docker_env['PLASMA_ENABLED'] = 'true'
if DEVNET_ALTDA:
docker_env['ALTDA_ENABLED'] = 'true'
docker_env['DA_TYPE'] = 'calldata'
else:
docker_env['PLASMA_ENABLED'] = 'false'
docker_env['ALTDA_ENABLED'] = 'false'
docker_env['DA_TYPE'] = 'blobs'

if GENERIC_PLASMA:
docker_env['PLASMA_GENERIC_DA'] = 'true'
docker_env['PLASMA_DA_SERVICE'] = 'true'
if GENERIC_ALTDA:
docker_env['ALTDA_GENERIC_DA'] = 'true'
docker_env['ALTDA_SERVICE'] = 'true'
else:
docker_env['PLASMA_GENERIC_DA'] = 'false'
docker_env['PLASMA_DA_SERVICE'] = 'false'
docker_env['ALTDA_GENERIC_DA'] = 'false'
docker_env['ALTDA_SERVICE'] = 'false'

# Bring up the rest of the services.
log.info('Bringing up `op-node`, `op-proposer` and `op-batcher`.')
Expand All @@ -291,7 +291,7 @@ def devnet_deploy(paths):
run_command(['docker', 'compose', 'up', '-d', 'op-challenger'], cwd=paths.ops_bedrock_dir, env=docker_env)

# Optionally bring up Alt-DA Mode components.
if DEVNET_PLASMA:
if DEVNET_ALTDA:
log.info('Bringing up `da-server`, `sentinel`.') # TODO(10141): We don't have public sentinel images yet
run_command(['docker', 'compose', 'up', '-d', 'da-server'], cwd=paths.ops_bedrock_dir, env=docker_env)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/crate-crypto/go-kzg-4844 v1.0.0
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240813170044-d5be5587e58f
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240814192743-ea7e768a02a6
github.com/ethereum/go-ethereum v1.14.7
github.com/fsnotify/fsnotify v1.7.0
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101407.0-rc.1.0.20240812224053-8d99ca68bb1a h1:OK3wB7HbdhCneSowC1XZusHaLIVdXoRLuCWgXp5Tjuc=
github.com/ethereum-optimism/op-geth v1.101407.0-rc.1.0.20240812224053-8d99ca68bb1a/go.mod h1:9pT+bF20XwCBE7WkjfRSsCg6RN6Njdbr924DtQ3+geY=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240813170044-d5be5587e58f h1:JTnVOiaYVQcXc+zgsSjnTQ18k3uOLOpch8SiPjO1eTo=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240813170044-d5be5587e58f/go.mod h1:zy9f3TNPS7pwW4msMitF83fp0Wf452tZ6+Fg6d4JyXM=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240814192743-ea7e768a02a6 h1:s51nSnpwPJRRU/F6mob/fnOebFmuPz3Ab1J/HCtC40U=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240814192743-ea7e768a02a6/go.mod h1:zy9f3TNPS7pwW4msMitF83fp0Wf452tZ6+Fg6d4JyXM=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4=
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*

!/op-service
!/op-plasma
!/op-alt-da
!/go.mod
!/go.sum
File renamed without changes.
27 changes: 10 additions & 17 deletions op-plasma/cli.go → op-alt-da/cli.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package plasma
package altda

import (
"fmt"
Expand All @@ -8,52 +8,45 @@ import (
)

var (
EnabledFlagName, EnabledFlagAlias = altDAFlags("enabled")
DaServerAddressFlagName, DaServerAddressFlagAlias = altDAFlags("da-server")
VerifyOnReadFlagName, VerifyOnReadFlagAlias = altDAFlags("verify-on-read")
DaServiceFlag, DaServiceFlagAlias = altDAFlags("da-service")
EnabledFlagName = altDAFlags("enabled")
DaServerAddressFlagName = altDAFlags("da-server")
VerifyOnReadFlagName = altDAFlags("verify-on-read")
DaServiceFlag = altDAFlags("da-service")
)

// altDAFlags returns the flag names for altDA, with an Alias for plasma
func altDAFlags(v string) (string, string) {
return "altda." + v,
"plasma." + v
// altDAFlags returns the flag names for altDA
func altDAFlags(v string) string {
return "altda." + v
}

func altDAEnvs(envprefix, v string) []string {
return []string{
envprefix + "_ALTDA_" + v,
envprefix + "_PLASMA_" + v}
return []string{envprefix + "_ALTDA_" + v}
}

func CLIFlags(envPrefix string, category string) []cli.Flag {
return []cli.Flag{
&cli.BoolFlag{
Name: EnabledFlagName,
Aliases: []string{EnabledFlagAlias},
Usage: "Enable Alt-DA mode\nAlt-DA Mode is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing, and may have bugs or other issues.",
Value: false,
EnvVars: altDAEnvs(envPrefix, "ENABLED"),
Category: category,
},
&cli.StringFlag{
Name: DaServerAddressFlagName,
Aliases: []string{DaServerAddressFlagAlias},
Usage: "HTTP address of a DA Server",
EnvVars: altDAEnvs(envPrefix, "DA_SERVER"),
Category: category,
},
&cli.BoolFlag{
Name: VerifyOnReadFlagName,
Aliases: []string{VerifyOnReadFlagAlias},
Usage: "Verify input data matches the commitments from the DA storage service",
Value: true,
EnvVars: altDAEnvs(envPrefix, "VERIFY_ON_READ"),
Category: category,
},
&cli.BoolFlag{
Name: DaServiceFlag,
Aliases: []string{DaServiceFlagAlias},
Usage: "Use DA service type where commitments are generated by Alt-DA server",
Value: false,
EnvVars: altDAEnvs(envPrefix, "DA_SERVICE"),
Expand All @@ -72,7 +65,7 @@ type CLIConfig struct {
func (c CLIConfig) Check() error {
if c.Enabled {
if c.DAServerURL == "" {
return fmt.Errorf("DA server URL is required when plasma da is enabled")
return fmt.Errorf("DA server URL is required when altDA is enabled")
}
if _, err := url.Parse(c.DAServerURL); err != nil {
return fmt.Errorf("DA server URL is invalid: %w", err)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Plasma DA Server
# AltDA Server

## Introduction

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/urfave/cli/v2"

plasma "github.com/ethereum-optimism/optimism/op-plasma"
altda "github.com/ethereum-optimism/optimism/op-alt-da"
oplog "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum-optimism/optimism/op-service/opio"
)
Expand All @@ -25,9 +25,9 @@ func StartDAServer(cliCtx *cli.Context) error {
l := oplog.NewLogger(oplog.AppOut(cliCtx), logCfg)
oplog.SetGlobalLogHandler(l.Handler())

l.Info("Initializing Plasma DA server...")
l.Info("Initializing AltDA server...")

var store plasma.KVStore
var store altda.KVStore

if cfg.FileStoreEnabled() {
l.Info("Using file storage", "path", cfg.FileStoreDirPath)
Expand All @@ -41,7 +41,7 @@ func StartDAServer(cliCtx *cli.Context) error {
store = s3
}

server := plasma.NewDAServer(cliCtx.String(ListenAddrFlagName), cliCtx.Int(PortFlagName), store, l, cfg.UseGenericComm)
server := altda.NewDAServer(cliCtx.String(ListenAddrFlagName), cliCtx.Int(PortFlagName), store, l, cfg.UseGenericComm)

if err := server.Start(); err != nil {
return fmt.Errorf("failed to start the DA server")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path"

plasma "github.com/ethereum-optimism/optimism/op-plasma"
altda "github.com/ethereum-optimism/optimism/op-alt-da"
)

type FileStore struct {
Expand All @@ -23,7 +23,7 @@ func (s *FileStore) Get(ctx context.Context, key []byte) ([]byte, error) {
data, err := os.ReadFile(s.fileName(key))
if err != nil {
if os.IsNotExist(err) {
return nil, plasma.ErrNotFound
return nil, altda.ErrNotFound
}
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
GenericCommFlagName = "generic-commitment"
)

const EnvVarPrefix = "OP_PLASMA_DA_SERVER"
const EnvVarPrefix = "OP_ALTDA_SERVER"

func prefixEnvVars(name string) []string {
return opservice.PrefixEnvVar(EnvVarPrefix, name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ func main() {
app.Flags = cliapp.ProtectFlags(Flags)
app.Version = opservice.FormatVersion(Version, "", "", "")
app.Name = "da-server"
app.Usage = "Plasma DA Storage Service"
app.Description = "Service for storing plasma DA inputs"
app.Usage = "AltDA Storage Service"
app.Description = "Service for storing AltDA inputs"
app.Action = StartDAServer

ctx := opio.WithInterruptBlocker(context.Background())
Expand Down
Loading

0 comments on commit 0bb2ff5

Please sign in to comment.