Skip to content

Commit

Permalink
Merge pull request #3987 from oasisprotocol/kostko/feature/executor-s…
Browse files Browse the repository at this point in the history
…ched-epoch
  • Loading branch information
kostko authored Jun 2, 2021
2 parents 70f9584 + 85969bd commit aa25d09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/3987.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/worker/compute: Propose block on new epoch
4 changes: 2 additions & 2 deletions go/oasis-node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,14 +523,14 @@ func testStorageClientWithNode(t *testing.T, node *testNode) {
require.NoError(t, err, "NewStatic")

// Determine the current round. This is required so that we can commit into
// storage at the next (non-finalized) round.
// storage at some higher (non-finalized) round.
blk, err := node.Consensus.RootHash().GetLatestBlock(ctx, &roothash.RuntimeRequest{
RuntimeID: testRuntimeID,
Height: consensusAPI.HeightLatest,
})
require.NoError(t, err, "GetLatestBlock")

storageTests.StorageImplementationTests(t, localBackend, client, testRuntimeID, blk.Header.Round+1)
storageTests.StorageImplementationTests(t, localBackend, client, testRuntimeID, blk.Header.Round+1000)
}

func testStorageClientWithoutNode(t *testing.T, node *testNode) {
Expand Down
2 changes: 2 additions & 0 deletions go/worker/compute/executor/committee/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@ func (n *Node) handleScheduleBatch(force bool) {
// We have runtime message results (and batch timeout expired), schedule batch.
case rtState.LastNormalRound == rtState.GenesisBlock.Header.Round:
// This is the runtime genesis, schedule batch.
case force && rtState.LastNormalHeight < epoch.GetGroupVersion():
// No block in this epoch processed by runtime yet, schedule batch.
default:
// No need to schedule a batch.
return
Expand Down

0 comments on commit aa25d09

Please sign in to comment.