-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It got stuck while sending lots of transactions #180
Comments
Can you try the 0.13 draft release and see if that helps? |
All right, I'll give a try asap. |
If that doesn’t work, try https://github.com/DemiMarie/substrate-subxt/tree/0de3bd988a24d0f50356570385c40b3e9188098b |
The version you provide isn't compatible with substrate 2.0.0, got this error
|
It still got the same situation, maybe I should put some of my code here. pub async fn issue_voucher_call(signer: &str, url: &str, voucher: &CC2Voucher, who: &AccountId32) -> Result<String, Box<dyn Error>> {
let client: Client<BifrostRuntime> = subxt::ClientBuilder::new().set_url(url).build().await?;
let signer = Pair::from_string(signer, None).map_err(|_| BifrostxtError::WrongSudoSeed)?;
let mut signer = PairSigner::<BifrostRuntime, Pair>::new(signer);
let nonce = client.account(&signer.signer().public().into(), None).await?.nonce;
let amount = {
let amount_f64 = voucher.bnc.parse::<f64>()?;
(amount_f64 * 10f64.powi(12i32)) as u128
};
let args = IssueVoucherCall {
dest: &who.clone().into(),
amount,
};
let proposal = client.encode(args)?;
let call = create_sudo_call(&proposal);
let extrinsic = client.create_signed(call, &signer).await?;
let mut decoder = client.events_decoder::<IssueVoucherCall<BifrostRuntime>>();
decoder.with_voucher();
let voucher_events = client.submit_and_watch_extrinsic(extrinsic, decoder).await?;
let event = voucher_events.find_event::<IssuedVoucherEvent::<BifrostRuntime>>()?.ok_or("No Event found or decoded.")?;
let block_hash = voucher_events.block;
Ok(block_hash.to_string())
} And I'll do some more testing to find out which line it will get stuck at. |
I found that it got stuck at where it called |
I found it might be my problem. I have a couple of nodes running on cloud. Somehow, at some point, these nodes were producing blocks, but halted on finalizing blocks. So, there's a big gap between the finalized block and the latest produced block, and the gap became bigger and bigger. If I push transactions to these nodes, it always got stuck. Now, 0.13 works for me. I'm going to close this issue. |
Glad you got it sorted! :) |
Hi,
I'm using the master right now due to 0.12 lacks of supporting substrate 2.0.0.
While I tried to send lots of transactions to cloud nodes, it would get stuck after some transactions were sent, no more transaction would be sent, and there's no error log prompted.
Both on cargo run/release, cloud nodes are upgraded to substrate 2.0.0.
It kind of weird.
By the way, it works good while RC6 with subxt0.12.
The text was updated successfully, but these errors were encountered: