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: macOS e2e local tests fails on M3 silicon processors #6

Merged
merged 8 commits into from
Sep 3, 2024

Conversation

falcucci
Copy link

@falcucci falcucci commented Jun 18, 2024

Some crucial dependencies were missing to make the cardano-cli and cardano-node to work as it should in a standalone environment.

after-all, this aims to bring more compatibility for a general local troubleshooting due to continuous errors the script has shown to start the nodes, as you can see as follows:

cargo build --release -p mithril-aggregator -p mithril-signer -p mithril-client-cli -p mithril-relay && cargo run -p mithril-end-to-end -- -vvvvvvvvvv --bin-directory target/release/ --work-directory=$(PWD)/artifacts --devnet-scripts-directory=./mithril-test-lab/mithril-devnet --cardano-node-version 8.7.3
    Finished `release` profile [optimized] target(s) in 0.20s
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/mithril-end-to-end -vvvvvvvvvv --bin-directory target/release/ --work-directory=/Users/falcucci/txpipe/mithril/artifacts --devnet-scripts-directory=./mithril-test-lab/mithril-devnet --cardano-node-version 8.7.3`
Jun 18 23:05:32.395 INFO Bootstrapping the Devnet, script: /Users/falcucci/txpipe/mithril/mithril-test-lab/mithril-devnet/devnet-mkfiles.sh
tar: ./bin/cardano-cli: Not found in archive
tar: ./bin/cardano-node: Not found in archive
tar: Error exit delayed from previous errors.
dyld[38816]: Library not loaded: @executable_path/libsodium.23.dylib
  Referenced from: <no uuid> /Users/falcucci/txpipe/mithril/artifacts/devnet/cardano-cli
  Reason: tried: '/Users/falcucci/txpipe/mithril/artifacts/devnet/libsodium.23.dylib' (no such file), '/usr/local/lib/libsodium.23.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libsodium.23.dylib' (no such file, not in dyld cache)
/Users/falcucci/txpipe/mithril/mithril-test-lab/mithril-devnet/mkfiles/mkfiles-cardano.sh: line 81: 38816 Abort trap: 6           $CARDANO_CLI byron genesis genesis --protocol-magic ${NETWORK_MAGIC} --start-time "${START_TIME}" --k ${SECURITY_PARAM} --n-poor-addresses 0 --n-delegate-addresses ${NUM_SPO_NODES} --total-balance ${INIT_SUPPLY} --delegate-share 1 --avvm-entry-count 0 --avvm-entry-balance 0 --protocol-parameters-file "${ARTIFACTS_DIR_TEMP}/byron.genesis.spec.json" --genesis-output-dir "${ARTIFACTS_DIR_TEMP}/byron-gen-command"
Jun 18 23:05:35.776 INFO Starting the Devnet, script: /Users/falcucci/txpipe/mithril/artifacts/devnet/start-cardano.sh
Error: Failed to start the devnet

Caused by:
    No such file or directory (os error 2)

…init.sh`

- add `cardano-node-chairman` to the `.gitignore` file
- add `cardano-submit-api` to the `.gitignore` file
- add `cardano-testnet` to the `.gitignore` file
- add `cardano-topology` to the `.gitignore` file
- add `cardano-tracer` to the `.gitignore` file
- add `bech32` to the `.gitignore` file
- add `locli` to the `.gitignore` file
- add `tx-generator` to the `.gitignore` file
- add various libraries to the `.gitignore` file
- fix `cardano_node_version_release` assignment in `mkfiles-init.sh`
- update the download and extraction process in `mkfiles-init.sh`
- move the copy and remove process in `mkfiles-init.sh`
Copy link

github-actions bot commented Jun 18, 2024

Test Results

    4 files  ±0     53 suites  ±0   9m 39s ⏱️ +5s
1 242 tests ±0  1 242 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 450 runs  ±0  1 450 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fedb40b. ± Comparison against base commit 21ed6fc.

♻️ This comment has been updated with latest results.

- update the script to extract cardano-cli & cardano-node with a fallback option if the initial extraction fails
- update the copy command to include a fallback option to suppress potential errors
- update the file `devnet-mkfiles.sh` to add `set -x`
- update the `mkfiles-cardano.sh` file to change the environment variables for `cardano_bin_path`, `cardano_cli`, and `cardano_node`
- modify the `mkfiles-init.sh` file to copy the `./bin` directory instead of individual files
- edit the `mkfiles-mithril-delegation.sh` file to replace all occurrences of `./cardano-cli` with `$cardano_cli`
- update the `mkfiles-mithril-era.sh` file to change all instances of `./cardano-cli` with `$cardano_cli`
- modify the `mkfiles-mithril-payment.sh` file to replace all `./cardano-cli` occurrences with `$cardano_cli`
- update the `mkfiles-pools.sh` file to replace the command `./cardano-cli` with `$cardano_cli`
- update the `mkfiles-query.sh` file to replace all occurrences of `./cardano-cli` with `$cardano_cli`
- edit the `mkfiles-start.sh` file to change all instances of `./cardano-cli` and `./cardano-node` with `$cardano_cli` and `$cardano_node` respectively. add `set -e` and `set -x` to the script.
- remove obsolete entries from `.gitignore`
- change the location where `cardano-cli` and `cardano-node` are extracted in `mkfiles-init.sh`
- update the extraction command for cardano-cli & cardano-node
- remove unnecessary commands to copy and remove the ./bin directory
- update the version in `version` from `0.3.8` to `0.3.9`
@falcucci falcucci merged commit 8fdf0bb into main Sep 3, 2024
38 checks passed
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.

1 participant