• Matthew Slipper's avatar
    ctb: Fix data race in generate-l2-genesis · 9bb13a09
    Matthew Slipper authored
    Forge reads the genesis outfile before it is completely written. This leads to errors like the following:
    
    ```
    [FAIL. Reason: setup failed: failed to parse json file: "/root/project/packages/contracts-bedrock/.testdata/genesis.json": EOF while parsing a value at line 1 column 0]
    ```
    
    To fix this, this PR adds a loop at the end of the file that checks if the L2 outfile is over 8 megabytes. This is a hack - a longer term fix would be to investigate why the process Forge calls via `vm.ffi` exits prior to fully writing the file. I tried calling `Sync()` from within the Go code, but it didn't fix the issue.
    9bb13a09
Name
Last commit
Last update
..
getting-started Loading commit data...
go-ffi Loading commit data...
interfaces Loading commit data...
libraries Loading commit data...
universal Loading commit data...
ChainAssertions.sol Loading commit data...
Chains.sol Loading commit data...
Deploy.s.sol Loading commit data...
DeployConfig.s.sol Loading commit data...
DeployL2.s.sol Loading commit data...
DeployPeriphery.s.sol Loading commit data...
Deployer.sol Loading commit data...
Executables.sol Loading commit data...
FaultDisputeGameViz.s.sol Loading commit data...
FeeVaultWithdrawal.s.sol Loading commit data...
PeripheryDeployConfig.s.sol Loading commit data...
SemverLock.s.sol Loading commit data...
Types.sol Loading commit data...
check-deploy-configs.sh Loading commit data...
dag-viz.py Loading commit data...
deploy.sh Loading commit data...
forge-test-names.ts Loading commit data...
generate-l2-genesis.sh Loading commit data...
generate-snapshots.ts Loading commit data...
invariant-doc-gen.ts Loading commit data...
slither.sh Loading commit data...
storage-snapshot.sh Loading commit data...
validate-spacers.ts Loading commit data...
verify-foundry-install.sh Loading commit data...