mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 18:55:49 +00:00
fix release builder
This commit is contained in:
68
hook/LaunchHooks.md
Normal file
68
hook/LaunchHooks.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Xahau Launch Hooks
|
||||
|
||||
## Savings Hook
|
||||
When it comes to managing money, it is a common practice to maintain separate spending and savings accounts.
|
||||
Suppose you receive an income or salary to your on-ledger account several times a month. Each time you receive funds above a certain threshold you may wish to move a predefined percentage to a savings account where you will not accidentally spend them. The savings hook does exactly this.
|
||||
### Hook Parameters
|
||||
1. Account to install on
|
||||
2. Account to send savings to
|
||||
3. The percentage to send
|
||||
4. The threshold at which it is activated
|
||||
5. Whether it applies to incoming payments only, outgoing payments only or both.
|
||||
### xApp Features
|
||||
1. Display the send-to account
|
||||
2. Display the percentage
|
||||
3. Display the total amount sent
|
||||
4. Display the conditions of sending (threshold + incoming/outgoing payments)
|
||||
5. Allow the hook to be uninstalled
|
||||
|
||||
## Firewall Hook
|
||||
The ledger is a messy place full of unwanted transactions and spam. To avoid being spammed with low value transactions containing unsolicitied memos you may install a Firewall hook on your account.
|
||||
### Hook Parameters
|
||||
1. Types of transactions to allow into and out of your account (Payment, Escrow, PayChannel) etc.
|
||||
2. Allow a minimum number of drops for an incoming txn to be allowed.
|
||||
3. Allow a minimum amount to be specified for each of the trustline assets on the account as well.
|
||||
4. Allow any txn with a memo larger than X bytes to be blocked regardless of other rules.
|
||||
### xApp Features
|
||||
1. Display the current settings of the hook. Allow the settings to be changed.
|
||||
2. Allow the hook to be uninstalled.
|
||||
|
||||
## Blocklist Hook
|
||||
Filter outgoing and incoming payments against a known list of scam accounts maintained by a third party. This acts as a guard against accidentally sending to a scam, or being sent tainted funds by a scammer.
|
||||
### Hook Parameters
|
||||
1. The blocklist (account) to listen to.
|
||||
### xApp Features
|
||||
1. Number of times a transaction was blocked.
|
||||
2. The current blocklist (account) being listened to.
|
||||
3. Allow the hook to be uninstalled.
|
||||
|
||||
## Direct Debit Hook
|
||||
Allow trusted third parties to pull funds from your account up to a limit you set. For example your power company can bill you and your account can automatically pay that bill.
|
||||
### Hook Parameters
|
||||
1. One or more accounts to provide direct deposit authorization to.
|
||||
2. A currency and a limit for each of these.
|
||||
## xApp Features
|
||||
1. See who you've authorized.
|
||||
2. See how much they're authorized for.
|
||||
3. See how much they've drawn down this month.
|
||||
4. Allow authorization to be removed.
|
||||
5. Allow authorization limit to be changed.
|
||||
6. Allow additional authorizations to be created.
|
||||
7. Allow the hook to be uninstalled.
|
||||
8. Show a list of recent direct debit transactions.
|
||||
|
||||
|
||||
## High-Value Payment Hook
|
||||
When sending high value transactions out of your account, require first a notification that a high valued payment will be made, followed by a time delay, followed by the high value transaction itself. This prevents accidental high value sends, adding an additional layer of security to your account.
|
||||
### Hook Parameters
|
||||
1. Select currencies for which the hook will act.
|
||||
2. Select the thresholds for which the hook will be triggered.
|
||||
### xApp Features
|
||||
1. See current pending outgoing high value transactions.
|
||||
2. State that the hook is active and for which currencies and thresholds.
|
||||
3. Allow the hook to be uninstalled.
|
||||
4. If installed, and a high value transaction is made from Xumm, it is redirected into the xApp.
|
||||
5. The xApp then generates a notification transaction (ttInvoke) which is sent to the hook.
|
||||
6. The xApp will then remind the user with an event at a later time that the transaction proper still needs to be sent.
|
||||
7. Sending the transaction proper again will result in successful send.
|
||||
|
||||
@@ -67,18 +67,21 @@ mkdir .nih_c;
|
||||
mkdir .nih_toolchain;
|
||||
cd .nih_toolchain &&
|
||||
yum install -y wget lz4 lz4-devel git llvm13-static.x86_64 llvm13-devel.x86_64 devtoolset-10-binutils zlib-static ncurses-static -y \
|
||||
gcc-c++ \
|
||||
devtoolset-7-gcc-c++ \
|
||||
devtoolset-9-gcc-c++ \
|
||||
devtoolset-10-gcc-c++ \
|
||||
snappy snappy-devel \
|
||||
zlib zlib-devel \
|
||||
lz4-devel \
|
||||
libasan &&
|
||||
export PATH=`echo $PATH | sed -E "s/devtoolset-9/devtoolset-7/g"` &&
|
||||
echo "-- Install ZStd 1.1.3 --" &&
|
||||
yum install epel-release -y &&
|
||||
ZSTD_VERSION="1.1.3" &&
|
||||
( wget -nc -O zstd-${ZSTD_VERSION}.tar.gz https://github.com/facebook/zstd/archive/v${ZSTD_VERSION}.tar.gz; echo "" ) &&
|
||||
tar xzvf zstd-${ZSTD_VERSION}.tar.gz &&
|
||||
cd zstd-${ZSTD_VERSION} &&
|
||||
make -j8 && make install &&
|
||||
make -j8 install &&
|
||||
cd .. &&
|
||||
echo "-- Install Cmake 3.23.1 --" &&
|
||||
pwd &&
|
||||
@@ -112,19 +115,19 @@ rm -rf build CMakeCache.txt &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake .. -DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ -DCMAKE_INSTALL_PREFIX=/usr/lib64/llvm13/ -DCMAKE_BUILD_TYPE=Release &&
|
||||
make -j8 &&
|
||||
make install &&
|
||||
make -j8 install &&
|
||||
ln -s /usr/lib64/llvm13/lib/include/lld /usr/include/lld &&
|
||||
cp /usr/lib64/llvm13/lib/liblld*.a /usr/local/lib/ &&
|
||||
cd ../../../ &&
|
||||
cd ../../ &&
|
||||
echo "-- Build WasmEdge --" &&
|
||||
( git clone https://github.com/WasmEdge/WasmEdge.git; echo "" ) &&
|
||||
cd WasmEdge &&
|
||||
( wget -nc https://github.com/WasmEdge/WasmEdge/archive/refs/tags/0.11.2.zip; unzip -o 0.11.2.zip; ) &&
|
||||
cd WasmEdge-0.11.2 &&
|
||||
( mkdir build; echo "" ) &&
|
||||
cd build &&
|
||||
export BOOST_ROOT="/usr/local/src/boost_1_75_0" &&
|
||||
export Boost_LIBRARY_DIRS="/usr/local/lib" &&
|
||||
export BOOST_INCLUDEDIR="/usr/local/src/boost_1_75_0" &&
|
||||
export PATH=`echo $PATH | sed -E "s/devtoolset-7/devtoolset-9/g"` &&
|
||||
cmake .. \
|
||||
-DWASMEDGE_BUILD_SHARED_LIB=OFF \
|
||||
-DWASMEDGE_BUILD_STATIC_LIB=ON \
|
||||
@@ -135,15 +138,26 @@ cmake .. \
|
||||
-DWASMEDGE_BUILD_PLUGINS=OFF \
|
||||
-DWASMEDGE_LINK_TOOLS_STATIC=ON \
|
||||
-DBoost_NO_BOOST_CMAKE=ON -DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ -DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ &&
|
||||
make -j8 &&
|
||||
make install &&
|
||||
cd ../../ &&
|
||||
make -j8 install &&
|
||||
export PATH=`echo $PATH | sed -E "s/devtoolset-9/devtoolset-10/g"` &&
|
||||
cp -r include/api/wasmedge /usr/include/ &&
|
||||
cd /io/ &&
|
||||
echo "-- Build Rippled --" &&
|
||||
pwd &&
|
||||
cp Builds/CMake/deps/Rocksdb.cmake Builds/CMake/deps/Rocksdb.cmake.old &&
|
||||
perl -i -pe "s/^(\\s*)-DBUILD_SHARED_LIBS=OFF/\\1-DBUILD_SHARED_LIBS=OFF\\n\\1-DROCKSDB_BUILD_SHARED=OFF/g" Builds/CMake/deps/Rocksdb.cmake &&
|
||||
mv Builds/CMake/deps/WasmEdge.cmake Builds/CMake/deps/WasmEdge.old &&
|
||||
echo "find_package(LLVM REQUIRED CONFIG)
|
||||
message(STATUS \"Found LLVM ${LLVM_PACKAGE_VERSION}\")
|
||||
message(STATUS \"Using LLVMConfig.cmake in: \${LLVM_DIR}\")
|
||||
add_library (wasmedge STATIC IMPORTED GLOBAL)
|
||||
set_target_properties(wasmedge PROPERTIES IMPORTED_LOCATION \${WasmEdge_LIB})
|
||||
target_link_libraries (ripple_libs INTERFACE wasmedge)
|
||||
add_library (NIH::WasmEdge ALIAS wasmedge)
|
||||
message(\"WasmEdge DONE\")
|
||||
" > Builds/CMake/deps/WasmEdge.cmake &&
|
||||
cd release-build &&
|
||||
cmake .. -DBoost_NO_BOOST_CMAKE=ON -DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ -DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ &&
|
||||
cmake .. -DBoost_NO_BOOST_CMAKE=ON -DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ -DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ -DWasmEdge_LIB=/usr/local/lib64/libwasmedge.a &&
|
||||
make -j8 VERBOSE=1 &&
|
||||
strip -s rippled &&
|
||||
mv rippled xahaud &&
|
||||
@@ -158,4 +172,5 @@ echo "Git log [last 20]:" >> release.info &&
|
||||
git log -n 20 >> release.info;
|
||||
cd ..;
|
||||
mv src/ripple/net/impl/RegisterSSLCerts.cpp.old src/ripple/net/impl/RegisterSSLCerts.cpp;
|
||||
mv Builds/CMake/deps/Rocksdb.cmake.old Builds/CMake/deps/Rocksdb.cmake'
|
||||
mv Builds/CMake/deps/Rocksdb.cmake.old Builds/CMake/deps/Rocksdb.cmake;
|
||||
mv Builds/CMake/deps/WasmEdge.old Builds/CMake/deps/WasmEdge.cmake;'
|
||||
|
||||
Reference in New Issue
Block a user