Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zombienet-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
zombienet-sdk
Commits
2b948fb1
Unverified
Commit
2b948fb1
authored
1 year ago
by
PG Herveou
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Bump subxt (#154)
parent
31c5de4d
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.toml
+9
-9
9 additions, 9 deletions
Cargo.toml
crates/examples/Cargo.toml
+1
-1
1 addition, 1 deletion
crates/examples/Cargo.toml
crates/orchestrator/src/network/parachain.rs
+19
-4
19 additions, 4 deletions
crates/orchestrator/src/network/parachain.rs
with
29 additions
and
14 deletions
Cargo.toml
+
9
−
9
View file @
2b948fb1
...
...
@@ -15,7 +15,7 @@ members = [
[workspace.package]
authors
=
[
"Parity Technologies <admin@parity.io>"
]
edition
=
"2021"
version
=
"0.1.0-alpha.
0
"
version
=
"0.1.0-alpha.
1
"
rust-version
=
"1.70.0"
license
=
"Apache-2.0 OR GPL-3.0"
repository
=
"https://github.com/paritytech/zombienet-sdk"
...
...
@@ -44,8 +44,8 @@ sha2 = { version = "0.10.2", default-features = false }
hex
=
"0.4"
sp-core
=
"22.0.0"
libp2p
=
{
version
=
"0.52"
}
subxt
=
"0.3
2
.0"
subxt-signer
=
{
version
=
"0.3
2
.0"
,
features
=
[
"subxt"
]
}
subxt
=
"0.3
3
.0"
subxt-signer
=
{
version
=
"0.3
3
.0"
,
features
=
[
"subxt"
]
}
tracing
=
"0.1.35"
pjs-rs
=
"0.1.2"
axum
=
{
version
=
"0.7"
}
...
...
@@ -55,9 +55,9 @@ tower-http = { version = "0.5" }
tracing-subscriber
=
{
version
=
"0.3"
}
# Zombienet workspace crates:
support
=
{
package
=
"zombienet-support"
,
version
=
"0.1.0-alpha.
0
"
,
path
=
"crates/support"
}
configuration
=
{
package
=
"zombienet-configuration"
,
version
=
"0.1.0-alpha.
0
"
,
path
=
"crates/configuration"
}
orchestrator
=
{
package
=
"zombienet-orchestrator"
,
version
=
"0.1.0-alpha.
0
"
,
path
=
"crates/orchestrator"
}
provider
=
{
package
=
"zombienet-provider"
,
version
=
"0.1.0-alpha.
0
"
,
path
=
"crates/provider"
}
prom-metrics-parser
=
{
package
=
"zombienet-prom-metrics-parser"
,
version
=
"0.1.0-alpha.
0
"
,
path
=
"crates/prom-metrics-parser"
}
sdk
=
{
package
=
"
zombienet-sdk
"
,
version
=
"0.1.0-alpha.
0
"
,
path
=
"crates/sdk"
}
support
=
{
package
=
"zombienet-support"
,
version
=
"0.1.0-alpha.
1
"
,
path
=
"crates/support"
}
configuration
=
{
package
=
"zombienet-configuration"
,
version
=
"0.1.0-alpha.
1
"
,
path
=
"crates/configuration"
}
orchestrator
=
{
package
=
"zombienet-orchestrator"
,
version
=
"0.1.0-alpha.
1
"
,
path
=
"crates/orchestrator"
}
provider
=
{
package
=
"zombienet-provider"
,
version
=
"0.1.0-alpha.
1
"
,
path
=
"crates/provider"
}
prom-metrics-parser
=
{
package
=
"zombienet-prom-metrics-parser"
,
version
=
"0.1.0-alpha.
1
"
,
path
=
"crates/prom-metrics-parser"
}
zombienet-sdk
=
{
version
=
"0.1.0-alpha.
1
"
,
path
=
"crates/sdk"
}
This diff is collapsed.
Click to expand it.
crates/examples/Cargo.toml
+
1
−
1
View file @
2b948fb1
...
...
@@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
zombienet-sdk
=
{
path
=
"../sdk"
}
zombienet-sdk
=
{
workspace
=
true
}
tokio
=
{
workspace
=
true
}
futures
=
{
workspace
=
true
}
subxt
=
{
workspace
=
true
}
...
...
This diff is collapsed.
Click to expand it.
crates/orchestrator/src/network/parachain.rs
+
19
−
4
View file @
2b948fb1
...
...
@@ -4,7 +4,7 @@ use std::{
};
use
provider
::
types
::
TransferedFile
;
use
subxt
::{
dynamic
::
Value
,
OnlineClient
,
SubstrateConfig
};
use
subxt
::{
dynamic
::
Value
,
tx
::
TxStatus
,
OnlineClient
,
SubstrateConfig
};
use
subxt_signer
::{
sr25519
::
Keypair
,
SecretUri
};
use
support
::
fs
::
FileSystem
;
use
tracing
::
info
;
...
...
@@ -138,13 +138,28 @@ impl Parachain {
// TODO: uncomment below and fix the sign and submit (and follow afterwards until
// finalized block) to register the parachain
let
result
=
api
let
mut
tx
=
api
.tx
()
.sign_and_submit_then_watch_default
(
&
sudo_call
,
&
sudo
)
.await
?
;
let
result
=
result
.wait_for_in_block
()
.await
?
;
info!
(
"In block: {:#?}"
,
result
.block_hash
());
// Below we use the low level API to replicate the `wait_for_in_block` behaviour
// which was removed in subxt 0.33.0. See https://github.com/paritytech/subxt/pull/1237.
while
let
Some
(
status
)
=
tx
.next
()
.await
{
match
status
?
{
TxStatus
::
InBestBlock
(
tx_in_block
)
|
TxStatus
::
InFinalizedBlock
(
tx_in_block
)
=>
{
let
result
=
tx_in_block
.wait_for_success
()
.await
?
;
info!
(
"In block: {:#?}"
,
result
.block_hash
());
},
TxStatus
::
Error
{
message
}
|
TxStatus
::
Invalid
{
message
}
|
TxStatus
::
Dropped
{
message
}
=>
{
return
Err
(
anyhow
::
format_err!
(
"Error submitting tx: {message}"
));
},
_
=>
continue
,
}
}
Ok
(())
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment