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

feat(sia): Sia Wallet functionality #2221

Draft
wants to merge 564 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
564 commits
Select commit Hold shift + click to select a range
0cfb789
Merge remote-tracking branch 'origin/dev' into sia-encoding
shamardy Aug 26, 2024
89e3263
use enable-sia flag for sia_docker_tests and remove usage of tokio::test
shamardy Aug 27, 2024
267889d
misc fixes
shamardy Aug 27, 2024
dfeb94b
match PrivKeyPolicy::Metamask in siacoin `my_address` implementation …
shamardy Aug 27, 2024
d6e734c
Add `define_prefixed_type` macro
shamardy Aug 27, 2024
d1c2cde
Revert "Add `define_prefixed_type` macro"
shamardy Aug 27, 2024
60118dc
use new sia-rust crate repo
Alrighttt Aug 27, 2024
e11b279
fix docker tests
Alrighttt Aug 27, 2024
1930fdc
delete sia crate from repo
Alrighttt Aug 27, 2024
eab4035
update sia-rust
Alrighttt Aug 27, 2024
59f4b17
Merge branch 'sia-hd-wallet' into sia-encoding
Alrighttt Aug 28, 2024
19651fd
bump sia-rust
Alrighttt Aug 28, 2024
0d048c5
merge my_balance impl
Alrighttt Aug 28, 2024
f583c92
cargo.lock
Alrighttt Aug 28, 2024
d36e004
impl sia get_public_key
Alrighttt Aug 29, 2024
65a25df
fix key_pair.public handling
Alrighttt Aug 29, 2024
668656e
remove dead function
Alrighttt Aug 29, 2024
a46b3d3
add SiaCoinBuildError::InvalidSecretKey
Alrighttt Aug 29, 2024
007e227
remove generate_keypair_from_slice
Alrighttt Aug 29, 2024
34c8fb9
fix imports
Alrighttt Aug 29, 2024
a3057f6
Cargo.lock
Alrighttt Aug 29, 2024
819c82e
set sia-rust to main branch for working branch
Alrighttt Aug 29, 2024
f870a8b
impl sia validate_address
Alrighttt Aug 29, 2024
b07fea7
set sia platform_ticker
Alrighttt Aug 29, 2024
eaa1b9b
set sia decimals
Alrighttt Aug 29, 2024
f1c6ce7
cargo clippy
Alrighttt Aug 29, 2024
dcb78c0
fix imports
Alrighttt Aug 29, 2024
4ac1879
add TODO notes
Alrighttt Aug 29, 2024
f3527a2
Implement withdraw for siacoin
shamardy Aug 29, 2024
70ea49b
fix keypair wrapper in withdraw
Alrighttt Aug 29, 2024
1568e0b
cargo fmt
Alrighttt Aug 29, 2024
7afd68d
bump sia-rust
Alrighttt Aug 29, 2024
2c1b02d
add sia-rust as submodule
Alrighttt Aug 29, 2024
da54de6
use sia-rust from submodule
Alrighttt Aug 29, 2024
44a8fdd
fix sia-rust import
Alrighttt Aug 29, 2024
613a46e
Cargo.lock
Alrighttt Aug 29, 2024
aec742f
fix withdraw builder miner_fee
Alrighttt Aug 29, 2024
c290240
bump sia-rust
Alrighttt Aug 29, 2024
102ae90
fix Currency u128
Alrighttt Aug 30, 2024
efbe339
fix txBuilder::new()
Alrighttt Aug 30, 2024
53ec1df
fix test compilation - still failing
Alrighttt Aug 30, 2024
4d32f05
cargo fmt sia_docker_tests
Alrighttt Sep 1, 2024
164a116
bump sia-rust commit
Alrighttt Sep 1, 2024
d5eb823
cargo.lock
Alrighttt Sep 2, 2024
edf8b7b
fix enable-sia wasm feature
Alrighttt Sep 2, 2024
c16011c
add header_map to FetchRequest builder
Alrighttt Sep 2, 2024
5d6fbca
bump sia-rust
Alrighttt Sep 2, 2024
aa5d810
add enable_sia
Alrighttt Sep 2, 2024
f9076f6
add sia send_raw_tx
Alrighttt Sep 2, 2024
088be44
change SIA ticker to TSIA
Alrighttt Sep 2, 2024
a8ca8d0
fix removed type
Alrighttt Sep 2, 2024
7ed6da7
bump sia-rust
Alrighttt Sep 2, 2024
210ebec
fix mixing field in SiaFieldDetails def
Alrighttt Sep 2, 2024
74705b3
bump sia-rust
Alrighttt Sep 2, 2024
ad872de
cargo fmt
Alrighttt Sep 2, 2024
7cca444
bump sia-rust
Alrighttt Sep 2, 2024
1f752f5
bump sia-rust
Alrighttt Sep 2, 2024
13270e6
sia tx history, ci, wasm build
shamardy Sep 3, 2024
d18769c
bump sia-rust
shamardy Sep 3, 2024
ae4d59c
bump-sia
Alrighttt Sep 3, 2024
e5b5101
init submodules in GH actions
Alrighttt Sep 3, 2024
fcad39b
GH actions init git submodules
Alrighttt Sep 3, 2024
3a7d3ae
fix additional workflows - init submodules
Alrighttt Sep 3, 2024
7a9de23
bump sia-rust
Alrighttt Sep 3, 2024
fbfdca4
Merge remote-tracking branch 'kp/sia-tx-history' into sia-wallet
Alrighttt Sep 3, 2024
2a2341a
add openssl install to linux builds
shamardy Sep 3, 2024
18fb2ca
add pkg-config to openssl install
shamardy Sep 3, 2024
dc92061
use transaction_type: SiaV2Transaction for withdraw
shamardy Sep 4, 2024
c408cfb
log and upload sha256 hash of CI builds
Alrighttt Sep 4, 2024
58d73fd
make max_maker_vol work for siacoin, get_sender_trade_fee uses 0 for now
shamardy Sep 4, 2024
579c08a
make fee_details type Sia for tx history
shamardy Sep 4, 2024
73295f4
include `tx_hex` field in sia transaction details
shamardy Sep 5, 2024
f169ab5
remove tx_hex from sia send_raw and withdraw
Alrighttt Sep 5, 2024
3564f91
only import eth_tests for cfg[test]
Alrighttt Sep 10, 2024
baba214
fix eth_tests import - left a note to check later
Alrighttt Sep 10, 2024
6aaccd3
fix wasm test compilation - unrelated to sia
Alrighttt Sep 10, 2024
d912cb3
bump sia-rust
Alrighttt Sep 10, 2024
66e67d7
begin significant refactor of sia-rust Client impls
Alrighttt Sep 12, 2024
213bb68
cargo fmt
Alrighttt Sep 13, 2024
59d905f
import SiaClientConf conditionally; WIP wasm is broken
Alrighttt Sep 13, 2024
85e5aae
fix WASM test compilation with temp hack
Alrighttt Sep 13, 2024
440c7c7
fix wasm test compilation
Alrighttt Sep 13, 2024
288ecdc
fix wasm test compilation again
Alrighttt Sep 13, 2024
5259edc
add TODO note
Alrighttt Sep 13, 2024
69a4310
add a basic WASM client test to siacoin
Alrighttt Sep 13, 2024
6f32f8b
add a basic WASM client test to siacoin - again
Alrighttt Sep 13, 2024
16f9b84
cargo clippy fixes; remove unneeded docker test
Alrighttt Sep 13, 2024
a46d854
cargo fmt; bump sia-rust
Alrighttt Sep 13, 2024
dad8050
rename symbols
Alrighttt Sep 13, 2024
1983161
add wasm tests
Alrighttt Sep 14, 2024
7d20b8d
bump sia-rust
Alrighttt Sep 14, 2024
4e8da8f
remove git submodule
Alrighttt Sep 16, 2024
624e824
Cargo.lock
Alrighttt Sep 16, 2024
1d6414b
remove git submodule remnant
Alrighttt Sep 16, 2024
236ce0a
use sia-rust as remote crate
Alrighttt Sep 16, 2024
a09fb18
cargo fmt
Alrighttt Sep 16, 2024
5b451c4
remove git submodules from workflows/actions
Alrighttt Sep 16, 2024
a459c03
removed method previously introduced for sia
Alrighttt Sep 16, 2024
0e2532f
wasm lint with --all-features
Alrighttt Sep 16, 2024
efb18dd
set --all-features for wasm CI tests
Alrighttt Sep 17, 2024
662f5da
remove feature flag from wasm target in .cargo/config
Alrighttt Sep 17, 2024
2d0bf0c
fix cargo clippy unused_macro
Alrighttt Sep 17, 2024
1c8715d
remove libssl-dev install from GH action dep-install
Alrighttt Sep 17, 2024
2f3b0fd
remove openssl deps-install refs from workflows; Don't know this was …
Alrighttt Sep 17, 2024
1f85091
set all-features for tests, dev build CI; remove enable-sia feature f…
Alrighttt Sep 17, 2024
9a26e19
leave formatting unchanged from previous rev
Alrighttt Sep 17, 2024
19aaaab
removed now unused optional deps
Alrighttt Sep 17, 2024
6679489
Cargo.lock
Alrighttt Sep 17, 2024
70271b4
fix wasm test compilation
Alrighttt Sep 17, 2024
6642663
fix tests compilation
Alrighttt Sep 17, 2024
1de0b6d
Revert "set all-features for tests, dev build CI; remove enable-sia f…
Alrighttt Sep 17, 2024
cc175b6
set enable-sia in CI tests
Alrighttt Sep 17, 2024
6729e97
fix docker tests CI
Alrighttt Sep 17, 2024
8fbd342
set enable-sia feature for wasm CI build
Alrighttt Sep 19, 2024
8e4319c
fix type
Alrighttt Sep 19, 2024
7da7b7f
set default impl for MmCoin trait's is_asset_chain method
Alrighttt Sep 19, 2024
7579132
remove frivulous impl block
Alrighttt Sep 19, 2024
ea0b22b
set spammy log to trace level
Alrighttt Sep 19, 2024
d430f20
add default impl for MarketCoinOps's sign_raw_tx method
Alrighttt Sep 19, 2024
45ced44
remove debugging comment
Alrighttt Sep 19, 2024
bfe6166
Add FIXME comment regarding bad code
Alrighttt Sep 19, 2024
b2bc13a
bump sia-rust
Alrighttt Sep 20, 2024
cd7f4a8
fix sia-rust imports
Alrighttt Oct 2, 2024
1069054
add TODO comment - unnecessary wrapper type
Alrighttt Oct 2, 2024
0327143
fix potentially confusing symbol name - import already changed in pre…
Alrighttt Oct 13, 2024
669ed3f
use new helper method, PublicKey.address()
Alrighttt Oct 13, 2024
102ddae
directly use struct member instead of unnecessary method
Alrighttt Oct 13, 2024
a87bb32
remove unused import
Alrighttt Oct 13, 2024
e21e207
change "http_client" misnomer field name to "client"
Alrighttt Oct 13, 2024
bab4d54
Cargo.lock
Alrighttt Oct 13, 2024
7b19ed7
remove unused import
Alrighttt Oct 13, 2024
1daea0e
remove unnecessary variable
Alrighttt Oct 13, 2024
69728fd
simplify SiaCoin type; use Keyapir::public instead of direct usage of…
Alrighttt Oct 13, 2024
2aec397
again simplify SiaCoin type; use Keyapir::public instead of direct us…
Alrighttt Oct 13, 2024
67cbb2c
Refactored SiaCoin type, fix field reference
Alrighttt Oct 13, 2024
72d7ea9
add TODO comment
Alrighttt Oct 13, 2024
a9f75b0
wrap Sia PrivKeyPolicy in Arc<>
Alrighttt Oct 13, 2024
7555c50
impl Sia required_confirmations; remove various dead code
Alrighttt Oct 13, 2024
788154b
rename various symbols; fix misnomers
Alrighttt Oct 13, 2024
7d6c578
placeholder sia min_trading_vol
Alrighttt Oct 13, 2024
a96d8a8
add general KDF TODOs regarding trait refactoring
Alrighttt Oct 13, 2024
8bdfa60
add a placeholder get_receiver_trade_fee impl
Alrighttt Oct 13, 2024
5721b91
move trait refactoring TODOs to trait definitions instead of siacoin …
Alrighttt Oct 13, 2024
c3309f3
Merge branch 'dev' into sia-merge-dev
Alrighttt Oct 14, 2024
56947ba
cargo fmt
Alrighttt Oct 14, 2024
b097d05
bump sia-rust
Alrighttt Oct 14, 2024
161e052
cargo clippy
Alrighttt Oct 14, 2024
2679b18
fix docker test sia imports
Alrighttt Oct 14, 2024
d7e179f
Cargo.lock
Alrighttt Oct 14, 2024
e97698c
cargo fmt
Alrighttt Oct 14, 2024
f2be5d9
remove unused dep
Alrighttt Oct 14, 2024
a14f38f
Cargo.lock
Alrighttt Oct 14, 2024
753703c
bump sia-rust to remove openssl system dep
Alrighttt Oct 14, 2024
0cabbfc
bump sia-rust; fix CI builds openssl error
Alrighttt Oct 14, 2024
7593aec
Cargo.lock
Alrighttt Oct 14, 2024
8a42fd5
add placeholder key
Alrighttt Oct 17, 2024
55a5c0d
remove broken const definition - not needed
Alrighttt Oct 17, 2024
2d92769
add temp sia wait_for_confirmations
Alrighttt Oct 17, 2024
9d80881
add SiaTransaction new type; fix imports
Alrighttt Oct 17, 2024
66cb3fe
rename Error to represent general sia error; add SiaTransaction unit …
Alrighttt Oct 17, 2024
f91310e
rename SiaCoinError
Alrighttt Oct 17, 2024
3642b55
remove GetAddressUtxosResponse type alias
Alrighttt Oct 19, 2024
8c74bd8
import all sia rust imports via siacoin module
Alrighttt Oct 19, 2024
a6a782d
again remove GetAddressUtxosResponse type alias
Alrighttt Oct 19, 2024
162ab03
add select_outputs sia helper function
Alrighttt Oct 20, 2024
5cfb23a
add sia docker_test_sia_unique usage comments
Alrighttt Oct 20, 2024
c10f709
add ref to sia docker usage comment
Alrighttt Oct 20, 2024
b732158
set walletd auth for all sia docker tests
Alrighttt Oct 20, 2024
04e9373
use /api/debug/mine sia endpoint instead of docker exec
Alrighttt Oct 20, 2024
d00f9fb
rename sia docker test functions
Alrighttt Oct 20, 2024
dcec206
remove debug print
Alrighttt Oct 20, 2024
6737b64
change initialize_wallet_passphrase to pub instead of pub(crate) so i…
Alrighttt Oct 20, 2024
9072e2e
remove various dead code and unused feature flags; add TODO and debug…
Alrighttt Oct 20, 2024
6fc92dd
various sia_docker_test changes; add new tests; add helpers; edit com…
Alrighttt Oct 20, 2024
d79f5cc
add common ed25519 pubkey
Alrighttt Oct 20, 2024
e334620
sia send_taker_fee WIP; add uuid parsing
Alrighttt Oct 20, 2024
f7e0772
add sia pubkey_init unit test
Alrighttt Oct 20, 2024
8b30a9d
add doc comment regarding KMD DexFee case
Alrighttt Oct 20, 2024
9785d01
add sia static FEE_ADDR
Alrighttt Oct 20, 2024
a890db1
remove select_outputs helper from siacoin, now implemented in SiaApiC…
Alrighttt Oct 20, 2024
d632860
fix sia FEE_ADDR static def
Alrighttt Oct 20, 2024
1b4e83e
use from_public_key helper method in sia docker test
Alrighttt Oct 21, 2024
24e9d92
derive From, Into for SiaTransaction newtype
Alrighttt Oct 21, 2024
63f1414
add TODO comment lp_coins
Alrighttt Oct 21, 2024
6bf0633
add dummy send_taker_fee sia docker test
Alrighttt Oct 21, 2024
deb11eb
add missing enable-sia feature flag; fixes normal compile
Alrighttt Oct 21, 2024
a5f6d83
add verbosity to error message
Alrighttt Oct 23, 2024
7ee3832
split siacoin Error type into two types, KdfError and SiaCoinError. I…
Alrighttt Oct 23, 2024
1e215fb
impl From<String>, From<&str> for TransactionErr
Alrighttt Oct 23, 2024
87dbad3
remove WatcherOps from siacoin.rs in favor of default impl of the trait
Alrighttt Oct 23, 2024
6db5c29
fix unused var warnings on default impl of WatcherOps
Alrighttt Oct 23, 2024
5c19af1
remove Watcher imports from siacoin.rs
Alrighttt Oct 23, 2024
f40423b
update V2TransactionBuilder methods to use ref instead for easier for…
Alrighttt Oct 23, 2024
4a5f2aa
impl From<T: Display> for TransactionErr
Alrighttt Oct 23, 2024
732181d
add thiserror dep to coins crate
Alrighttt Oct 23, 2024
0a6b86a
add SiaCoinError::ClientHelpersError variant
Alrighttt Oct 23, 2024
d3d87d5
remove duplicate import of Keypair; imported as SiaKeypair otherwise …
Alrighttt Oct 23, 2024
f0420f6
impl WatcherOps for SiaCoin {}
Alrighttt Oct 23, 2024
00d7b30
fix sia_withdraw Keypair import
Alrighttt Oct 23, 2024
51b6162
remove unused prelude import from sia_withdraw.rs
Alrighttt Oct 23, 2024
a55d19d
add WIP sia_withdraw fix for V2TransactionBuilder changes
Alrighttt Oct 23, 2024
1d98bd1
bump sia-rust
Alrighttt Oct 23, 2024
4eab67a
bump sia-rust; Cargo.lock
Alrighttt Oct 23, 2024
fa9d23f
cargo fmt
Alrighttt Oct 23, 2024
252ddfd
add sia send_taker_fee
Alrighttt Oct 23, 2024
6804869
remove unused import
Alrighttt Oct 23, 2024
43e43a9
remove FIXME and useless .clone()
Alrighttt Oct 23, 2024
6b6f7c3
remove unused vars
Alrighttt Oct 23, 2024
10495a3
remove unused ticker field from SiaCoinBuilder
Alrighttt Oct 23, 2024
f833ec3
cleaner error handling of sia send_taker_fee
Alrighttt Oct 23, 2024
98f6f35
add dev comments and clean up sia send_taker_fee
Alrighttt Oct 23, 2024
88326c6
sia send_maker_payment placeholder
Alrighttt Oct 23, 2024
4d13a8a
Merge branch 'dev' into sia-wallet
Alrighttt Oct 23, 2024
56e96cc
remove unused functions
Alrighttt Oct 23, 2024
67abba1
change siacoin_from_hastings to take Currency as arg instead of u128;…
Alrighttt Oct 23, 2024
60f4197
rename function for easier readability hastings_to_siacoin
Alrighttt Oct 23, 2024
1114117
refactor hastings_to_siacoin error handling
Alrighttt Oct 23, 2024
635260b
remove useless unit test siacoin.rs
Alrighttt Oct 23, 2024
14b1da8
remove unused siacoin::new_get_public_key helper
Alrighttt Oct 23, 2024
1ff1fb5
WIP add siacoin docker test
Alrighttt Oct 24, 2024
709e402
Merge branch 'dev' into sia-wallet
Alrighttt Oct 24, 2024
793dc73
bump sia-rust
Alrighttt Oct 24, 2024
dddd7cb
reintroduce siacoin new_send_taker_fee after SwapOps async refactor; …
Alrighttt Oct 24, 2024
ca6a56c
cargo fmt
Alrighttt Oct 24, 2024
2b248fd
remove unused import siacoin.rs
Alrighttt Oct 24, 2024
46ee0b1
fix siacoin send_taker_fee amount calculation
Alrighttt Oct 24, 2024
516a30c
add dev comment re: embedding uuid into sia taker_fee
Alrighttt Oct 24, 2024
b13f5cd
add placeholder sia new_send_maker_payment
Alrighttt Oct 24, 2024
3b4a49e
set static txfee for send_taker_fee; embed swap uuid into send_taker_…
Alrighttt Oct 25, 2024
c22fd18
impl TryFrom<Vec<u8>> for SiaTransaction and inverse
Alrighttt Oct 25, 2024
1d43dc9
implement siacoin send_maker_payment; clean up send_taker_fee error h…
Alrighttt Oct 25, 2024
1959539
add placeholder MakerSpendsTakerPaymentError type to fix compilation
Alrighttt Oct 25, 2024
3cc39ae
change SendMakerPaymentError variant to better fit pattern of others
Alrighttt Oct 26, 2024
02823ca
again change SendMakerPaymentError variant to better fit pattern of o…
Alrighttt Oct 26, 2024
545fdf8
partially impl siacoin send_maker_spends_taker_payment - still requir…
Alrighttt Oct 26, 2024
e093bd9
fix various sia_docker_tests compilation errors related to sia-rust u…
Alrighttt Oct 26, 2024
a9821b5
remove unused variable from test_sia_build_tx docker test
Alrighttt Oct 26, 2024
a15c05e
separate impl SiaCoin blocks between helpers and "new_" SwapOps methods
Alrighttt Oct 27, 2024
5ed7ff2
impl siacoin send_taker_spends_maker_payment
Alrighttt Oct 27, 2024
26faa68
more verbose SendTakerFeeError::DexFeeVariant - provide variant via S…
Alrighttt Oct 27, 2024
7c23008
standardize siacoin Error display impls
Alrighttt Oct 27, 2024
9208c24
annotate ValidateFeeArgs unclear field name with dev comment
Alrighttt Oct 27, 2024
c5da4dc
add siacoin dev comment re: nearly duplicate code
Alrighttt Oct 27, 2024
547cf24
siacoin standarize Error Display impls
Alrighttt Oct 27, 2024
503a21b
remove String usage within SendTakerFeeError::DexFeeVariant - strict…
Alrighttt Oct 27, 2024
cebd338
incorporate ApiClientHelpers error handling refactor from sia-rust
Alrighttt Oct 27, 2024
47a3db0
impl SwapOps::validate_fee for siacoin
Alrighttt Oct 27, 2024
9aac5a1
Export sia-rust as pub from siacoin module so that docker tests can u…
Alrighttt Oct 27, 2024
dac7b87
fix various cargo clippy errors
Alrighttt Oct 27, 2024
d1627e3
bump sia-rust
Alrighttt Oct 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ rustflags = [ "-Zshare-generics=y" ]

[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'
rustflags = [ "--cfg=web_sys_unstable_apis" ]
rustflags = [ "--cfg=web_sys_unstable_apis" ]
70 changes: 55 additions & 15 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release
cargo build --features "enable-sia" --release

- name: Compress mm2 build output
env:
Expand All @@ -64,6 +64,7 @@ jobs:
zip $NAME target/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Compress kdf build output
env:
Expand All @@ -73,6 +74,7 @@ jobs:
NAME="kdf_$COMMIT_HASH-linux-x86-64.zip"
zip $NAME target/release/kdf -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -126,7 +128,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release --target x86_64-apple-darwin
cargo build --features "enable-sia" --release --target x86_64-apple-darwin

- name: Compress mm2 build output
env:
Expand All @@ -137,6 +139,7 @@ jobs:
zip $NAME target/x86_64-apple-darwin/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Compress kdf build output
env:
Expand All @@ -146,6 +149,7 @@ jobs:
NAME="kdf_$COMMIT_HASH-mac-x86-64.zip"
zip $NAME target/x86_64-apple-darwin/release/kdf -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -187,7 +191,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release --target aarch64-apple-darwin
cargo build --features "enable-sia" --release --target aarch64-apple-darwin

- name: Compress mm2 build output
env:
Expand All @@ -198,6 +202,7 @@ jobs:
zip $NAME target/aarch64-apple-darwin/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Compress kdf build output
env:
Expand All @@ -207,6 +212,7 @@ jobs:
NAME="kdf_$COMMIT_HASH-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/kdf -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -249,26 +255,50 @@ jobs:
remove-item "./MM_VERSION"
}
echo $Env:COMMIT_HASH > ./MM_VERSION
cargo build --release
cargo build --features "enable-sia" --release

