Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Banning Peer on ckb_vm::Error::External Triggered by Ctrl-C Signal #4701

Open
eval-exec opened this issue Oct 29, 2024 · 0 comments · May be fixed by #4702
Open

Avoid Banning Peer on ckb_vm::Error::External Triggered by Ctrl-C Signal #4701

eval-exec opened this issue Oct 29, 2024 · 0 comments · May be fixed by #4702
Labels
t:bug Type: This doesn't seem right.

Comments

@eval-exec
Copy link
Collaborator

eval-exec commented Oct 29, 2024

Bug Report

2024-10-29 02:02:47.915 +00:00 GlobalRt-20 INFO ckb_tx_pool::process  after_process Byte32(0x58aff34dd6bbac94032aee41ab59fa6232c4139ea135ffab7f7ed014eb89ac12) SessionId(588) remote reject: Verification failed Script(TransactionScriptError { source: Inputs[0].Type, cause: VM Internal Error: External("stopped") }) 
2024-10-29 02:02:47.915 +00:00 GlobalRt-20 INFO ckb_network::network  Ban peer "/ip4/54.168.12.92/tcp/30967/p2p/QmYx1orST2KkEbwmwGEkpSvcJjVenhKEphXhci85zcg6VX" for 259200 seconds, reason: reject Verification failed Script(TransactionScriptError { source: Inputs[0].Type, cause: VM Internal Error: External("stopped") })

ckb/script/src/verify.rs

Lines 1200 to 1204 in 8cb49e4

ChunkCommand::Stop => {
let exit = Err(ckb_vm::Error::External("stopped".into()));
let _ = finish_tx.send(exit);
return;
}

When chunk_run_with_signal receives ChunkCommand::Stop, it raises ckb_vm::Error::External, leading NetworkState to ban the peer. Since this error can result from a Ctrl-C signal, banning the peer is unnecessary.

Expected Behavior

Handle ckb_vm::Error::External triggered by signals (e.g., Ctrl-C) without banning the peer.

Environment

  • CKB version: 0.119.0
  • Chain: testnet
  • Operating system: [Ubuntu 20.04, macOS 11.4, Windows 10]
  • Arch: x64 [the output of uname -a]
  • Installation: GitHub Release
@eval-exec eval-exec added the t:bug Type: This doesn't seem right. label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Type: This doesn't seem right.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant