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

fix: Propagate block environment to zkVM #332

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

Karrq
Copy link
Contributor

@Karrq Karrq commented Apr 19, 2024

Motivation

CrossChainReceiverTest currently has 4 failing tests.

Solution

The assertions that are failing are all related to block.timestamp being different than expected, this is because each zk call happens in a new transaction in a new batch, and all batches need to have increasing numbers and timestamps.
We override what the VM returns for block.timestamp and block.number so we can provide the expected test environment.

Notes

Depends on Moonsong-Labs/aave-delivery-infrastructure#3

feat(zk): hook system context block number and timestamp to environment
@nbaztec
Copy link
Collaborator

nbaztec commented Apr 19, 2024

Can you please also add a test case for this

@Karrq Karrq merged commit 28abf59 into dev Apr 22, 2024
10 checks passed
@Karrq Karrq deleted the fix/propagate-block-env branch April 22, 2024 09:33
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