Skip to content

Commit

Permalink
Merge pull request #5258 from stacks-network/chore/master-develop-093024
Browse files Browse the repository at this point in the history
Chore: Merge master -> develop
  • Loading branch information
kantai authored Sep 30, 2024
2 parents 9c90c5c + 5327a59 commit 5fd7307
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 21 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/signer_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Signer Bug
about: Create a report to help us improve the signer
title: "[SIGNER BUG]"
labels: signer
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Steps To Reproduce**
Please provide detailed instructions (e.g. command line invocation with parameters) to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
- OS: [e.g. Ubuntu / Debian]
- Rust version
- Version of the appropriate binary / software packages
- Signer public key
- Relevant log messages
- Tx ID of any transaction you were trying to execute
- Tx ID of `aggregation-commit-indexed` call in registered cycle (if applicable)


**Additional context**
Please include any relevant stack traces, error messages and logs.


2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/testnet-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Testnet Bug
about: Use this template to submit Stacks 2.0 testnet bugs
title: "[TESTNET BUG]"
labels: bug, testnet
assignees: 'timstackblock'
assignees: ''

---

Expand Down
2 changes: 1 addition & 1 deletion stacks-common/src/address/c32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ fn c32_check_decode(check_data_unsanitized: &str) -> Result<(u8, Vec<u8>), Error
}

pub fn c32_address_decode(c32_address_str: &str) -> Result<(u8, Vec<u8>), Error> {
if c32_address_str.len() <= 5 {
if !c32_address_str.is_ascii() || c32_address_str.len() <= 5 {
Err(Error::InvalidCrockford32)
} else {
c32_check_decode(&c32_address_str[1..])
Expand Down
2 changes: 1 addition & 1 deletion stacks-common/src/address/c32_old.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ fn c32_check_decode(check_data_unsanitized: &str) -> Result<(u8, Vec<u8>), Error
}

pub fn c32_address_decode(c32_address_str: &str) -> Result<(u8, Vec<u8>), Error> {
if c32_address_str.len() <= 5 {
if !c32_address_str.is_ascii() || c32_address_str.len() <= 5 {
Err(Error::InvalidCrockford32)
} else {
c32_check_decode(&c32_address_str[1..])
Expand Down
8 changes: 4 additions & 4 deletions stackslib/src/net/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2426,11 +2426,11 @@ impl ConversationP2P {
Ok(num_recved) => {
total_recved += num_recved;
if num_recved > 0 {
test_debug!("{:?}: received {} bytes", self, num_recved);
debug!("{:?}: received {} bytes", self, num_recved);
self.stats.last_recv_time = get_epoch_time_secs();
self.stats.bytes_rx += num_recved as u64;
} else {
test_debug!("{:?}: received {} bytes, stopping", self, num_recved);
debug!("{:?}: received {} bytes, stopping", self, num_recved);
break;
}
}
Expand All @@ -2447,7 +2447,7 @@ impl ConversationP2P {
}
}
}
test_debug!("{:?}: received {} bytes", self, total_recved);
debug!("{:?}: received {} bytes", self, total_recved);
Ok(total_recved)
}

Expand Down Expand Up @@ -2475,7 +2475,7 @@ impl ConversationP2P {
}
}
}
test_debug!("{:?}: sent {} bytes", self, total_sent);
debug!("{:?}: sent {} bytes", self, total_sent);
Ok(total_sent)
}

Expand Down
7 changes: 3 additions & 4 deletions stackslib/src/net/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,9 @@ impl<P: ProtocolFamily> NetworkReplyHandle<P> {
None
} else {
// still have data to send, or we will send more.
test_debug!(
debug!(
"Still have data to send, drop_on_success = {}, ret = {}",
drop_on_success,
ret
drop_on_success, ret
);
Some(fd)
}
Expand Down Expand Up @@ -1047,7 +1046,7 @@ impl<P: ProtocolFamily> ConnectionInbox<P> {
total_read += num_read;

if num_read > 0 || total_read > 0 {
test_debug!("read {} bytes; {} total", num_read, total_read);
debug!("read {} bytes; {} total", num_read, total_read);
}

if num_read > 0 {
Expand Down
19 changes: 10 additions & 9 deletions stackslib/src/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,23 +1041,24 @@ pub struct NackData {
pub error_code: u32,
}
pub mod NackErrorCodes {
/// A handshake is required before the protocol can proceed
/// A handshake has not yet been completed with the requester
/// and it is required before the protocol can proceed
pub const HandshakeRequired: u32 = 1;
/// The protocol could not find a required burnchain block
/// The request depends on a burnchain block that this peer does not recognize
pub const NoSuchBurnchainBlock: u32 = 2;
/// The requester is sending too many requests
/// The remote peer has exceeded local per-peer bandwidth limits
pub const Throttled: u32 = 3;
/// The state the requester referenced referrs to a PoX fork we do not recognize
/// The request depends on a PoX fork that this peer does not recognize as canonical
pub const InvalidPoxFork: u32 = 4;
/// The message is inappropriate for this step of the protocol
/// The message received is not appropriate for the ongoing step in the protocol being executed
pub const InvalidMessage: u32 = 5;
/// The referenced StackerDB does not exist on this node
/// The StackerDB requested is not known or configured on this node
pub const NoSuchDB: u32 = 6;
/// The referenced StackerDB chunk is out-of-date with respect to our replica
/// The StackerDB chunk request referred to an older copy of the chunk than this node has
pub const StaleVersion: u32 = 7;
/// The referenced StackerDB state view is out-of-date with respect to our replica
/// The remote peer's view of the burnchain is too out-of-date for the protocol to continue
pub const StaleView: u32 = 8;
/// The referenced StackerDB chunk is stale locally relative to the requested version
/// The StackerDB chunk request referred to a newer copy of the chunk that this node has
pub const FutureVersion: u32 = 9;
/// The referenced StackerDB state view is stale locally relative to the requested version
pub const FutureView: u32 = 10;
Expand Down
3 changes: 2 additions & 1 deletion stackslib/src/net/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,8 @@ impl Relayer {
"Handle incoming Nakamoto block {}/{} obtained via {}",
&block.header.consensus_hash,
&block.header.block_hash(),
&obtained_method,
&obtained_method;
"block_id" => %block.header.block_id(),
);

if fault_injection::ignore_block(block.header.chain_length, &burnchain.working_dir) {
Expand Down

0 comments on commit 5fd7307

Please sign in to comment.