Skip to content

Commit

Permalink
builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Dec 6, 2024
1 parent 46d742e commit 1e635e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
16 changes: 10 additions & 6 deletions system_tests/bold_challenge_protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ func TestChallengeProtocolBOLDStartStepChallenge(t *testing.T) {
}

func testChallengeProtocolBOLD(t *testing.T, spawnerOpts ...server_arb.SpawnerOption) {
Require(t, os.RemoveAll("/tmp/good"))
Require(t, os.RemoveAll("/tmp/evil"))
goodDir, err := os.MkdirTemp("", "good_*")
Require(t, err)
evilDir, err := os.MkdirTemp("", "evil_*")
Require(t, err)
t.Cleanup(func() {
Require(t, os.RemoveAll("/tmp/good"))
Require(t, os.RemoveAll("/tmp/evil"))
Require(t, os.RemoveAll(goodDir))
Require(t, os.RemoveAll(evilDir))
})
ctx, cancelCtx := context.WithCancel(context.Background())
defer cancelCtx()
Expand Down Expand Up @@ -216,9 +218,10 @@ func testChallengeProtocolBOLD(t *testing.T, spawnerOpts ...server_arb.SpawnerOp
l2stateprovider.Height(blockChallengeLeafHeight),
&bold.StateProviderConfig{
ValidatorName: "good",
MachineLeavesCachePath: "/tmp/good",
MachineLeavesCachePath: goodDir,
CheckBatchFinality: false,
},
goodDir,
)
Require(t, err)

Expand All @@ -228,9 +231,10 @@ func testChallengeProtocolBOLD(t *testing.T, spawnerOpts ...server_arb.SpawnerOp
l2stateprovider.Height(blockChallengeLeafHeight),
&bold.StateProviderConfig{
ValidatorName: "evil",
MachineLeavesCachePath: "/tmp/evil",
MachineLeavesCachePath: evilDir,
CheckBatchFinality: false,
},
evilDir,
)
Require(t, err)

Expand Down
4 changes: 3 additions & 1 deletion system_tests/bold_new_challenge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,17 @@ func startBoldChallengeManager(t *testing.T, ctx context.Context, builder *NodeB

var stateManager BoldStateProviderInterface
var err error
cacheDir := t.TempDir()
stateManager, err = bold.NewBOLDStateProvider(
node.ConsensusNode.BlockValidator,
node.ConsensusNode.StatelessBlockValidator,
l2stateprovider.Height(blockChallengeLeafHeight),
&bold.StateProviderConfig{
ValidatorName: addressName,
MachineLeavesCachePath: t.TempDir(),
MachineLeavesCachePath: cacheDir,
CheckBatchFinality: false,
},
cacheDir,
)
Require(t, err)

Expand Down
4 changes: 3 additions & 1 deletion system_tests/bold_state_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,17 @@ func setupBoldStateProvider(t *testing.T, ctx context.Context, blockChallengeHei
Require(t, blockValidator.Initialize(ctx))
Require(t, blockValidator.Start(ctx))

dir := t.TempDir()
stateManager, err := bold.NewBOLDStateProvider(
blockValidator,
stateless,
l2stateprovider.Height(blockChallengeHeight),
&bold.StateProviderConfig{
ValidatorName: "",
MachineLeavesCachePath: t.TempDir(),
MachineLeavesCachePath: dir,
CheckBatchFinality: false,
},
dir,
)
Require(t, err)

Expand Down

0 comments on commit 1e635e4

Please sign in to comment.