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

pnpm mock-data fails with: "Failure on receiving a receipt ... duplicate field status" #60

Closed
Scetrov opened this issue Nov 17, 2024 · 2 comments · Fixed by #61
Closed

Comments

@Scetrov
Copy link
Contributor

Scetrov commented Nov 17, 2024

Summary

When running pnpm mock-data the following error messages are printed to the console:

[⠒] Compiling...
No files changed, compilation skipped
Script ran successfully.

## Setting up 1 EVM.

==========================

Chain 31337

Estimated gas price: 0.000000001 gwei

Estimated total gas used for script: 5806620

Estimated amount required: 0.00000000000580662 ETH

==========================

Transactions saved to: /home/richardslater/evefrontier/ccp-builder-examples/smart-gate/packages/contracts/broadcast/MockData.s.sol/31337/run-latest.json

Sensitive values saved to: /home/richardslater/evefrontier/ccp-builder-examples/smart-gate/packages/contracts/cache/MockData.s.sol/31337/run-latest.json

Error: Failure on receiving a receipt for 0x9f3c8ad6c143e758ce94a2b55167f3f970c65d41d1018997d00d40ffb9088a2a:
deserialization error: duplicate field `status` at line 1 column 4861
Failure on receiving a receipt for 0xef4778792678850e1223fe76368e16487ffb65555638eb59a65ba1d70fbb69b4:
deserialization error: duplicate field `status` at line 1 column 4861
Failure on receiving a receipt for 0x03dd59ac2db77b4cb6990b0a8ad5c0c575a54ad7627971179bed70470e3367b0:
deserialization error: duplicate field `status` at line 1 column 17486
Failure on receiving a receipt for 0x897ce976e14b284516344bf6b8261981c7098b7f983ac2b1873682e53091547e:
deserialization error: duplicate field `status` at line 1 column 8641
Failure on receiving a receipt for 0xb91edb4ebb9a7c18d1dba6136b8744e9c0944c456caae96f3ded135ff44c5752:
deserialization error: duplicate field `status` at line 1 column 8641
Failure on receiving a receipt for 0x71c8f4bcfea1775550f0164749e07337894c07eee0925b6ce52cac556b60da9a:
deserialization error: duplicate field `status` at line 1 column 17492
Failure on receiving a receipt for 0xa028a09b4dbc87ee84f05025804b93872aab27a7125f152c56455b8c1e1c859f:
deserialization error: duplicate field `status` at line 1 column 11362

 Add `--resume` to your command to try and continue broadcasting
        the transactions.
 ELIFECYCLE  Command failed with exit code 1.

It appears that the broadcast stops at this point resulting in failure.

Steps to Reproduce

  1. Install Node 18 and pnpm 8 or 9
  2. Checkout repository as per normal and cd into it
  3. cd into smart-gate
  4. run pnpm install (this will succeed)
  5. run pnpm mock-data will fail with the above.

This also happens for smart-gate and smart-storage-unit.

@Scetrov
Copy link
Contributor Author

Scetrov commented Nov 17, 2024

This appears to be as a result of foundry-rs/foundry#9239, which in turn points to a deserialization issue in alloy fixed in alloy-rs/alloy#1608.

Appears that this will be fixed in foundry via foundry-rs/foundry#9280.

@Scetrov
Copy link
Contributor Author

Scetrov commented Nov 17, 2024

Looks like the fix is as simple as:

--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -3,7 +3,7 @@ version: "3.8"
 services:
   foundry:
     container_name: foundry
-    image: ghcr.io/foundry-rs/foundry:nightly-515a4cc8aba1627a717a1057ff4f09c8cd3bf51f
+    image: ghcr.io/foundry-rs/foundry:nightly-d14c09f15a9849fe177d097451919810e5877617
     platform: linux/amd64 # Specify the platform
     entrypoint: anvil --block-time 1 --block-base-fee-per-gas 0 --gas-limit 3000000000 --hardfork cancun --host 0.0.0.0 --port 8546
     ports:

Just testing this and I will submit a PR.

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 a pull request may close this issue.

1 participant