- name: Compress mm2 build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
$NAME="mm2_$Env:COMMIT_HASH-win-x86-64.zip"
$NAME = "mm2_$Env:COMMIT_HASH-win-x86-64.zip"

# Compress the mm2.exe binary and required DLLs using 7z
7z a $NAME .\target\release\mm2.exe .\target\release\*.dll
mkdir $Env:BRANCH_NAME
mv $NAME ./$Env:BRANCH_NAME/

# Generate the SHA256 hash for the zip file
Get-FileHash $NAME -Algorithm SHA256 | Format-Table Hash | Out-File "$NAME.sha256" -Encoding ascii

# Display the SHA256 hash
Get-Content "$NAME.sha256"

# Create branch directory if it doesn't exist
New-Item -Path $Env:BRANCH_NAME -ItemType Directory -Force

# Move the zip file and the SHA256 file to the branch directory
Move-Item $NAME ./$Env:BRANCH_NAME/
Move-Item "$NAME.sha256" ./$Env:BRANCH_NAME/

- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
$NAME="kdf_$Env:COMMIT_HASH-win-x86-64.zip"
$NAME = "kdf_$Env:COMMIT_HASH-win-x86-64.zip"
# Compress the kdf.exe binary and required DLLs using 7z
7z a $NAME .\target\release\kdf.exe .\target\release\*.dll
mv $NAME ./$Env:BRANCH_NAME/

