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

Update fvm api calls #306

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Update fvm api calls #306

merged 1 commit into from
Jan 30, 2023

Conversation

pattyshack
Copy link
Contributor

@pattyshack pattyshack commented Jan 27, 2023

Closes #???

Description


For contributor use:

  • Targeted PR against master branch
  • Linked to GitHub issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the GitHub PR explorer
  • Added appropriate labels

@pattyshack pattyshack added the Improvement Technical work without new features, refactoring, improving tests label Jan 27, 2023
@bluesign
Copy link
Collaborator

@pattyshack thank you so much for fvm.WithAuthorizationChecksEnabled and fvm.WithSequenceNumberCheckAndIncrementEnabled

Comment on lines +1043 to +1049
derivedBlockData := derived.NewEmptyDerivedBlockData()
derivedTxnData, err := derivedBlockData.NewSnapshotReadDerivedTransactionData(
derived.EndOfBlockExecutionTime,
derived.EndOfBlockExecutionTime)
if err != nil {
return nil, err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit, maybe some method like derived.NewEmptyDerivedTransactionData() in the future to fvm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're using an internal api here. if you're using the fvm public interface, these are optional

Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm I didn't know you can do this via fvm public interfaces. let me have a look and make a PR, thanks @pattyshack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't think there's an equivalent public interface. i'm just pointing out that fvm is designed around the VM (Run) interface in general

Copy link
Collaborator

@bluesign bluesign Jan 30, 2023

Choose a reason for hiding this comment

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

ah ok got it thanks, though probably I still can workaround fvm here.

fvmOptions = append(fvmOptions, fvm.WithTransactionProcessors(fvm.NewTransactionInvoker()))
fvmOptions = append(
fvmOptions,
fvm.WithAuthorizationChecksEnabled(false),
Copy link
Member

Choose a reason for hiding this comment

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

Should we also add WithAccountKeyWeightThreshold with negative value to skip signature verification? cc @bluesign

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think as of flow-go master today not necessary.

@pattyshack pattyshack merged commit c09dfcb into master Jan 30, 2023
@sideninja sideninja deleted the patrick/update-fvm-api branch January 31, 2023 10:39
bors bot added a commit to onflow/flow-go that referenced this pull request Feb 7, 2023
3895: Merge `feature/active-pacemaker` to `master` r=jordanschalm a=jordanschalm

This PR merges the Active Pacemaker feature branch to `master`, after which we can delete the branch. 
- In the unlikely case of a need to revert to pre-Jolteon consensus during the current spork, we have `v0.29-no-pacemaker`

### Files with merge conflicts
```
CONFLICT (content): Merge conflict in cmd/Dockerfile
CONFLICT (content): Merge conflict in consensus/hotstuff/eventhandler/event_handler_test.go
CONFLICT (content): Merge conflict in consensus/hotstuff/integration/instance_test.go
CONFLICT (content): Merge conflict in consensus/integration/integration_test.go
CONFLICT (content): Merge conflict in engine/common/follower/engine.go
CONFLICT (content): Merge conflict in engine/consensus/compliance/core.go
CONFLICT (content): Merge conflict in engine/execution/computation/computer/computer_test.go
CONFLICT (content): Merge conflict in go.mod
CONFLICT (content): Merge conflict in insecure/go.mod
CONFLICT (content): Merge conflict in integration/go.mod
CONFLICT (content): Merge conflict in module/metrics.go
CONFLICT (content): Merge conflict in module/metrics/noop.go
CONFLICT (content): Merge conflict in storage/mock/headers.go
CONFLICT (content): Merge conflict in storage/mocks/storage.go
```
### Additional Commits
- 5277860 (`make tidy`)
- aa61441 (`make generate-mocks`)
- 7908418 0110499 39bc9b0 (pin version of `flow-emulator` which includes PRs below)
  - onflow/flow-emulator#275
  - onflow/flow-emulator#306
  - onflow/flow-emulator#311
- bb91d34 (`make tidy` again)
- 8e71b43 Merge `master`, resolve new conflicts in `engine/execution/computation/computer/computer_test.go`
- d75481c Pin version of `onflow/flow` which includes Header model changes for Pacemaker
- f46be69 Fix header whitespace (`goimports`)

See [7e24c7d...bb91d34](https://github.com/onflow/flow-go/pull/3895/files/7e24c7db89f89e4b250415fd35dbce0618213434..bb91d34cbc1caeeec807dbe96c15ccb15a7b7a30), [d75481c...f46be69](https://github.com/onflow/flow-go/pull/3895/files/d75481c2b41769c912858eb4bbbce33ae5d09131..f46be69140ab1af6c9501e13676f872572242ccd) for a diff of all post-merge changes.

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
bors bot added a commit to onflow/flow-go that referenced this pull request Feb 7, 2023
3895: Merge `feature/active-pacemaker` to `master` r=jordanschalm a=jordanschalm

This PR merges the Active Pacemaker feature branch to `master`, after which we can delete the branch. 
- In the unlikely case of a need to revert to pre-Jolteon consensus during the current spork, we have `v0.29-no-pacemaker`

### Files with merge conflicts
```
CONFLICT (content): Merge conflict in cmd/Dockerfile
CONFLICT (content): Merge conflict in consensus/hotstuff/eventhandler/event_handler_test.go
CONFLICT (content): Merge conflict in consensus/hotstuff/integration/instance_test.go
CONFLICT (content): Merge conflict in consensus/integration/integration_test.go
CONFLICT (content): Merge conflict in engine/common/follower/engine.go
CONFLICT (content): Merge conflict in engine/consensus/compliance/core.go
CONFLICT (content): Merge conflict in engine/execution/computation/computer/computer_test.go
CONFLICT (content): Merge conflict in go.mod
CONFLICT (content): Merge conflict in insecure/go.mod
CONFLICT (content): Merge conflict in integration/go.mod
CONFLICT (content): Merge conflict in module/metrics.go
CONFLICT (content): Merge conflict in module/metrics/noop.go
CONFLICT (content): Merge conflict in storage/mock/headers.go
CONFLICT (content): Merge conflict in storage/mocks/storage.go
```
### Additional Commits
- 5277860 (`make tidy`)
- aa61441 (`make generate-mocks`)
- 7908418 0110499 39bc9b0 (pin version of `flow-emulator` which includes PRs below)
  - onflow/flow-emulator#275
  - onflow/flow-emulator#306
  - onflow/flow-emulator#311
- bb91d34 (`make tidy` again)
- 8e71b43 Merge `master`, resolve new conflicts in `engine/execution/computation/computer/computer_test.go`
- d75481c Pin version of `onflow/flow` which includes Header model changes for Pacemaker
- f46be69 Fix header whitespace (`goimports`)

See [7e24c7d...bb91d34](https://github.com/onflow/flow-go/pull/3895/files/7e24c7db89f89e4b250415fd35dbce0618213434..bb91d34cbc1caeeec807dbe96c15ccb15a7b7a30), [d75481c...f46be69](https://github.com/onflow/flow-go/pull/3895/files/d75481c2b41769c912858eb4bbbce33ae5d09131..f46be69140ab1af6c9501e13676f872572242ccd) for a diff of all post-merge changes.

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Technical work without new features, refactoring, improving tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants