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

ability to advance time in a test #179

Open
turadg opened this issue Sep 10, 2024 · 3 comments
Open

ability to advance time in a test #179

turadg opened this issue Sep 10, 2024 · 3 comments

Comments

@turadg
Copy link
Member

turadg commented Sep 10, 2024

Problem to be solved

Upgrade16 had some auction timing bugs with timing that could have been detected in an A3P test if the test could time travel forward.

Unit tests in agoric-sdk have this ability through the ManualTimer service replacing the real one in bootstrap, but A3P tests are too high fidelity for that.

We need some other way to advance time.

Design

The test tooling could provide a way to advance the Linux system time.

Some other designs may need changes in agoric-sdk. This ticket tracks having the ability in the @agoric/synthetic-chain support package.

@mhofman
Copy link
Member

mhofman commented Sep 10, 2024

The main problem is how to advance time.

The system clock is global for a whole physical machine: VMs usually share it with the physical machine, and containers definitely share it with the host kernel.

On the opposite side we have time observed by vats, which is controlled by vat-timer. There are currently no specific plans to upgrade that vat. Furthermore having a time observed by vats being different from the chain time might cause confusion for tools sitting outside the chain and observing values written by vats that are disconnected from the chain time.

In production, the time observed by vats is derived from the chain time, so the least disruptive would be to tweak the chain time instead. I am not sure whether cosmos-sdk has any affordances to manually derive the chain time.

@dckc
Copy link
Member

dckc commented Oct 28, 2024

@dckc
Copy link
Member

dckc commented Oct 30, 2024

30 Oct office hours discussion...

@anilhelvaci says he has experience providing an alternative chain timer service using a contract.

@Chris-Hibbert points out possible interactions with zoe offer exit times, though it seems unlikely.

@anilhelvaci asked about interactions between phases in the a3p framework.
@Chris-Hibbert suggests a t:... where these timer manipulations are the norm.

see also 11 Oct comment on vaults testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants