-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
249 Separate evm_loader deployment from proxy-model deployment (#271)
* switch to new evm_loader deployment * fix docker-compose file * fix deploy-test.sh * add error logging * Revert "add error logging" This reverts commit fcd0010. * rename token owner file * fix docker-compose file * tests finally works * rename file * fix docker-compose-test * add evm_loader.log file as build artifact * Improve deploy sequence * use healthcheck in solana service * remove unnecessary dependence * add cleanup step * add solana_url into healthcheck explicitely * fix cleanup_docker function Co-authored-by: ivanl <[email protected]>
- Loading branch information
Showing
6 changed files
with
95 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ steps: | |
- "proxy.log" | ||
- "solana.log" | ||
- "measurements.log" | ||
- "evm_loader.log" | ||
|
||
- wait | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$SOLANA_URL" ]; then | ||
echo "SOLANA_URL is not set" | ||
exit 1 | ||
fi | ||
|
||
solana config set -u $SOLANA_URL | ||
|
||
echo "Dumping evm_loader and extracting ELF parameters" | ||
export EVM_LOADER=$(cat /var/deployment_data/evm_loader_id | sed '/Program Id: \([0-9A-Za-z]\+\)/,${s//\1/;b};s/^.*$//;$q1') | ||
solana program dump "$EVM_LOADER" ./evm_loader.dump | ||
export $(/spl/bin/neon-cli --evm_loader="$EVM_LOADER" neon-elf-params ./evm_loader.dump) | ||
|
||
/spl/bin/create-test-accounts.sh 1 | ||
|
||
if [ "$(spl-token balance "$NEON_TOKEN_MINT" || echo 0)" -eq 0 ]; then | ||
[[ -z "$NEW_USER_AIRDROP_AMOUNT" ]] && export NEW_USER_AIRDROP_AMOUNT=100 | ||
echo "NEW_USER_AIRDROP_AMOUNT=$NEW_USER_AIRDROP_AMOUNT" | ||
echo 'Create balance and mint token' | ||
TOKEN_ACCOUNT=$( (spl-token create-account "$NEON_TOKEN_MINT" || true) | grep -Po 'Creating account \K[^\n]*') | ||
echo "TOKEN_ACCOUNT=$TOKEN_ACCOUNT" | ||
spl-token mint "$NEON_TOKEN_MINT" $(("$NEW_USER_AIRDROP_AMOUNT"*1000)) --owner /var/deployment_data/evm_loader-keypair.json -- "$TOKEN_ACCOUNT" | ||
fi | ||
|
||
proxy/run-proxy.sh |