# Generate the SHA256 hash for the zip file
Get-FileHash $NAME -Algorithm SHA256 | Format-Table Hash | Out-File "$NAME.sha256" -Encoding ascii

# Display the SHA256 hash
Get-Content "$NAME.sha256"

# Move the zip file and the SHA256 file to the branch directory
New-Item -Path $Env:BRANCH_NAME -ItemType Directory -Force
Move-Item $NAME ./$Env:BRANCH_NAME/
Move-Item "$NAME.sha256" ./$Env:BRANCH_NAME/

- name: Upload build artifact
env:
Expand Down Expand Up @@ -310,7 +340,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib
cargo rustc --features "enable-sia" --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib

- name: Compress mm2 build output
env:
Expand All @@ -322,6 +352,7 @@ jobs:
zip $NAME target/x86_64-apple-darwin/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Compress kdf build output
env:
Expand All @@ -332,6 +363,7 @@ jobs:
mv target/x86_64-apple-darwin/release/libkdflib.a target/x86_64-apple-darwin/release/libkdf.a
zip $NAME target/x86_64-apple-darwin/release/libkdf.a -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -385,8 +417,8 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
wasm-pack build --release mm2src/mm2_bin_lib --target web --out-dir ../../target/target-wasm-release

wasm-pack build --release mm2src/mm2_bin_lib --target web --out-dir ../../target/target-wasm-release --features enable-sia
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
Expand All @@ -396,6 +428,7 @@ jobs:
(cd ./target/target-wasm-release && zip -r - .) > $NAME
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -437,7 +470,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib
cargo rustc --features "enable-sia" --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib

