From 29e5473ba0e6f374e6748fb984b290d322102564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ber=C4=8Di=C4=8D?= Date: Fri, 4 Sep 2020 13:06:27 +0200 Subject: [PATCH] tests/txsource: Enable checkpointing --- go/oasis-test-runner/scenario/e2e/runtime/txsource.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/go/oasis-test-runner/scenario/e2e/runtime/txsource.go b/go/oasis-test-runner/scenario/e2e/runtime/txsource.go index 33b9030afa6..9335a86b03e 100644 --- a/go/oasis-test-runner/scenario/e2e/runtime/txsource.go +++ b/go/oasis-test-runner/scenario/e2e/runtime/txsource.go @@ -249,6 +249,11 @@ func (sc *txSourceImpl) Fixture() (*oasis.NetworkFixture, error) { // Disable CheckTx on the client node so we can submit invalid transactions. f.Clients[0].Consensus.DisableCheckTx = true + // Set up checkpointing. + f.Runtimes[1].Storage.CheckpointInterval = 1000 + f.Runtimes[1].Storage.CheckpointNumKept = 2 + f.Runtimes[1].Storage.CheckpointChunkSize = 1024 * 1024 + // Use at least 4 validators so that consensus can keep making progress // when a node is being killed and restarted. f.Validators = []oasis.ValidatorFixture{ @@ -283,6 +288,9 @@ func (sc *txSourceImpl) Fixture() (*oasis.NetworkFixture, error) { for i := range f.StorageWorkers { f.StorageWorkers[i].Consensus.SubmissionGasPrice = txSourceGasPrice sc.generateConsensusFixture(&f.StorageWorkers[i].Consensus) + if i > 0 { + f.StorageWorkers[i].CheckpointSyncEnabled = true + } } for i := range f.ComputeWorkers { f.ComputeWorkers[i].Consensus.SubmissionGasPrice = txSourceGasPrice