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

Seed TestVM with predictable testing values at construction #1348

Open
alexytsu opened this issue Aug 1, 2023 · 3 comments
Open

Seed TestVM with predictable testing values at construction #1348

alexytsu opened this issue Aug 1, 2023 · 3 comments
Assignees

Comments

@alexytsu
Copy link
Contributor

alexytsu commented Aug 1, 2023

Currently constants such as TEST_VM_RAND_ARRAY and TEST_FAUCET_ADDR are used as static consts in the TestVM's stack. These are also duplicated and used in the fil_actors_integration_tests crate to make assertions during test execution.

They should be deduplicated a possible solution is to reference GensisSpec usage #1345 (comment)

@alexytsu alexytsu self-assigned this Aug 1, 2023
@anorth
Copy link
Member

anorth commented Oct 18, 2023

Related: #1371

@anorth
Copy link
Member

anorth commented Oct 23, 2023

This is part of a general need to inject/configure all externally-provided values into the VM. E.g. the circulating supply is a value provided to the VM by its host (Lotus). Follow a pattern like Primitives to bring all similar values under control of the test author.

@anorth
Copy link
Member

anorth commented Oct 23, 2023

The ref FVM has

  • Externs, which are some functions that call out to the host for things like chain randomness
  • Machine constants, which are values provided at construction for things like base fee and circulating supply

I think there could have been just a single concept here, but let's just follow the same design which will make the integration easier.

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

No branches or pull requests

2 participants