diff --git a/CHANGELOG.md b/CHANGELOG.md index 710831abb1..3c80073cfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] @@ -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 diff --git a/README.md b/README.md index b563985a9f..f60a58aa46 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/src/vm/types/serialization.rs b/src/vm/types/serialization.rs index e1ed18ad53..2e025a2b1f 100644 --- a/src/vm/types/serialization.rs +++ b/src/vm/types/serialization.rs @@ -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)?; @@ -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];