Skip to content

Commit

Permalink
Merge pull request #474 from sander2/chore/upgrade-parachain
Browse files Browse the repository at this point in the history
chore: upgrade to latest parachain
  • Loading branch information
sander2 authored Jun 1, 2023
2 parents 17f4cd8 + f4decf4 commit e6b5f20
Show file tree
Hide file tree
Showing 16 changed files with 1,849 additions and 1,971 deletions.
3,332 changes: 1,601 additions & 1,731 deletions Cargo.lock

Large diffs are not rendered by default.

434 changes: 218 additions & 216 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bitcoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ serde = "1.0.139"
serde_json = "1.0.82"

# Substrate dependencies
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }

[dev-dependencies]
mockall = "0.8.1"
Expand Down
2 changes: 1 addition & 1 deletion runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ clap = { version = "4.0.17", features = ["derive"]}
hex = "0.4.3"
tokio = { version = "1.8", features = ["rt-multi-thread", "macros", "time"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
thiserror = "1.0.0"
log = "0.4.0"
env_logger = "0.7.1"
Expand Down
18 changes: 9 additions & 9 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ prometheus = { version = "0.12.0", features = ["process"] }
lazy_static = "1.4.0"

# Substrate dependencies
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
# needs to agree with subxt's version
sp-keyring = { version = "7.0.0", default_features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }

# Subxt dependencies
subxt = "0.25.0"
Expand All @@ -50,28 +50,28 @@ bitcoin = { path = "../bitcoin" }

# Dependencies for the testing utils for integration tests
tempdir = { version = "0.3.7", optional = true }
interbtc = { package = "interbtc-parachain", git = "https://github.com/interlay/interbtc", rev = "f0772a08db719ab8841f6fd23dfef1f227d3b348", optional = true }
interbtc-runtime = { package = "testnet-kintsugi-runtime-parachain", git = "https://github.com/interlay/interbtc", rev = "f0772a08db719ab8841f6fd23dfef1f227d3b348", optional = true }
interbtc = { package = "interbtc-parachain", git = "https://github.com/interlay/interbtc", rev = "7a2f5ee35d93feb0529a308fe87b42674bfca8e9", optional = true }
interbtc-runtime = { package = "testnet-kintsugi-runtime-parachain", git = "https://github.com/interlay/interbtc", rev = "7a2f5ee35d93feb0529a308fe87b42674bfca8e9", optional = true }
rand = { version = "0.7", optional = true }

[dependencies.primitives]
git = "https://github.com/interlay/interbtc"
rev = "f0772a08db719ab8841f6fd23dfef1f227d3b348"
rev = "7a2f5ee35d93feb0529a308fe87b42674bfca8e9"
package = "interbtc-primitives"

[dependencies.module-bitcoin]
git = "https://github.com/interlay/interbtc"
rev = "f0772a08db719ab8841f6fd23dfef1f227d3b348"
rev = "7a2f5ee35d93feb0529a308fe87b42674bfca8e9"
package = "bitcoin"

[dependencies.module-btc-relay]
git = "https://github.com/interlay/interbtc"
rev = "f0772a08db719ab8841f6fd23dfef1f227d3b348"
rev = "7a2f5ee35d93feb0529a308fe87b42674bfca8e9"
package = "btc-relay"

[dependencies.module-oracle-rpc-runtime-api]
git = "https://github.com/interlay/interbtc"
rev = "f0772a08db719ab8841f6fd23dfef1f227d3b348"
rev = "7a2f5ee35d93feb0529a308fe87b42674bfca8e9"
package = "oracle-rpc-runtime-api"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions runtime/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ log = "0.4.13"
serde_json = "1.0.61"
thiserror = "1.0.23"

sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
# needs to agree with subxt's version
sp-keyring = { version = "7.0.0" }

Expand Down
3 changes: 1 addition & 2 deletions runtime/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ use jsonrpsee_core::{
client::{ClientBuilder, ReceivedMessage, TransportReceiverT, TransportSenderT},
};

use sc_network_common::config::TransportConfig;
pub use sc_service::{
config::{DatabaseSource, KeystoreConfig, WasmExecutionMethod, WasmtimeInstantiationStrategy},
Error as ServiceError,
};
use sc_service::{
config::{NetworkConfiguration, TelemetryEndpoints},
config::{NetworkConfiguration, TelemetryEndpoints, TransportConfig},
ChainSpec, Configuration, RpcHandlers, TaskManager,
};

Expand Down
Binary file modified runtime/metadata-parachain-interlay-testnet.scale
Binary file not shown.
Binary file modified runtime/metadata-parachain-interlay.scale
Binary file not shown.
Binary file modified runtime/metadata-parachain-kintsugi-testnet.scale
Binary file not shown.
Binary file modified runtime/metadata-parachain-kintsugi.scale
Binary file not shown.
12 changes: 8 additions & 4 deletions runtime/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1237,10 +1237,14 @@ pub trait IssuePallet {
#[async_trait]
impl IssuePallet for InterBtcParachain {
async fn request_issue(&self, amount: u128, vault_id: &VaultId) -> Result<RequestIssueEvent, Error> {
self.with_unique_signer(metadata::tx().issue().request_issue(amount, vault_id.clone()))
.await?
.find_first::<RequestIssueEvent>()?
.ok_or(Error::RequestIssueIDNotFound)
self.with_unique_signer(
metadata::tx()
.issue()
.request_issue(amount, vault_id.clone(), self.native_currency_id),
)
.await?
.find_first::<RequestIssueEvent>()?
.ok_or(Error::RequestIssueIDNotFound)
}

async fn execute_issue(&self, issue_id: H256, merkle_proof: &[u8], raw_tx: &[u8]) -> Result<(), Error> {
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub type BtcAddress = module_btc_relay::BtcAddress;

pub type FixedU128 = sp_arithmetic::FixedU128;

#[allow(non_camel_case_types)]
pub(crate) enum StorageMapHasher {
Blake2_128,
Twox_64,
Expand Down Expand Up @@ -135,7 +136,7 @@ mod metadata_aliases {

pub use metadata::runtime_types::security::pallet::Call as SecurityCall;

pub use metadata::runtime_types::sp_core::bounded::bounded_vec::BoundedVec;
pub use metadata::runtime_types::bounded_collections::bounded_vec::BoundedVec;
}

pub struct RawBlockHeader(pub Vec<u8>);
Expand Down
2 changes: 1 addition & 1 deletion vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ runtime = { path = "../runtime", features = ["testing-utils"] }
bitcoin = { path = "../bitcoin", features = ["cli", "regtest-manual-mining"] }

# Substrate dependencies
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
3 changes: 2 additions & 1 deletion vault/src/cancellation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ mod tests {
use jsonrpc_core::serde_json::{Map, Value};
use runtime::{
AccountId, AssetMetadata, BtcAddress, BtcPublicKey, CurrencyId, ErrorCode, InterBtcIssueRequest,
InterBtcReplaceRequest, IssueRequestStatus, RequestIssueEvent, StatusCode, Token, VaultId, DOT, IBTC,
InterBtcReplaceRequest, IssueRequestStatus, RequestIssueEvent, StatusCode, Token, VaultId, DOT, IBTC, INTR,
};
use std::collections::BTreeSet;

Expand Down Expand Up @@ -398,6 +398,7 @@ mod tests {
btc_height: Default::default(),
fee: Default::default(),
griefing_collateral: Default::default(),
griefing_currency: Token(INTR),
opentime: Default::default(),
period: Default::default(),
requester: AccountId::new([1u8; 32]),
Expand Down
1 change: 1 addition & 0 deletions vault/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ mod tests {
btc_height: Default::default(),
fee: Default::default(),
griefing_collateral: Default::default(),
griefing_currency: Token(INTR),
opentime: Default::default(),
period: Default::default(),
requester: AccountId::new([1u8; 32]),
Expand Down

0 comments on commit e6b5f20

Please sign in to comment.