Skip to content

Conversation

@pcw109550
Copy link
Contributor

@pcw109550 pcw109550 commented Feb 18, 2024

Description

Implements FFI interface for fetching snapshot data on foundry testing. Subset of ethereum-optimism/optimism#6638.

For unknown reason, importing @optimism/src/libraries/DisputeTypes.sol causes below build error.

Error: 
Compiler run failed:
Error (2333): Identifier already declared.
 --> lib/optimism/packages/contracts-bedrock/src/dispute/lib/LibGameId.sol:9:1:
  |
9 | library LibGameId {
  | ^ (Relevant source part starts here and spans across multiple lines).
Note: The previous declaration is here:
 --> lib/optimism/packages/contracts-bedrock/src/dispute/lib/LibGameId.sol:4:1:
  |
4 | import "src/libraries/DisputeTypes.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I could not resolve this, so first hardcoded the VMStatuses for temporary solution. Will try to remove this in the follow up PR.

Tests

Added a minimal viable test which only tests add RISCV instruction: test_add_succeeds. Tests for instruction and syscalls will be added in followup PR.

Additional context

Current dependencies on/for this PR:

@pcw109550 pcw109550 force-pushed the tip/pcw109550/asterisc-contract-test branch 2 times, most recently from 3b909ce to ef3caf8 Compare February 19, 2024 16:44
@pcw109550 pcw109550 changed the base branch from tip/pcw109550/riscv-abi to master February 19, 2024 23:03
@pcw109550 pcw109550 force-pushed the tip/pcw109550/asterisc-contract-test branch from c107257 to b2d85c8 Compare February 20, 2024 16:05
@pcw109550 pcw109550 changed the title feat: Asterisc contracts VM tests feat: Asterisc contracts VM tests - FFI Feb 20, 2024
@pcw109550 pcw109550 force-pushed the tip/pcw109550/asterisc-contract-test branch from b2d85c8 to 254e865 Compare February 20, 2024 16:28
@pcw109550 pcw109550 requested review from ImTei and clabby February 20, 2024 16:40
@pcw109550 pcw109550 marked this pull request as ready for review February 20, 2024 16:40
@pcw109550 pcw109550 self-assigned this Feb 20, 2024
@pcw109550 pcw109550 added this pull request to the merge queue Mar 11, 2024
Merged via the queue into master with commit 16e809f Mar 11, 2024
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.

3 participants