Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kantai committed Apr 9, 2021
2 parents 35b5f6b + f9e91d9 commit 634e36d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and this project adheres to the versioning scheme outlined in the [README.md](README.md).

## [Unreleased]

Expand Down Expand Up @@ -37,6 +37,12 @@ compatible with prior chainstate directories.
- Fixed faulty logic in the mempool that was still treating the transaction fee
as a fee rate, which prevented replace-by-fee from working as expected.

## [2.0.10.0.1]

This is a low-priority hotfix release to address a bug in the deserialization logic. The
chainstate directory of 2.0.10.0.1 is compatible with 2.0.10. This release also begins the
usage of the versioning scheme outlined in the [README.md](README.md).

## [2.0.10]

This is a low-priority hotfix release to address two bugs in the block downloader. The
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ according to the following rubric:
- **Medium Priority**. Any fix for an issue that could cause miners to waste funds
- **Low Priority**. Any fix for an issue that could deny service to individual nodes

## Versioning

This repository uses a 5 part version number.

```
X.Y.Z.A.n
X = 2 and does not change in practice unless there’s another Stacks 2.0 type event
Y increments on consensus-breaking changes
Z increments on non-consensus-breaking changes that require a fresh chainstate (akin to semantic MAJOR)
A increments on non-consensus-breaking changes that do not require a fresh chainstate, but introduce new features (akin to semantic MINOR)
n increments on patches and hot-fixes (akin to semantic PATCH)
```

For example, a node operator running version `2.0.10.0.0` would not need to wipe and refresh their chainstate
to upgrade to `2.0.10.1.0` or `2.0.10.0.1`. However, upgrading to `2.0.11.0.0` would require a new chainstate.

## Roadmap

- [x] [SIP 001: Burn Election](https://github.com/stacksgov/sips/blob/main/sips/sip-001/sip-001-burn-election.md)
Expand Down
6 changes: 2 additions & 4 deletions src/vm/types/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ impl Value {

r.read_exact(&mut data[..])?;

// can safely unwrap, because the buffer length was _already_ checked.
Ok(Value::buff_from(data).unwrap())
Value::buff_from(data).map_err(|_| "Bad buffer".into())
}
TypePrefix::BoolTrue => {
check_match!(expected_type, TypeSignature::BoolType)?;
Expand Down Expand Up @@ -517,8 +516,7 @@ impl Value {

r.read_exact(&mut data[..])?;

// can safely unwrap, because the string length was _already_ checked.
Ok(Value::string_ascii_from_bytes(data).unwrap())
Value::string_ascii_from_bytes(data).map_err(|_| "Bad string".into())
}
TypePrefix::StringUTF8 => {
let mut total_len = [0; 4];
Expand Down

0 comments on commit 634e36d

Please sign in to comment.