interlay / interbtc Goto Github PK
View Code? Open in Web Editor NEWinterBTC: Bitcoin Anywhere
Home Page: https://app.interlay.io/
License: Apache License 2.0
interBTC: Bitcoin Anywhere
Home Page: https://app.interlay.io/
License: Apache License 2.0
The relay is currently initializable by anyone, we should only allow root to do this to prevent abuse - this is only a problem after genesis therefore does not affect already running chains.
It's currently using identity fee for xcm:
type Trader = UsingComponents<IdentityFee, ..>;
This is likely to mean the same fees as the relay chain. In all likelyhood parachains don't need as high fees.
paritytech/cumulus#920 - we noticed this on statemint. Encointer have also recently tweaked their code to not use IdentityFee<Balance>
. I suspect you might want to do the same.
Similar to #580, if the Vault has sufficient capacity we should allow cancelled issue requests to be executed. Note that the griefing collateral will still be slashed (as with the replace cancellation) but this will allow users to recover "dangling" BTC.
Substrate ships with an embedded Prometheus server, we should check if it possible to add custom metrics specific to runtime logic.
We currently prefix most of our extrinsics with ensure_parachain_not_shutdown
, moving this check to the filter will simplify things and ensure that calls in external modules cannot be called upon.
Our clients subscribe to replace requests (using the RequestReplace
event) and don't attempt to re-scan on cancellation - the user must call withdraw_replace
and then request_replace
again. To avoid unnecessarily making two calls we can automatically withdraw the pending replace request and allow the user to re-request replacement after the 24 hour ban has elapsed.
We have an RPC that returns the total system collateralization. The function is not called by the parachain itself. We need to decide how we want to calculate the collateralization.
(to_btc(total_DOT) / secure_threshold(total_DOT) +to_btc(total_KSM) / secure_threshold(total_KSM)) / total_INTERBTC
. This gives a meaningful value - a value > 1.0 is good. But for users it might be confusing, since they expect overcollateralization. Maybe for users a collateral utilization percentage would be easier to understand, i.e. a value of 0 - 100%, where 100% means we are at the capacity limitVec<(CurrencyId, UnsignedFixedPoint)>
and let the UI figure out how to display and aggregate it.I think I'm leaning towards the last solution for greatest flexibility.
This pallet also stores BTC inclusion fees, so it would make sense to simplify the naming.
The idea is that a control account can transact on behalf of a stash account which is used to manage a Vault's collateral. This would enable the stash key to be stored offline, perhaps in a cold wallet, to minimize fund loss should the physical server hosting the control key be compromised.
Currently most pallets have duplicate definitions for ArithmeticOverflow
and ArithmeticUnderflow
, we can use this enum instead to kick some unnecessary code.
If a Vault has no collateral and issued tokens it should be able to call deregister
to permanently "tombstone" it's account. This will prevent re-use of it's AccountId
and identity if an attacker would compromise the associated key file.
A follow-up to #482 would then be to delete all storage entries in vault-registry
and staking
, etc..
We currently duplicate a lot of logic in the javascript library to get the current individual and total escrow balances. This would be better placed in a RPC extension.
Prerequisite: #636
Background
Vaults can be liquidated either by becoming undercollateralized or by being reported for Bitcoin theft. More specifically, liquidation occurs per VaultId
, which is a tuple of (AccountId, CollateralCurrency, WrappedCurrency)
. The VaultId
tuple is an identity in and of itself, which enables Vault operators to reuse the same AccountId
to back wrapped Bitcoin with multiple collateral currencies. It provides an isolation of risk and responsibilities per each VaultId
identity. Thus, liquidation of an operator for one collateral currency does not bear any consequences on the other collateral currencies the operator is using, because they are separate VaultId
s. Once liquidated, there is no way for an operator to reinstate a VaultId
; its assets are seized and its status is permanently set to Liquidated
or CommittedTheft
respectively.
Is your feature request related to a problem? Please describe.
A complication arises when operators reuse the same AccountId
to register VaultId
s for multiple collateral currencies, which is indeed what the official Vault client does. If one of the registered VaultId
s gets liquidated but the operator wishes to keep using the collateral type that was liquidated, they need to create a new AccountId
. The new AccountId
allows for registering a new VaultId
with the same currency pair as the liquidated one (wrapped_currency, collateral_currency
), to enable the operator to maintain exposure to the same basket of collateral assets as before the liquidation.
Due to how the Vault client is implemented, using an additional AccountI
d creates two operational burdens:
Describe the solution you'd like
If the Vault's status is Liquidated
or CommittedTheft
but there are no more pending requests of any kind in the system (issue, redeem, replace, refund), meaning all of them have either been executed or cancelled, the VaultId
can no longer be interacted with and is effectively "sandboxed" by the protocol. Due to this, a recover_vault_id(vault_id, active_status)
extrinsic can be added to check the conditions above and then set the Vault status to Active(active_status)
.
In case the Vault was liquidated for undercollateralization and already spent its Bitcoin, theft reports can be recovered from using the Vault Theft Recovery feature.
Describe alternatives you've considered
Instead of ensuring there are no more pending requests associated with the VaultId
, the recover_vault_id(...)
extrinsic could check that the to_be_issued
, issued
, to_be_redeemed
fields in the Vault struct are all zero. However, this introduces a dependency on the internal representation of Vault state, which may change in the future. Relying on finalized requests encapsulates this internal representation. Correctness is still preserved by the proposed solution, because the fields mentioned above can only be changed by new and pending requests.
Integrate Zenlink's DEX module (docs).
No XCM integration for now, see: zenlinkpro/Zenlink-DEX-Module#36 (comment)
Root extrinsics:
Root extrinsics:
Hello dev team. Let's assume a vault gets banned for some duration due to lack of response. During the banned period, due to market fluctuations, the collateralization gets in the Premium Redeem range.
In this particular situation, even if banned, the vault should be allowed to accept redeems up to the level that restores a non Premium collateralization.
Looking at the code of the Redeem pallet, I think that this is not the case at the moment.
line 372 you return a VaultBanned error if the vault is banned
ext::vault_registry::ensure_not_banned::(&vault_id)?;
and only at line 388 you check for premium redeem.
let below_premium_redeem = ext::vault_registry::is_vault_below_premium_threshold::(&vault_id)?;
As it is in the interest of the network that collateralization be maintained. The banned status should not be enforced in this particular situation.
Discord comments:
greg — Yesterday at 10:29 AM
Thanks for digging into this @claudio, I think I agree with your assessment. @sander @dom any additional thoughts?
@claudio I think it might be useful to capture this discussion on GitHub so please also feel free to open a ticket!
Sander — Today at 7:57 AM
There is a trade-off here: on the one hand for the vault it is better to get premium redeems. On the other hand if a vault is banned it is not very likely to actually execute the new premium redeem, so it'd affect the user trying to redeem, who would likely have to wait until the redeem period expired. Still, the small chance that the vault might actually execute the premium redeem may be worth it
Transaction verification is disabled if we have an OngoingFork
with more confirmations + the security parameter than the main chain (see here). This is not reflected in the security module and thus our client-side code is unable to determine if it is valid to execute a payment. We should reflect this possible downtime in the security pallet to also avoid unintended lapses in the expiry periods.
Describe the bug
When I use https://raw.githubusercontent.com/interlay/polkabtc-docs/master/scripts/beta.json start local btc-parachain , the log report Bootnode with peer id 12D3KooWQgh9z6TuD7H5ixMPsa2RR6FoKp35SToCD1c2DNJqyEjU
is on a different chain (our origin: 0x7ef7.... .9fef their: 0xadc6... .866d. and the target is #1211281, which genesis chain beta.json should I use?
To Reproduce
I'm using guide website: https://docs.polkabtc.io/#/collator/guide
We have unfortunately never used the nomination logic on mainnet and it seems we never will. The goal now is to reduce complexity by removing the pallet and associated code:
If we do remove the staking pallet, and instead use just the reward pallet, we will need to migrate the stake back into the Vault struct.
Describe the bug
Running the same setup on 3 machines.
VPS 1. No problem, synced using RocksDb from polkashots.io (after 0.9.12 update)
VPS 2. Problem with RocksDb - giving error: Unsupported BABE DB version: 3. Then I tried letting it sync by itself and succeeded.
VPS 3. Problem with RocksDb - giving error: Unsupported BABE DB version: 3.
To Reproduce
Running as a systemd service:
[Unit]
Description=Kintsugi full node
[Service]
User=kintsugi_user
Group=kintsugi_user
ExecStart=/usr/local/bin/interbtc-parachain
--name=Polkadotters
--base-path=/home/kintsugi_user/kintsugi
--telemetry-url "wss://telemetry.interlay.io/submit 0"
--chain=kintsugi
--execution=wasm
--wasm-execution=compiled
--unsafe-ws-external
--rpc-methods=unsafe
--pruning=archive
--
--rpc-cors=all
--no-telemetry
--execution=wasm
--wasm-execution=compiled
--database=RocksDb
--unsafe-pruning
--pruning=1000
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target
Expected behavior
Errors from the bug description
Version / Commit (e.g. 1.0.0):
version 1.2.0-0f43318-x86_64-linux-gnu
Describe the bug
There's an issue with incremental compilation that prevents building tests multiple times on latest nightly.
To Reproduce
Run integration tests, make a change in the code and rerun.
Additional context
Tracking issue: rust-lang/rust#83291
See orml-oracle. Exchange rates are required for system operation and are now without fee so we should limit the number of times an oracle can submit each block.
It has not been possible to produce blocks consistently on Kintsugi which has messed up our time estimations in several places. In particular, tokens take way longer to vest than intended and the lockup period for staking is also elongated. I'll use this ticket to note how we would go about switching to use the relay chain block height instead (which is consistently 6s).
The orml-vesting
pallet already has a type which allows us to use relay chain block number provider. The only thing to do would be to migrate the VestingSchedules
.
We can add the same associated type to the pallet Config
and import RelaychainBlockNumberProvider
from cumulus. This would also require a storage migration over most items in the pallet.
Let's use the issue pallet as an example, we would first need to change the IssuePeriod
to be 24h over the expected 6s block production interval. Each request is then assigned an opentime
based on the ActiveBlockCount
. This height is increased on_initialize
if the parachain's status is Running
, however since the blocks are produced at irregular intervals we instead need to record the relay chain height minus some rolling variance.
The simplest way to do this is increase an alternate storage item (OfflineBlockCount
) on_initialize
when the parachain is "offline". Checks would then minus this count when checking the "active" height.
Example:
OfflineBlockCount
is 0OfflineBlockCount
(500)OfflineBlockCount = 100
)Changes to the active_block_number
will require migration of existing, completed and cancelled requests as well as Bitcoin block headers since they also store this height.
Currently no accounts are reaped because the ED is zero for all currencies, see this comment.
Describe the bug
I cannot get cargo build
to work. I've tried on two different architectures
To Reproduce
git clone [email protected]:interlay/interbtc.git
git checkout tags/1.7.2
./script/init.sh
cargo build # this fails, see output below
I think I was able to isolate the package, so the following is the output for
cargo check -p interlay-runtime-parachain
rustup show
active toolchain
----------------
nightly-2022-02-08-aarch64-apple-darwin (overridden by '/Users/ricky/src/github.com/interlay/interbtc/rust-toolchain.toml')
rustc 1.60.0-nightly (734368a20 2022-02-07)
->% cargo check -p interlay-runtime-parachain
Compiling interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)
Checking pallet-collator-selection v3.0.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c56)
Checking polkadot-node-network-protocol v0.9.16 (https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d)
Checking refund v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/refund)
Checking nomination v0.5.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/nomination)
Checking redeem v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/redeem)
Checking sc-cli v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
Checking issue v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/issue)
Checking replace v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/replace)
Checking polkadot-overseer-gen v0.9.16 (https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d)
Checking polkadot-node-subsystem-types v0.9.16 (https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d)
Checking polkadot-node-metrics v0.9.16 (https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d)
Checking relay v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/relay)
Checking polkadot-overseer v0.9.16 (https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d)
Checking cumulus-relay-chain-interface v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c56)
Checking cumulus-primitives-parachain-inherent v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c56)
Checking cumulus-pallet-parachain-system v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c56)
error: failed to run custom build command for `interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)`
Caused by:
process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/build/interlay-runtime-parachain-7ef0e4838b0989e1/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: "/Users/ricky/.rustup/toolchains/nightly-2022-02-08-aarch64-apple-darwin/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/Cargo.toml" "--color=always" "--release"
Using rustc version: rustc 1.60.0-nightly (734368a20 2022-02-07)
--- stderr
Compiling secp256k1-sys v0.4.0 (https://github.com/rust-bitcoin/rust-secp256k1?rev=8e61874#8e61874d)
Compiling sp-runtime v4.1.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
The following warnings were emitted during compilation:
warning: In file included from depend/secp256k1/src/secp256k1.c:10:
warning: In file included from depend/secp256k1/src/assumptions.h:12:
warning: In file included from depend/secp256k1/src/util.h:16:
warning: wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_INT_SIZE = sizeof(int);
warning: ^
warning: wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_INT_ALIGN = alignof(int);
warning: ^
warning: wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);
warning: ^
warning: wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);
warning: ^
warning: wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);
warning: ^
warning: wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);
warning: ^
warning: wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);
warning: ^
warning: wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);
warning: ^
warning: wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);
warning: ^
warning: wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);
warning: ^
warning: 1 error generated.
warning: In file included from depend/secp256k1/src/secp256k1.c:13:
warning: depend/secp256k1/src/field_impl.h:266:13: warning: unused function 'rustsecp256k1_v0_4_0_fe_inv_all_var' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_fe_inv_all_var(rustsecp256k1_v0_4_0_fe *r, const rustsecp256k1_v0_4_0_fe *a, size_t len) {
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:15:
warning: depend/secp256k1/src/group_impl.h:191:13: warning: unused function 'rustsecp256k1_v0_4_0_ge_set_infinity' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_ge_set_infinity(rustsecp256k1_v0_4_0_ge *r) {
warning: ^
warning: depend/secp256k1/src/group_impl.h:658:12: warning: unused function 'rustsecp256k1_v0_4_0_gej_has_quad_y_var' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_gej_has_quad_y_var(const rustsecp256k1_v0_4_0_gej *a) {
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:16:
warning: In file included from depend/secp256k1/src/ecmult_impl.h:16:
warning: In file included from depend/secp256k1/src/ecmult.h:13:
warning: depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_0_scratch_create' [-Wunused-function]
warning: static rustsecp256k1_v0_4_0_scratch* rustsecp256k1_v0_4_0_scratch_create(const rustsecp256k1_v0_4_0_callback* error_callback, size_t max_size);
warning: ^
warning: depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_0_scratch_destroy' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_scratch_destroy(const rustsecp256k1_v0_4_0_callback* error_callback, rustsecp256k1_v0_4_0_scratch* scratch);
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:16:
warning: depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_multi_var' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_multi_var(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *ctx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_strauss_batch_single' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_0_pippenger_scratch_size' [-Wunused-function]
warning: static size_t rustsecp256k1_v0_4_0_pippenger_scratch_size(size_t n_points, int bucket_window) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 19 warnings and 1 error generated.
error: failed to run custom build command for `secp256k1-sys v0.4.0 (https://github.com/rust-bitcoin/rust-secp256k1?rev=8e61874#8e61874d)`
Caused by:
process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/release/build/secp256k1-sys-43e947a380630527/build-script-build` (exit status: 1)
--- stdout
TARGET = Some("wasm32-unknown-unknown")
OPT_LEVEL = Some("3")
HOST = Some("aarch64-apple-darwin")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-3f5230ae6475bb4d/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c"
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-3f5230ae6475bb4d/out/depend/secp256k1/src/secp256k1.o" "-c" "depend/secp256k1/src/secp256k1.c"
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:10:
cargo:warning=In file included from depend/secp256k1/src/assumptions.h:12:
cargo:warning=In file included from depend/secp256k1/src/util.h:16:
cargo:warning=wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_INT_SIZE = sizeof(int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_INT_ALIGN = alignof(int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);
cargo:warning= ^
cargo:warning=1 error generated.
exit status: 1
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:13:
cargo:warning=depend/secp256k1/src/field_impl.h:266:13: warning: unused function 'rustsecp256k1_v0_4_0_fe_inv_all_var' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_fe_inv_all_var(rustsecp256k1_v0_4_0_fe *r, const rustsecp256k1_v0_4_0_fe *a, size_t len) {
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:15:
cargo:warning=depend/secp256k1/src/group_impl.h:191:13: warning: unused function 'rustsecp256k1_v0_4_0_ge_set_infinity' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_ge_set_infinity(rustsecp256k1_v0_4_0_ge *r) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/group_impl.h:658:12: warning: unused function 'rustsecp256k1_v0_4_0_gej_has_quad_y_var' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_gej_has_quad_y_var(const rustsecp256k1_v0_4_0_gej *a) {
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:16:
cargo:warning=In file included from depend/secp256k1/src/ecmult_impl.h:16:
cargo:warning=In file included from depend/secp256k1/src/ecmult.h:13:
cargo:warning=depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_0_scratch_create' [-Wunused-function]
cargo:warning=static rustsecp256k1_v0_4_0_scratch* rustsecp256k1_v0_4_0_scratch_create(const rustsecp256k1_v0_4_0_callback* error_callback, size_t max_size);
cargo:warning= ^
cargo:warning=depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_0_scratch_destroy' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_scratch_destroy(const rustsecp256k1_v0_4_0_callback* error_callback, rustsecp256k1_v0_4_0_scratch* scratch);
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:16:
cargo:warning=depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_multi_var' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_multi_var(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *ctx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_strauss_batch_single' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_0_pippenger_scratch_size' [-Wunused-function]
cargo:warning=static size_t rustsecp256k1_v0_4_0_pippenger_scratch_size(size_t n_points, int bucket_window) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=19 warnings and 1 error generated.
exit status: 1
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-3f5230ae6475bb4d/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c" with args "clang" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
error: build failed
ricky[01:27:42][94%] in [~/src/github.com/interlay/interbtc/parachain/runtime/interlay][master]
->% cargo check -p interlay-runtime-parachain
Compiling interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)
error: failed to run custom build command for `interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)`
Caused by:
process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/build/interlay-runtime-parachain-7ef0e4838b0989e1/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: "/Users/ricky/.rustup/toolchains/nightly-2022-02-08-aarch64-apple-darwin/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/Cargo.toml" "--color=always" "--release"
Using rustc version: rustc 1.60.0-nightly (734368a20 2022-02-07)
--- stderr
Compiling secp256k1-sys v0.4.0 (https://github.com/rust-bitcoin/rust-secp256k1?rev=8e61874#8e61874d)
Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
Compiling sp-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
The following warnings were emitted during compilation:
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: In file included from depend/secp256k1/src/secp256k1.c:10:
warning: In file included from depend/secp256k1/src/assumptions.h:12:
warning: In file included from depend/secp256k1/src/util.h:16:
warning: wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_INT_SIZE = sizeof(int);
warning: ^
warning: wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_INT_ALIGN = alignof(int);
warning: ^
warning: wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: 1 error generated.
warning: extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);
warning: ^
warning: wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);
warning: ^
warning: wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);
warning: ^
warning: wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);
warning: ^
warning: wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);
warning: ^
warning: wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);
warning: ^
warning: wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);
warning: ^
warning: wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:13:
warning: depend/secp256k1/src/field_impl.h:266:13: warning: unused function 'rustsecp256k1_v0_4_0_fe_inv_all_var' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_fe_inv_all_var(rustsecp256k1_v0_4_0_fe *r, const rustsecp256k1_v0_4_0_fe *a, size_t len) {
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:15:
warning: depend/secp256k1/src/group_impl.h:191:13: warning: unused function 'rustsecp256k1_v0_4_0_ge_set_infinity' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_ge_set_infinity(rustsecp256k1_v0_4_0_ge *r) {
warning: ^
warning: depend/secp256k1/src/group_impl.h:658:12: warning: unused function 'rustsecp256k1_v0_4_0_gej_has_quad_y_var' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_gej_has_quad_y_var(const rustsecp256k1_v0_4_0_gej *a) {
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:16:
warning: In file included from depend/secp256k1/src/ecmult_impl.h:16:
warning: In file included from depend/secp256k1/src/ecmult.h:13:
warning: depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_0_scratch_create' [-Wunused-function]
warning: static rustsecp256k1_v0_4_0_scratch* rustsecp256k1_v0_4_0_scratch_create(const rustsecp256k1_v0_4_0_callback* error_callback, size_t max_size);
warning: ^
warning: depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_0_scratch_destroy' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_scratch_destroy(const rustsecp256k1_v0_4_0_callback* error_callback, rustsecp256k1_v0_4_0_scratch* scratch);
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:16:
warning: depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_multi_var' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_multi_var(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *ctx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_strauss_batch_single' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_0_pippenger_scratch_size' [-Wunused-function]
warning: static size_t rustsecp256k1_v0_4_0_pippenger_scratch_size(size_t n_points, int bucket_window) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 19 warnings and 1 error generated.
error: failed to run custom build command for `secp256k1-sys v0.4.0 (https://github.com/rust-bitcoin/rust-secp256k1?rev=8e61874#8e61874d)`
Caused by:
process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/release/build/secp256k1-sys-43e947a380630527/build-script-build` (exit status: 1)
--- stdout
TARGET = Some("wasm32-unknown-unknown")
OPT_LEVEL = Some("3")
HOST = Some("aarch64-apple-darwin")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-3f5230ae6475bb4d/out/depend/secp256k1/src/secp256k1.o" "-c" "depend/secp256k1/src/secp256k1.c"
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-3f5230ae6475bb4d/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c"
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:10:
cargo:warning=In file included from depend/secp256k1/src/assumptions.h:12:
cargo:warning=In file included from depend/secp256k1/src/util.h:16:
cargo:warning=wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_INT_SIZE = sizeof(int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_INT_ALIGN = alignof(int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=1 error generated.
cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);
cargo:warning= ^
exit status: 1
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:13:
cargo:warning=depend/secp256k1/src/field_impl.h:266:13: warning: unused function 'rustsecp256k1_v0_4_0_fe_inv_all_var' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_fe_inv_all_var(rustsecp256k1_v0_4_0_fe *r, const rustsecp256k1_v0_4_0_fe *a, size_t len) {
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:15:
cargo:warning=depend/secp256k1/src/group_impl.h:191:13: warning: unused function 'rustsecp256k1_v0_4_0_ge_set_infinity' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_ge_set_infinity(rustsecp256k1_v0_4_0_ge *r) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/group_impl.h:658:12: warning: unused function 'rustsecp256k1_v0_4_0_gej_has_quad_y_var' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_gej_has_quad_y_var(const rustsecp256k1_v0_4_0_gej *a) {
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:16:
cargo:warning=In file included from depend/secp256k1/src/ecmult_impl.h:16:
cargo:warning=In file included from depend/secp256k1/src/ecmult.h:13:
cargo:warning=depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_0_scratch_create' [-Wunused-function]
cargo:warning=static rustsecp256k1_v0_4_0_scratch* rustsecp256k1_v0_4_0_scratch_create(const rustsecp256k1_v0_4_0_callback* error_callback, size_t max_size);
cargo:warning= ^
cargo:warning=depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_0_scratch_destroy' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_scratch_destroy(const rustsecp256k1_v0_4_0_callback* error_callback, rustsecp256k1_v0_4_0_scratch* scratch);
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:16:
cargo:warning=depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_multi_var' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_multi_var(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *ctx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_strauss_batch_single' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_0_pippenger_scratch_size' [-Wunused-function]
cargo:warning=static size_t rustsecp256k1_v0_4_0_pippenger_scratch_size(size_t n_points, int bucket_window) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=19 warnings and 1 error generated.
exit status: 1
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-3f5230ae6475bb4d/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c" with args "clang" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
error: build failed
rustup show
active toolchain
----------------
nightly-2022-02-08-x86_64-apple-darwin (overridden by '/Users/ricky/src/github.com/interlay/interbtc/rust-toolchain.toml')
rustc 1.60.0-nightly (734368a20 2022-02-07)
->% cargo check -p interlay-runtime-parachain
Checking arrayvec v0.7.2
Compiling serde_json v1.0.78
Checking gimli v0.26.1
Compiling num-bigint v0.2.6
Compiling num-rational v0.2.4
Compiling indexmap v1.8.0
Checking libc v0.2.117
Checking object v0.27.1
Checking bitvec v0.20.4
Compiling interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)
Checking getrandom v0.2.4
Checking num_cpus v1.13.1
Checking parking_lot_core v0.8.5
Checking getrandom v0.1.16
Checking time v0.1.44
Checking signal-hook-registry v1.4.0
Checking socket2 v0.4.4
Checking polling v2.2.0
Checking mio v0.7.14
Checking zstd-sys v1.6.2+zstd.1.5.1
Checking hostname v0.3.1
Checking flate2 v1.0.22
Checking if-addrs v0.6.7
Checking net2 v0.2.37
Checking iovec v0.1.4
Checking security-framework-sys v2.6.0
Checking core-foundation v0.9.2
Checking atty v0.2.14
Checking lz4-sys v1.9.2
Checking librocksdb-sys v6.20.3
Checking memmap2 v0.5.2
Checking fs-swap v0.2.6
Checking memmap2 v0.2.3
Checking fs2 v0.4.3
Checking dirs-sys v0.3.6
Checking tempfile v3.3.0
Checking fdlimit v0.2.1
Checking rpassword v5.0.1
Checking futures-executor v0.3.19
Checking threadpool v1.8.1
Checking rand_core v0.6.3
Checking ahash v0.7.6
Checking rand_core v0.5.1
Checking parking_lot v0.11.2
Checking signal-hook v0.3.13
Checking zstd-safe v4.1.3+zstd.1.5.1
Checking chrono v0.4.19
Checking resolv-conf v0.7.0
Checking async-io v1.6.0
Checking bytes v0.4.12
Checking clap v2.34.0
Checking lz4 v1.23.2
Checking mio v0.6.23
Checking rocksdb v0.17.0
Checking directories v4.0.1
Checking tokio v1.16.1
Checking security-framework v2.6.0
Checking thrift v0.15.0
Checking futures v0.3.19
Checking rand_chacha v0.3.1
Checking snow v0.8.0
Checking sp-serializer v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
Checking rand_pcg v0.2.1
Checking rand_chacha v0.2.2
Checking curve25519-dalek v3.2.0
Checking merlin v2.0.1
Checking curve25519-dalek v2.1.3
Checking hashbrown v0.11.2
Checking hashbrown v0.12.0
Checking prometheus v0.13.0
Checking zstd v0.9.2+zstd.1.5.1
Checking async-global-executor v2.0.2
Checking async-process v1.3.0
Checking if-watch v0.2.2
Checking mio-extras v2.0.6
Checking tracing-subscriber v0.2.25
Checking multistream-select v0.10.4
Checking rw-stream-sink v0.2.1
Checking wasm-timer v0.2.5
Checking jsonrpc-core v18.0.0
Checking exit-future v0.2.0
Checking metered-channel v0.9.16 (https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d)
Checking rand v0.8.4
Checking rand v0.7.3
Checking rustls-native-certs v0.5.0
Checking parity-scale-codec v2.3.1
Checking addr2line v0.17.0
Checking async-std v1.10.0
Checking sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
Checking lru v0.6.6
Checking lru v0.7.2
Checking x25519-dalek v1.1.1
Checking sc-utils v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
Checking trie-db v0.23.1
Checking structopt v0.3.26
Checking backtrace v0.3.64
Checking wasmi v0.9.1
error: failed to run custom build command for `interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)`
Caused by:
process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/build/interlay-runtime-parachain-b02fba5cdef123ee/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: "/Users/ricky/.rustup/toolchains/nightly-2022-02-08-x86_64-apple-darwin/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/Cargo.toml" "--color=always" "--release"
Using rustc version: rustc 1.60.0-nightly (734368a20 2022-02-07)
--- stderr
Compiling secp256k1-sys v0.4.0 (https://github.com/rust-bitcoin/rust-secp256k1?rev=8e61874#8e61874d)
Compiling camino v1.0.7
Compiling semver v1.0.4
The following warnings were emitted during compilation:
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 1 error generated.
warning: In file included from depend/secp256k1/src/secp256k1.c:10:
warning: In file included from depend/secp256k1/src/assumptions.h:12:
warning: In file included from depend/secp256k1/src/util.h:16:
warning: wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_INT_SIZE = sizeof(int);
warning: ^
warning: wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_INT_ALIGN = alignof(int);
warning: ^
warning: wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);
warning: ^
warning: wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);
warning: ^
warning: wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);
warning: ^
warning: wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);
warning: ^
warning: wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);
warning: ^
warning: wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);
warning: ^
warning: wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);
warning: ^
warning: wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
warning: extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:13:
warning: depend/secp256k1/src/field_impl.h:266:13: warning: unused function 'rustsecp256k1_v0_4_0_fe_inv_all_var' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_fe_inv_all_var(rustsecp256k1_v0_4_0_fe *r, const rustsecp256k1_v0_4_0_fe *a, size_t len) {
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:15:
warning: depend/secp256k1/src/group_impl.h:191:13: warning: unused function 'rustsecp256k1_v0_4_0_ge_set_infinity' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_ge_set_infinity(rustsecp256k1_v0_4_0_ge *r) {
warning: ^
warning: depend/secp256k1/src/group_impl.h:658:12: warning: unused function 'rustsecp256k1_v0_4_0_gej_has_quad_y_var' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_gej_has_quad_y_var(const rustsecp256k1_v0_4_0_gej *a) {
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:16:
warning: In file included from depend/secp256k1/src/ecmult_impl.h:16:
warning: In file included from depend/secp256k1/src/ecmult.h:13:
warning: depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_0_scratch_create' [-Wunused-function]
warning: static rustsecp256k1_v0_4_0_scratch* rustsecp256k1_v0_4_0_scratch_create(const rustsecp256k1_v0_4_0_callback* error_callback, size_t max_size);
warning: ^
warning: depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_0_scratch_destroy' [-Wunused-function]
warning: static void rustsecp256k1_v0_4_0_scratch_destroy(const rustsecp256k1_v0_4_0_callback* error_callback, rustsecp256k1_v0_4_0_scratch* scratch);
warning: ^
warning: In file included from depend/secp256k1/src/secp256k1.c:16:
warning: depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_multi_var' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_multi_var(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *ctx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_strauss_batch_single' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_0_pippenger_scratch_size' [-Wunused-function]
warning: static size_t rustsecp256k1_v0_4_0_pippenger_scratch_size(size_t n_points, int bucket_window) {
warning: ^
warning: depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single' [-Wunused-function]
warning: static int rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning: ^
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 19 warnings and 1 error generated.
error: failed to run custom build command for `secp256k1-sys v0.4.0 (https://github.com/rust-bitcoin/rust-secp256k1?rev=8e61874#8e61874d)`
Caused by:
process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/release/build/secp256k1-sys-f8c14f22d8d8bc02/build-script-build` (exit status: 1)
--- stdout
TARGET = Some("wasm32-unknown-unknown")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-apple-darwin")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-b5ab6a393d49d7df/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c"
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=1 error generated.
exit status: 1
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-b5ab6a393d49d7df/out/depend/secp256k1/src/secp256k1.o" "-c" "depend/secp256k1/src/secp256k1.c"
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:10:
cargo:warning=In file included from depend/secp256k1/src/assumptions.h:12:
cargo:warning=In file included from depend/secp256k1/src/util.h:16:
cargo:warning=wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_INT_SIZE = sizeof(int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_INT_ALIGN = alignof(int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);
cargo:warning= ^
cargo:warning=wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]
cargo:warning=extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:13:
cargo:warning=depend/secp256k1/src/field_impl.h:266:13: warning: unused function 'rustsecp256k1_v0_4_0_fe_inv_all_var' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_fe_inv_all_var(rustsecp256k1_v0_4_0_fe *r, const rustsecp256k1_v0_4_0_fe *a, size_t len) {
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:15:
cargo:warning=depend/secp256k1/src/group_impl.h:191:13: warning: unused function 'rustsecp256k1_v0_4_0_ge_set_infinity' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_ge_set_infinity(rustsecp256k1_v0_4_0_ge *r) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/group_impl.h:658:12: warning: unused function 'rustsecp256k1_v0_4_0_gej_has_quad_y_var' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_gej_has_quad_y_var(const rustsecp256k1_v0_4_0_gej *a) {
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:16:
cargo:warning=In file included from depend/secp256k1/src/ecmult_impl.h:16:
cargo:warning=In file included from depend/secp256k1/src/ecmult.h:13:
cargo:warning=depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_0_scratch_create' [-Wunused-function]
cargo:warning=static rustsecp256k1_v0_4_0_scratch* rustsecp256k1_v0_4_0_scratch_create(const rustsecp256k1_v0_4_0_callback* error_callback, size_t max_size);
cargo:warning= ^
cargo:warning=depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_0_scratch_destroy' [-Wunused-function]
cargo:warning=static void rustsecp256k1_v0_4_0_scratch_destroy(const rustsecp256k1_v0_4_0_callback* error_callback, rustsecp256k1_v0_4_0_scratch* scratch);
cargo:warning= ^
cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:16:
cargo:warning=depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_multi_var' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_multi_var(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *ctx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_strauss_batch_single' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_0_pippenger_scratch_size' [-Wunused-function]
cargo:warning=static size_t rustsecp256k1_v0_4_0_pippenger_scratch_size(size_t n_points, int bucket_window) {
cargo:warning= ^
cargo:warning=depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single' [-Wunused-function]
cargo:warning=static int rustsecp256k1_v0_4_0_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_0_callback* error_callback, const rustsecp256k1_v0_4_0_ecmult_context *actx, rustsecp256k1_v0_4_0_scratch *scratch, rustsecp256k1_v0_4_0_gej *r, const rustsecp256k1_v0_4_0_scalar *inp_g_sc, rustsecp256k1_v0_4_0_ecmult_multi_callback cb, void *cbdata, size_t n) {
cargo:warning= ^
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=19 warnings and 1 error generated.
exit status: 1
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_BUILD=1" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/build/secp256k1-sys-b5ab6a393d49d7df/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c" with args "clang" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
error: build failed
warning: build failed, waiting for other jobs to finish...
error: build failed
Expected behavior
check or build to pass
Version / Commit (e.g. 1.0.0):
1.7.2
Additional context
Add any other context about the problem here.
We should look into whether it makes sense for us to integrate pallet-bounties
from FRAME.
General ticket for discussions related to taproot support on the interBTC parachain.
As far as I can tell there are no breaking changes that would impact the continued operation of Kintsugi and Interlay. However, I welcome input on ways to utilize the new cryptography - e.g. can Vaults make use of Schnorr signatures for payments?
The primary new address format (introduced in BIP 341) is the P2TR (pay-to-taproot) construction.
The output has the following format:
scriptPubKey: OP_1 <32 bytes>
This is interpreted as witness version 1 due to OP_1
and the 32 byte push is the (tweaked) public key Q
(P
is the untweaked public key).
The spending rules are slightly more complicated...
Key Path
scriptSig: -
witnessStack: sig(Q)
The witness stack contains one entry, the Schnorr signature (BIP 340) for public key Q
over the "common signature message".
-> Verify(pk, m, sig)
Script Path
scriptSig: -
witnessStack: [args ...] S P
The witness stack contains multiple entries, but the penultimate entry is always the script S
followed by the public key P
(which is always the last entry).
-> Q = tweak(P, S) = P + hash(P || S) * G
To support P2TR addresses we need to add a new variant to the BtcAddress
enum. Calculating the "address" from a transaction output is relatively easy, assuming we simply extract Q
as defined above. However, calculating the corresponding "address" from the subsequent spending transaction input alone, at least for key path spending, is simply not possible as the Schnorr construction does not support public key recovery. The only way to do this is to also provide the output that is spent and verify Q
.
Is your feature request related to a problem? Please describe.
Operational errors or implementation bugs may cause Vaults to mistakenly spend or double-spend Bitcoin, causing them to be liquidated for theft. The interbtc protocol does not allow operators to prevent liquidation, even if they are willing to send the Bitcoin back to a registered Vault address.
Describe the solution you'd like
enum VaultStatus {
Active(bool),
Liquidated,
CommittedTheft,
PendingLiquidation(amount, recovery_deadline_block), // <--- new field
}
TheftRecoveryPeriod
, denoting a number of parachain blocks. This is the grace period during which a Vault may report a confirmed Bitcoin transaction that restores stolen funds.recover_theft(vault_id, merkle_proof, raw_tx, active_status)
. See description below.pending_liquidation_elapsed(vault_id)
. See description below.A valid report_vault_theft(...)
extrinsic changes a Vault’s status from Active(...)
to PendingLiquidation(amount, TheftRecoveryPeriod::get())
. The Vault’s collateral is frozen rather than being transferred to the Liquidation Vault, reusing the approach in the slash_for_to_be_redeemed()
method.
Subsequent thefts from the same reported VaultId
increase the amount stored in the PendingLiquidation
status, without extending the recovery deadline. When the recovery period elapses, the vault’s status is set to CommittedTheft
.
Triggering of the PendingLiquidation
deadline can be performed either by off-chain workers, or by storing an on-chain heap data structure which stores VaultId
s and is sorted in ascending order by the recovery_deadline_block
. This is done by sending a pending_liquidation_elapsed(vault_id)
extrinsic.
A valid recover_theft(vault_id, merkle_proof, raw_tx, active_status)
extrinsic decreases the amount stored in the PendingLiquidation
status, and if this amount reaches zero, the Vault's status becomes Active(active_status)
.
Current valid VaultStatus
state transition:
Active(_) ---report_vault_theft---> CommittedTheft
Summarizing the above, the proposed extension to the CommittedTheft
state transition:
Active(_) ---report_vault_theft(amount)---> PendingLiquidation(amount, TheftRecoveryPeriod::get())
PendingLiquidation(_,_) ---pending_liquidation_elapsed---> CommittedTheft
PendingLiquidation(amount, deadline) ---report_vault_theft(stolen_amount)---> PendingLiquidation(amount + stolen_amount, deadline)
PendingLiquidation(amount,_) ---recover_theft(recovered_amount)---> PendingLiquidation(amount - recovered_amount, deadline), if recovered_amount < amount
PendingLiquidation(amount, _) ---recover_theft(recovered_amount, active_status)---> Active(active_status), if recovered_amount >= amount
Additional context
Historic theft reports are stored on-chain, so recovered Active
Vaults are not in danger of being liquidated again for the same Bitcoin transaction.
This feature can be exploited to allow a Vault operator to back more wrapped tokens than the physical Bitcoin it holds. The operator only needs to ensure that they cycle the physical Bitcoin through all the VaultId
s they registered, every TheftRecoveryPeriod
blocks. This can be mitigated by slashing a small amount of collateral when the Vault becomes active again - however this means that Vault Liquidation Recovery would slash the vault if they already spent the Bitcoin after becoming undercollateralized.
Ideal runtime upgrade process:
spec_version
, compile and tag parachainauthorize_upgrade(code_hash)
enact_authorized_upgrade(code)
Related: interlay/interbtc-clients#310
We can also make use of this event to monitor when the upgrade has been applied.
Is your feature request related to a problem? Please describe.
We at Parity are preparing a light client demo for Bitcoin Miami 2022. We want to use a substrate connect light client to move kBTC. It would be nice to do that on the testnet that's live at https://testnet.interlay.io/bridge
With substrate connect, light clients connect to a relay or parachain without syncing with it. All they need is the correct chainspecs. Greg forwarded some chainspecs from Interlay devops:
However these chaispecs don't give us the necessary information on bootNodes
. They are:
127.0.0.1
on para chainspecWithout the correct information on bootNodes
, we can't get the light client to connect to Interlay testnet, because they don't know how to find the chain.
Describe the solution you'd like
We need chainspecs with bootNodes
that are prepared to launch nodes outside of Interlay infrastructure.
Describe alternatives you've considered
Worst case, we will launch our own testnet. But using Interlay infrastructure would be very helpful to us.
Additional context
Here's a screenshot of the burnr wallet in action:
The plan is to have kBTC instead of WND, and interact with the testnet chain over the light client that we will launch from the provided chainspecs.
Currently storage grows linearly which could be a problem in the future. We should retroactively delete storage entries for block headers and completed / expired issue, redeem, replace and refund requests.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version / Commit (e.g. 1.0.0):
The version of the binary you have installed.
Additional context
Add any other context about the problem here.
The vault logs uses prefix 42
instead of whichever chain it is connected to e.g. 2092
for kintsugi.
Tested against: kintsugi main net
, vault is successfully integrated to the network though, so this is logging defect only.
⚠️ Account format used is not for kintsugi
Apr 27 18:29:10 timbo-ubun2 systemd[1]: Started Vault servicing issue and redeem requests for Kintsugi.
Apr 27 18:29:10 timbo-ubun2 vault[7384]: Apr 27 18:29:10.824 INFO vault: Starting Prometheus exporter at http://127.0.0.1:9615
Apr 27 18:29:10 timbo-ubun2 vault[7384]: Apr 27 18:29:10.824 INFO service: Version: 1.9.6
Apr 27 18:29:10 timbo-ubun2 vault[7384]: Apr 27 18:29:10.824 INFO service: AccountId: 5CFUfGrWKPdTJQ5bM4co11cYijfHXnp96PBtYj3K2dk2KSpd
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The goal is to integrate an IBC compatible pallet which will allow the parachain to interoperate with Cosmos
See: https://medium.com/interlay/bitcoin-going-cosmos-8b275b2f51d8
Take this call as an example:
fn collateral_to_wrapped(
amount: BalanceWrapper<Balance>,
currency_id: CurrencyId,
) -> Result<BalanceWrapper<Balance>, DispatchError>;
BalanceWrapper
has the following concrete type:
pub struct BalanceWrapper {
pub amount: u128,
}
For some reason polkadot-js/apps
requires a second CurrencyId
in the amount
which results in the following error:
Context
Before multicollateral, we had a simple oracle off-line detection system. If the oracle was inactive for too long, then we would stop incrementing active_block_count
. Each bitcoin block header stored the active_block_count
when it got relayed. An issue/redeem/replace is only cancellable when active_block_count
increased by a certain number.
Problem
Now that we have multi collateral, we need to account for the possibility that one currency does not get updated, and thus the exchange rate becomes invalid for that specific currency. Operations with other currencies should be able to continue to function.
Solutions
active_block_count
per currency. This requires additional iteration in System
, to increment the value each block for all currencies. Note that we iterate over the currencies in the oracle anyway, so the big O complexity does not change. The client cancellation logic gets slightly complicated, but this should be manageable. We currently store active_block_count
in bitcoin block headers, so this struct would grow some, but we might be able to store just the normal parachain height - I think we only use it to require a certain number of parachain confirmations before we accept bitcoin blocks.I think I'm leaning to the last solution. The main downside is that it is the most complex solution, and thus has highest risk of bugs. But I feel it's the most correct solution.
RPC methods that use vault_id fail on call:
ℹ️ When connecting to the API they are marked as undecorated, so perhaps they are not finished/designed for external use?
vaultRegistry.getCollateralizationFromVault()
⚠️ Call fails with following error:
-32602: Invalid params: unknown variant `token`, expected `Token`.
This affects all the RPC calls here that take vault_id
type parameters
Most of the pallets currently declare StorageVersion
in types.rs
but we can switch to the interface defined by Substrate, for example:
/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(3);
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::storage_version(STORAGE_VERSION)]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);
We can use this for local (and testnet) parachain testing with sudo and a permissive vesting origin.
Is your feature request related to a problem? Please describe.
If the merkle proof and transaction is valid, why do we limit who can cancel a redeem request?
Describe the solution you'd like
Remove the requirement on cancel_redeem
.
I think we should also consider storing the used bitcoin network (i.e. mainnet/testnet/regtest) in the parachain via the chainspec. That way we can provide clearer error messages when inevitably someone connects to the wrong bitcoin node
Originally posted by @sander2 in interlay/interbtc-clients#224 (review)
We can allow Vaults to pool their collateral in a single MultiSig account and share responsibility for signing BTC transactions - similar to how other bridges use threshold signatures to secure funds.
Add a new VaultMultiSig
pallet which is similar in architecture to pallet-multisig
in FRAME. We can support the following functionality:
multi_account_id
Single-key issue addresses are generated as BtcAddress::P2WPKHv0(public_key.to_hash())
where:
secure_id = sha256(issue.requester + nonce + parent_hash)
public_key = vault_public_key * secure_id
To adopt MultiSig payments we should return BtcAddress::P2SH
using the following construction for e.g. 2/3:
<OP_2> <A pubkey> <B pubkey> <C pubkey> <OP_3> <OP_CHECKMULTISIG>
Each pubkey
should also be derived using the OKD scheme.
Taken from this guide.
# start bitcoind (ignore fees)
bitcoind -regtest -server -minrelaytxfee=0
bitcoin-cli -regtest createwallet default
# dump required addresses, public and private keys
address1=$(bitcoin-cli -regtest getnewaddress)
address2=$(bitcoin-cli -regtest getnewaddress)
pubkey1=$(bitcoin-cli -regtest -named getaddressinfo address=$address1 | jq -r '.pubkey')
pubkey2=$(bitcoin-cli -regtest -named getaddressinfo address=$address2 | jq -r '.pubkey')
privkey1=$(bitcoin-cli -regtest -named dumpprivkey address=$address1)
privkey2=$(bitcoin-cli -regtest -named dumpprivkey address=$address2)
# generate 2/2 multisig
multisig_address=$(bitcoin-cli -regtest -named createmultisig nrequired=2 keys='''["'$pubkey1'","'$pubkey2'"]''' | jq -r '.address')
multisig_redeem_script=$(bitcoin-cli -regtest -named createmultisig nrequired=2 keys='''["'$pubkey1'","'$pubkey2'"]''' | jq -r '.redeemScript')
# fund the multisig and import
bitcoin-cli -regtest generatetoaddress 101 $multisig_address
bitcoin-cli -regtest -named importaddress address=$multisig_address
# take the last unspent and populate vars
utxo_txid=$(bitcoin-cli -regtest -named listunspent addresses='''["'$multisig_address'"]''' | jq -r 'last | .txid')
utxo_vout=0
utxo=$(bitcoin-cli -regtest -named gettransaction txid=$utxo_txid verbose=true)
utxo_spk=$(echo $utxo | jq -r '.decoded.vout['$utxo_vout'].scriptPubKey.hex')
utxo_value=$(echo $utxo | jq -r '.decoded.vout['$utxo_vout'].value')
recipient=$(bitcoin-cli -regtest getrawchangeaddress)
# spend the entire amount to the change address
rawtxhex=$(bitcoin-cli -regtest -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "'$recipient'": "'$utxo_value'" }''')
# signed by $privkey1
signedtxhex1=$(bitcoin-cli -regtest -named signrawtransactionwithkey hexstring=$rawtxhex prevtxs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout', "scriptPubKey": "'$utxo_spk'", "redeemScript": "'$multisig_redeem_script'" } ]''' privkeys='["'$privkey1'"]' | jq -r '.hex')
# signed by $privkey2
signedtxhex2=$(bitcoin-cli -regtest -named signrawtransactionwithkey hexstring=$signedtxhex1 prevtxs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout', "scriptPubKey": "'$utxo_spk'", "redeemScript": "'$multisig_redeem_script'" } ]''' privkeys='["'$privkey2'"]' | jq -r '.hex')
# send transaction
multisig_txid=$(bitcoin-cli -regtest -named sendrawtransaction hexstring=$signedtxhex2 maxfeerate=0)
bitcoin-cli -regtest -named gettransaction txid=$multisig_txid verbose=true
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version / Commit (e.g. 1.0.0):
The version of the binary you have installed.
Additional context
Add any other context about the problem here.
balance_at
total_supply
compute_reward
compute_reward
We should combine the Reward
and Staking
RPCs to simplify downstream usage.
RawValues
when outdatedbegin_block
MissingExchangeRate
- can be tx feesWe need to improve our weights and fees, as well as how we handle storage bloat. We need to do this to prevent DoS attacks. This includes:
#[pallet::without_storage_info]
. See my stackoverflow question
MaxEncodedLen
#[pallet::whitelist_storage]
to storage items that are read every blockAll extrinsics which use the BTC-Relay require "raw" (Vec<u8>
) values which are parsed at runtime. In the past this has led to a range of unhandled panics we have caught during fuzzing. Once decoded these types are then re-encoded for verification which is an unnecessary overhead. We should instead use the concrete types which should also allow us to better determine the weights of the extrinsics.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.