- name: Compress mm2 build output
env:
Expand All @@ -449,6 +482,8 @@ jobs:
zip $NAME target/aarch64-apple-ios/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256


- name: Compress kdf build output
env:
Expand All @@ -459,6 +494,7 @@ jobs:
mv target/aarch64-apple-ios/release/libkdflib.a target/aarch64-apple-ios/release/libkdf.a
zip $NAME target/aarch64-apple-ios/release/libkdf.a -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -514,7 +550,7 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION

export PATH=$PATH:/android-ndk/bin
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --features "enable-sia" --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib

- name: Compress mm2 build output
env:
Expand All @@ -526,6 +562,7 @@ jobs:
zip $NAME target/aarch64-linux-android/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Compress kdf build output
env:
Expand All @@ -536,6 +573,7 @@ jobs:
mv target/aarch64-linux-android/release/libkdflib.a target/aarch64-linux-android/release/libkdf.a
zip $NAME target/aarch64-linux-android/release/libkdf.a -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down Expand Up @@ -591,7 +629,7 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION

export PATH=$PATH:/android-ndk/bin
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --features "enable-sia" --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib

- name: Compress mm2 build output
env:
Expand All @@ -603,6 +641,7 @@ jobs:
zip $NAME target/armv7-linux-androideabi/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Compress kdf build output
env:
Expand All @@ -613,6 +652,7 @@ jobs:
mv target/armv7-linux-androideabi/release/libkdflib.a target/armv7-linux-androideabi/release/libkdf.a
zip $NAME target/armv7-linux-androideabi/release/libkdf.a -j
mv $NAME ./$BRANCH_NAME/
shasum -a 256 ./$BRANCH_NAME/$NAME | tee ./$BRANCH_NAME/$NAME.sha256

- name: Upload build artifact
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fmt-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
uses: ./.github/actions/cargo-cache

- name: clippy lint
run: cargo clippy --target wasm32-unknown-unknown -- --D warnings
run: cargo clippy --target wasm32-unknown-unknown --all-features -- --D warnings
16 changes: 8 additions & 8 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release
cargo build --features "enable-sia" --release

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release --target x86_64-apple-darwin
cargo build --features "enable-sia" --release --target x86_64-apple-darwin

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release --target aarch64-apple-darwin
cargo build --features "enable-sia" --release --target aarch64-apple-darwin

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
remove-item "./MM_VERSION"
}
echo $Env:COMMIT_HASH > ./MM_VERSION
cargo build --release
cargo build --features "enable-sia" --release

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib
cargo rustc --features "enable-sia" --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib
cargo rustc --features "enable-sia" --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -471,7 +471,7 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION

export PATH=$PATH:/android-ndk/bin
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --features "enable-sia" --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib

- name: Compress mm2 build output
run: |
Expand Down Expand Up @@ -542,7 +542,7 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION

export PATH=$PATH:/android-ndk/bin
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --features "enable-sia" --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib

- name: Compress mm2 build output
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Test
run: |
cargo test --bins --lib --no-fail-fast
cargo test --bins --lib --no-fail-fast --features enable-sia

mac-x86-64-unit:
timeout-minutes: 90
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Test
run: |
cargo test --bins --lib --no-fail-fast
cargo test --bins --lib --no-fail-fast --features enable-sia

win-x86-64-unit:
timeout-minutes: 90
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

- name: Test
run: |
cargo test --bins --lib --no-fail-fast
cargo test --bins --lib --no-fail-fast --features enable-sia

linux-x86-64-kdf-integration:
timeout-minutes: 90
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
- name: Test
run: |
wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --test 'mm2_tests_main' --no-fail-fast
cargo test --test 'mm2_tests_main' --no-fail-fast --features enable-sia

mac-x86-64-kdf-integration:
timeout-minutes: 90
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Test
run: |
wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --test 'mm2_tests_main' --no-fail-fast
cargo test --test 'mm2_tests_main' --no-fail-fast --features enable-sia

win-x86-64-kdf-integration:
timeout-minutes: 90
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
run: |
Invoke-WebRequest -Uri https://github.com/KomodoPlatform/komodo/raw/d456be35acd1f8584e1e4f971aea27bd0644d5c5/zcutil/wget64.exe -OutFile \wget64.exe
Invoke-WebRequest -Uri https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.bat -OutFile \cmd.bat && \cmd.bat
cargo test --test 'mm2_tests_main' --no-fail-fast
cargo test --test 'mm2_tests_main' --no-fail-fast --features enable-sia

docker-tests:
timeout-minutes: 90
Expand Down Expand Up @@ -253,4 +253,4 @@ jobs:
uses: ./.github/actions/cargo-cache

- name: Test
run: WASM_BINDGEN_TEST_TIMEOUT=480 GECKODRIVER=/bin/geckodriver wasm-pack test --firefox --headless mm2src/mm2_main
run: WASM_BINDGEN_TEST_TIMEOUT=480 GECKODRIVER=/bin/geckodriver wasm-pack test --firefox --headless mm2src/mm2_main --features enable-sia
Loading
Loading