Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: VM: Remove the NetworkVersionGetter #7818

Merged
merged 3 commits into from
Dec 21, 2021
Merged

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Dec 18, 2021

Related Issues

The primary motivation for this is to support FVM integration, because we don't want to be piping a network version getter across the FFI boundary.

Proposed Changes

The actual Runtime interface only ever reports the network version at the current epoch to actors. Within the VM too, all but one of the invocations of the version getter is for the current epoch. These can all be satisfied by simply providing the current network version on VM construction.

The exception is the randomness getters, which provide the network version at an arbitrary epoch as input. This PR gets around this by allowing the randomness module to query the network version.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <#issue number> <area>: <change being made>
    • example: fix: #1234 mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs, misc,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@arajasek arajasek requested a review from a team as a code owner December 18, 2021 00:18
@codecov
Copy link

codecov bot commented Dec 18, 2021

Codecov Report

Merging #7818 (670bd99) into master (94e1a83) will decrease coverage by 0.04%.
The diff coverage is 82.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7818      +/-   ##
==========================================
- Coverage   39.50%   39.46%   -0.05%     
==========================================
  Files         654      654              
  Lines       70010    70005       -5     
==========================================
- Hits        27657    27625      -32     
- Misses      37609    37628      +19     
- Partials     4744     4752       +8     
Impacted Files Coverage Δ
.../lotus-sim/simulation/blockbuilder/blockbuilder.go 0.00% <0.00%> (ø)
cmd/lotus-sim/simulation/simulation.go 0.00% <0.00%> (ø)
cmd/lotus-sim/simulation/step.go 0.00% <0.00%> (ø)
chain/stmgr/utils.go 22.60% <33.33%> (ø)
chain/gen/genesis/miners.go 57.68% <75.00%> (-0.13%) ⬇️
chain/consensus/filcns/compute_state.go 74.26% <100.00%> (ø)
chain/consensus/filcns/filecoin.go 51.21% <100.00%> (ø)
chain/gen/genesis/genesis.go 46.58% <100.00%> (-0.17%) ⬇️
chain/rand/rand.go 61.90% <100.00%> (+1.12%) ⬆️
chain/stmgr/actors.go 44.26% <100.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94e1a83...670bd99. Read the comment docs.

Copy link
Contributor

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arajasek arajasek merged commit 1bc9877 into master Dec 21, 2021
@arajasek arajasek deleted the asr/vm-nvfactor branch December 21, 2021 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants