-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6883 from onflow/janez/v0.37-execution-version-fr…
…om-snapshot Get execution version from snapshot instead of state - v0.37 port
- Loading branch information
Showing
42 changed files
with
641 additions
and
545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
engine/execution/computation/query/mock/entropy_provider_per_block.go
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package computation | ||
|
||
import ( | ||
"github.com/onflow/flow-go/model/flow" | ||
"github.com/onflow/flow-go/state/protocol" | ||
) | ||
|
||
// SnapshotExecutionSubset is a subset of the protocol state snapshot that is needed by the FVM | ||
var _ protocol.SnapshotExecutionSubset = (protocol.Snapshot)(nil) | ||
|
||
// protocolStateWrapper just wraps the protocol.State and returns a SnapshotExecutionSubset | ||
// from the AtBlockID method instead of the protocol.Snapshot interface. | ||
type protocolStateWrapper struct { | ||
protocol.State | ||
} | ||
|
||
// protocolStateWrapper implements `EntropyProviderPerBlock` | ||
var _ protocol.SnapshotExecutionSubsetProvider = (*protocolStateWrapper)(nil) | ||
|
||
func (p protocolStateWrapper) AtBlockID(blockID flow.Identifier) protocol.SnapshotExecutionSubset { | ||
return p.State.AtBlockID(blockID) | ||
} | ||
|
||
// NewProtocolStateWrapper wraps the protocol.State input so that the AtBlockID method returns a | ||
// SnapshotExecutionSubset instead of the protocol.Snapshot interface. | ||
// This is used in the FVM for execution. | ||
func NewProtocolStateWrapper(s protocol.State) protocol.SnapshotExecutionSubsetProvider { | ||
return protocolStateWrapper{s} | ||
} |
Oops, something went wrong.