@@ -4,10 +4,10 @@ import (
4
4
"testing"
5
5
6
6
"github.com/Layr-Labs/eigenda-proxy/e2e"
7
+ altda "github.com/ethereum-optimism/optimism/op-alt-da"
7
8
"github.com/ethereum-optimism/optimism/op-e2e/actions"
8
9
"github.com/ethereum-optimism/optimism/op-e2e/config"
9
10
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
10
- plasma "github.com/ethereum-optimism/optimism/op-plasma"
11
11
"github.com/ethereum-optimism/optimism/op-service/sources"
12
12
"github.com/ethereum-optimism/optimism/op-service/testlog"
13
13
"github.com/ethereum/go-ethereum/common"
@@ -17,12 +17,12 @@ import (
17
17
18
18
var defaultAlloc = & e2eutils.AllocParams {PrefundTestUsers : true }
19
19
20
- // L2PlasmaDA is a test harness for manipulating plasma DA state.
21
- type L2PlasmaDA struct {
20
+ // L2AltDA is a test harness for manipulating altda DA state.
21
+ type L2AltDA struct {
22
22
log log.Logger
23
- storage * plasma .DAClient
24
- daMgr * plasma .DA
25
- plasmaCfg plasma .Config
23
+ storage * altda .DAClient
24
+ daMgr * altda .DA
25
+ altdaCfg altda .Config
26
26
batcher * actions.L2Batcher
27
27
sequencer * actions.L2Sequencer
28
28
engine * actions.L2Engine
@@ -32,30 +32,30 @@ type L2PlasmaDA struct {
32
32
miner * actions.L1Miner
33
33
}
34
34
35
- func (a * L2PlasmaDA ) ActL1Blocks (t actions.Testing , n uint64 ) {
35
+ func (a * L2AltDA ) ActL1Blocks (t actions.Testing , n uint64 ) {
36
36
for i := uint64 (0 ); i < n ; i ++ {
37
37
a .miner .ActL1StartBlock (12 )(t )
38
38
a .miner .ActL1EndBlock (t )
39
39
}
40
40
}
41
41
42
- func NewL2PlasmaDA (t actions.Testing , daHost string , altDA bool ) * L2PlasmaDA {
42
+ func NewL2AltDA (t actions.Testing , daHost string , altDA bool ) * L2AltDA {
43
43
p := & e2eutils.TestParams {
44
44
MaxSequencerDrift : 40 ,
45
45
SequencerWindowSize : 120 ,
46
46
ChannelTimeout : 120 ,
47
47
L1BlockTime : 12 ,
48
- UsePlasma : true ,
48
+ UseAltDA : true ,
49
49
}
50
50
51
51
log := testlog .Logger (t , log .LvlDebug )
52
52
53
- config .DeployConfig .DACommitmentType = plasma .GenericCommitmentString
53
+ config .DeployConfig .DACommitmentType = altda .GenericCommitmentString
54
54
dp := e2eutils .MakeDeployParams (t , p )
55
55
dp .DeployConfig .DAChallengeProxy = common.Address {0x42 }
56
56
sd := e2eutils .Setup (t , dp , defaultAlloc )
57
57
58
- require .True (t , sd .RollupCfg .PlasmaEnabled ())
58
+ require .True (t , sd .RollupCfg .AltDAEnabled ())
59
59
60
60
miner := actions .NewL1Miner (t , log , sd .L1Cfg )
61
61
l1Client := miner .EthClient ()
@@ -64,41 +64,41 @@ func NewL2PlasmaDA(t actions.Testing, daHost string, altDA bool) *L2PlasmaDA {
64
64
engine := actions .NewL2Engine (t , log , sd .L2Cfg , sd .RollupCfg .Genesis .L1 , jwtPath )
65
65
engCl := engine .EngineClient (t , sd .RollupCfg )
66
66
67
- var storage * plasma .DAClient
67
+ var storage * altda .DAClient
68
68
if ! altDA {
69
- storage = plasma .NewDAClient (daHost , true , true )
69
+ storage = altda .NewDAClient (daHost , true , true )
70
70
} else {
71
- storage = plasma .NewDAClient (daHost , false , false )
71
+ storage = altda .NewDAClient (daHost , false , false )
72
72
}
73
73
74
74
l1F , err := sources .NewL1Client (miner .RPCClient (), log , nil , sources .L1ClientDefaultConfig (sd .RollupCfg , false , sources .RPCKindBasic ))
75
75
require .NoError (t , err )
76
76
77
- plasmaCfg , err := sd .RollupCfg .GetOPPlasmaConfig ()
77
+ altdaCfg , err := sd .RollupCfg .GetOPAltDAConfig ()
78
78
require .NoError (t , err )
79
79
80
80
if altDA {
81
- plasmaCfg .CommitmentType = plasma .GenericCommitmentType
81
+ altdaCfg .CommitmentType = altda .GenericCommitmentType
82
82
} else {
83
- plasmaCfg .CommitmentType = plasma .Keccak256CommitmentType
83
+ altdaCfg .CommitmentType = altda .Keccak256CommitmentType
84
84
}
85
85
86
- daMgr := plasma . NewPlasmaDAWithStorage (log , plasmaCfg , storage , & plasma .NoopMetrics {})
86
+ daMgr := altda . NewAltDAWithStorage (log , altdaCfg , storage , & altda .NoopMetrics {})
87
87
88
- enabled := sd .RollupCfg .PlasmaEnabled ()
88
+ enabled := sd .RollupCfg .AltDAEnabled ()
89
89
require .True (t , enabled )
90
90
91
91
sequencer := actions .NewL2Sequencer (t , log , l1F , nil , daMgr , engCl , sd .RollupCfg , 0 )
92
92
miner .ActL1SetFeeRecipient (common.Address {'A' })
93
93
sequencer .ActL2PipelineFull (t )
94
94
95
- batcher := actions .NewL2Batcher (log , sd .RollupCfg , actions .PlasmaBatcherCfg (dp , storage ), sequencer .RollupClient (), l1Client , engine .EthClient (), engCl )
95
+ batcher := actions .NewL2Batcher (log , sd .RollupCfg , actions .AltDABatcherCfg (dp , storage ), sequencer .RollupClient (), l1Client , engine .EthClient (), engCl )
96
96
97
- return & L2PlasmaDA {
97
+ return & L2AltDA {
98
98
log : log ,
99
99
storage : storage ,
100
100
daMgr : daMgr ,
101
- plasmaCfg : plasmaCfg ,
101
+ altdaCfg : altdaCfg ,
102
102
batcher : batcher ,
103
103
sequencer : sequencer ,
104
104
engine : engine ,
@@ -109,7 +109,7 @@ func NewL2PlasmaDA(t actions.Testing, daHost string, altDA bool) *L2PlasmaDA {
109
109
}
110
110
}
111
111
112
- func (a * L2PlasmaDA ) ActL1Finalized (t actions.Testing ) {
112
+ func (a * L2AltDA ) ActL1Finalized (t actions.Testing ) {
113
113
latest := uint64 (2 )
114
114
a .miner .ActL1Safe (t , latest )
115
115
a .miner .ActL1Finalize (t , latest )
@@ -130,7 +130,7 @@ func TestOptimismKeccak256Commitment(gt *testing.T) {
130
130
131
131
t := actions .NewDefaultTesting (gt )
132
132
133
- optimism := NewL2PlasmaDA (t , proxyTS .Address (), false )
133
+ optimism := NewL2AltDA (t , proxyTS .Address (), false )
134
134
135
135
// build L1 block #1
136
136
optimism .ActL1Blocks (t , 1 )
@@ -184,7 +184,7 @@ func TestOptimismGenericCommitment(gt *testing.T) {
184
184
185
185
t := actions .NewDefaultTesting (gt )
186
186
187
- optimism := NewL2PlasmaDA (t , proxyTS .Address (), true )
187
+ optimism := NewL2AltDA (t , proxyTS .Address (), true )
188
188
189
189
// build L1 block #1
190
190
optimism .ActL1Blocks (t , 1 )
0 commit comments