From 0bb63befe6aa20dd4c4f944c6a2c6ce08fd8ce54 Mon Sep 17 00:00:00 2001 From: jjjj Date: Tue, 1 Aug 2023 14:20:32 +0200 Subject: [PATCH] fix: veifiable builds support --- README.md | 8 ++++++++ scripts/build_mainnet_verifiable.sh | 8 ++++++++ scripts/verify_mainnet.sh | 7 +++++++ 3 files changed, 23 insertions(+) create mode 100755 scripts/build_mainnet_verifiable.sh create mode 100755 scripts/verify_mainnet.sh diff --git a/README.md b/README.md index 5954cbc5..9e324885 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,11 @@ Key points: - Real-time risk monitoring is used to assess changing market conditions. - Marginfi's risk management system is transparent and deterministic. - Liquidation may occur if a user's account falls below the minimum required health factor. + +## Verify + +Marginfi can be veirified with Ellipsis Labs verifiable builds. + +Install the `solana-verify` tool [here](https://github.com/Ellipsis-Labs/solana-verifiable-build#installation). + +Run `./scripts/verify_mainnet.sh` diff --git a/scripts/build_mainnet_verifiable.sh b/scripts/build_mainnet_verifiable.sh new file mode 100755 index 00000000..d098d01f --- /dev/null +++ b/scripts/build_mainnet_verifiable.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +VERIFY_BIN=$(which solana-verify) +PROGRAM_LIB_NAME="marginfi" + +echo "sudo $VERIFY_BIN build --library-name $PROGRAM_LIB_NAME -- --features mainnet-beta" + +sudo $VERIFY_BIN build --library-name $PROGRAM_LIB_NAME -- --features mainnet-beta diff --git a/scripts/verify_mainnet.sh b/scripts/verify_mainnet.sh new file mode 100755 index 00000000..7e3124d7 --- /dev/null +++ b/scripts/verify_mainnet.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +VERIFY_BIN=$(which solana-verify) + +echo "sudo $VERIFY_BIN verify-from-repo -um --program-id MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA https://github.com/mrgnlabs/marginfi-v2 --library-name marginfi -- --features mainnet-beta" + +sudo $VERIFY_BIN verify-from-repo -um --program-id MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA https://github.com/mrgnlabs/marginfi-v2 --library-name marginfi -- --features mainnet-beta