mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-29 04:05:21 +08:00
Merge pull request #3575 from stacks-network/feat/stacks-2.1-changelog
Feat/stacks 2.1 changelog
This commit is contained in:
105
CHANGELOG.md
105
CHANGELOG.md
@@ -5,32 +5,105 @@ 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 the versioning scheme outlined in the [README.md](README.md).
|
||||
|
||||
## [Unreleased - Stacks 2.1]
|
||||
## [2.1]
|
||||
|
||||
This release will contain consensus-breaking changes.
|
||||
This is a **consensus-breaking** release that introduces a _lot_ of new
|
||||
functionality. Details on the how and why can be found in [SIP-015](https://github.com/stacksgov/sips/blob/feat/sip-015/sips/sip-015/sip-015-network-upgrade.md),
|
||||
[SIP-018](https://github.com/MarvinJanssen/sips/blob/feat/signed-structured-data/sips/sip-018/sip-018-signed-structured-data.md),
|
||||
and [SIP-20](https://github.com/obycode/sips/blob/bitwise-ops/sips/sip-020/sip-020-bitwise-ops.md).
|
||||
|
||||
The changelog for this release is a high-level summary of these SIPs.
|
||||
|
||||
### Added
|
||||
|
||||
- Clarity function `stx-transfer?` now takes a 4th optional argument, which is a memo.
|
||||
- Added a new parser which will be used to parse Clarity code beginning with 2.1,
|
||||
resolving several bugs in the old parser and improving performance.
|
||||
- Documentation will indicate explicitly which Clarity version introduced each
|
||||
keyword or function.
|
||||
- Clarity2 improvements to traits (see #3251 for details):
|
||||
- There is a new `.pox-2` contract for implementing proof-of-transfer. This PoX
|
||||
contract enables re-stacking while the user's STX are locked, and incrementing
|
||||
the amount stacked on top of a locked batch of STX.
|
||||
- The Clarity function `stx-account` has been added, which returns the account's
|
||||
locked and unlocked balances.
|
||||
- The Clarity functions `principal-destruct` and `principal-construct?`
|
||||
functions have been added, which provide the means to convert between a
|
||||
`principal` instance and the `buff`s and `string-ascii`s that constitute it.
|
||||
- The Clarity function `get-burn-block-info?` has been added to support
|
||||
fetching the burnchain header hash of _any_ burnchain block starting from the
|
||||
sortition height of the Stacks genesis block, and to support fetching the PoX
|
||||
addresses and rewards paid by miners for a particular burnchain block height.
|
||||
- The Clarity function `slice` has been added for obtaining a sub-sequence of a
|
||||
`buff`, `string-ascii`, `string-utf8`, or `list`.
|
||||
- Clarity functions for converting between `string-ascii`, `string-utf8`,
|
||||
`uint`, and `int` have been added.
|
||||
- Clarity functions for converting between big- and little-endian
|
||||
`buff` representations of `int` and `uint` have been added.
|
||||
- The Clarity function `stx-transfer-memo?` has been added, which behaves the
|
||||
same as `stx-transfer?` but also takes a memo argument.
|
||||
- The Clarity function `is-standard` has been added to identify whether or not a
|
||||
`principal` instance is a standard or contract principal.
|
||||
- Clarity functions have been added for converting an arbitrary Clarity type to
|
||||
and from its canonical byte string representation.
|
||||
- The Clarity function `replace-at?` has been added for replacing a single item
|
||||
in a `list`, `string-ascii`, `string-utf8`, or `buff`.
|
||||
- The Clarity global variable `tx-sponsor?` has been added, which evaluates to
|
||||
the sponsor of the transaction if the transaction is sponsored.
|
||||
- The Clarity global variable `chain-id` has been added, which evaluates to the
|
||||
4-byte chain ID of this Stacks network.
|
||||
- The Clarity parser has been rewritten to be about 3x faster than the parser in
|
||||
Stacks 2.05.x.x.x.
|
||||
- Clarity trait semantics have been refined and made more explicit, so as to
|
||||
avoid certain corner cases where a trait reference might be downgraded to a
|
||||
`principal` in Clarity 1.
|
||||
* Trait values can be passed to compatible sub-trait types
|
||||
* Traits can be embedded in compound types, e.g. `(optional <my-trait>)`
|
||||
* Traits can be assigned to a let-variable
|
||||
- Fixes to unexpected behavior in traits
|
||||
* A trait with duplicate function names is now an error (#3214)
|
||||
* Aliased trait names do not interfere with local trait definitions (#3215)
|
||||
* A trait with duplicate function names is now an error
|
||||
* Aliased trait names do not interfere with local trait definitions
|
||||
- The comparison functions `<`, `<=`, `>`, and `>=` now work on `string-ascii`,
|
||||
`string-utf8`, and `buff` based on byte-by-byte comparison (note that this is
|
||||
_not_ lexicographic comparison).
|
||||
- It is now possible to call `delegate-stx` from a burnchain transaction, just
|
||||
as it is for `stack-stx` and `transfer-stx`.
|
||||
|
||||
## Upcoming
|
||||
### Changed
|
||||
|
||||
### Added
|
||||
- Added prometheus output for "transactions in last block" (#3138).
|
||||
- Added envrionement variable `STACKS_LOG_FORMAT_TIME` to set the time format
|
||||
stacks-node uses for logging.
|
||||
Example: `STACKS_LOG_FORMAT_TIME="%Y-%m-%d %H:%M:%S" cargo stacks-node`
|
||||
- The `delegate-stx` function in `.pox-2` can be called while the user's STX are
|
||||
locked.
|
||||
- If a batch of STX is not enough to clinch even a single reward slot, then the
|
||||
STX are automatically unlocked at the start of the reward cycle in which they
|
||||
are rendered useless in this capacity.
|
||||
- The PoX sunset has been removed. PoX rewards will continue in perpetuity.
|
||||
- Support for segwit and taproot addresses (v0 and v1 witness programs) has been
|
||||
added for Stacking.
|
||||
- The Clarity function `get-block-info?` now supports querying a block's total
|
||||
burnchain spend by miners who tried to mine it, the spend by the winner, and
|
||||
the total block reward (coinbase plus transaction fees).
|
||||
- A block's coinbase transaction may specify an alternative recipient principal,
|
||||
which can be either a standard or contract principal.
|
||||
- A smart contract transaction can specify which version of Clarity to use. If
|
||||
no version is given, then the epoch-default version will be used (in Stacks
|
||||
2.1, this is Clarity 2).
|
||||
- The Stacks node now includes the number of PoX anchor blocks in its
|
||||
fork-choice rules. The best Stacks fork is the fork that (1) is on the best
|
||||
Bitcoin fork, (2) has the most PoX anchor blocks known, and (3) is the longest.
|
||||
- On-burnchain operations -- `stack-stx`, `delegate-stx`, and `transfer-stx` --
|
||||
can take effect within six (6) burnchain blocks in which they are mined,
|
||||
instead of one.
|
||||
- Transaction fees are debited from accounts _before_ the transaction is
|
||||
processed.
|
||||
- All smart contract analysis errors are now treated as runtime errors, meaning
|
||||
that smart contract transactions which don't pass analysis will still be mined
|
||||
(so miners get paid for partially validating them).
|
||||
- The default Clarity version is now 2. Users can opt for version 1 by using
|
||||
the new smart contract transaction wire format and explicitly setting version
|
||||
|
||||
### Fixed
|
||||
|
||||
- The authorization of a `contract-caller` in `.pox-2` for stacking will now
|
||||
expire at the user-specified height, if given.
|
||||
- The Clarity function `principal-of?` now works on mainnet.
|
||||
- One or more late block-commits no longer result in the miner losing its
|
||||
sortition weight.
|
||||
- Documentation will indicate explicitly which Clarity version introduced each
|
||||
keyword or function.
|
||||
|
||||
## [2.05.0.6.0]
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
pub mod contexts;
|
||||
//mod maps;
|
||||
pub mod natives;
|
||||
|
||||
use stacks_common::types::StacksEpochId;
|
||||
|
||||
@@ -1075,7 +1075,6 @@ impl ConversationP2P {
|
||||
/// Handle an inbound NAT-punch request -- just tell the peer what we think their IP/port are.
|
||||
/// No authentication from the peer is necessary.
|
||||
fn handle_natpunch_request(&self, chain_view: &BurnchainView, nonce: u32) -> StacksMessage {
|
||||
// monitoring::increment_p2p_msg_nat_punch_request_received_counter();
|
||||
monitoring::increment_msg_counter("p2p_nat_punch_request".to_string());
|
||||
|
||||
let natpunch_data = NatPunchData {
|
||||
@@ -1244,7 +1243,6 @@ impl ConversationP2P {
|
||||
chain_view: &BurnchainView,
|
||||
message: &mut StacksMessage,
|
||||
) -> Result<Option<StacksMessage>, net_error> {
|
||||
// monitoring::increment_p2p_msg_ping_received_counter();
|
||||
monitoring::increment_msg_counter("p2p_ping".to_string());
|
||||
|
||||
let ping_data = match message.payload {
|
||||
@@ -1268,7 +1266,6 @@ impl ConversationP2P {
|
||||
chain_view: &BurnchainView,
|
||||
preamble: &Preamble,
|
||||
) -> Result<ReplyHandleP2P, net_error> {
|
||||
// monitoring::increment_p2p_msg_get_neighbors_received_counter();
|
||||
monitoring::increment_msg_counter("p2p_get_neighbors".to_string());
|
||||
|
||||
let epoch = self.get_current_epoch(chain_view.burn_block_height);
|
||||
@@ -1477,7 +1474,6 @@ impl ConversationP2P {
|
||||
preamble: &Preamble,
|
||||
get_blocks_inv: &GetBlocksInv,
|
||||
) -> Result<ReplyHandleP2P, net_error> {
|
||||
// monitoring::increment_p2p_msg_get_blocks_inv_received_counter();
|
||||
monitoring::increment_msg_counter("p2p_get_blocks_inv".to_string());
|
||||
|
||||
let mut response = ConversationP2P::make_getblocksinv_response(
|
||||
@@ -2041,7 +2037,6 @@ impl ConversationP2P {
|
||||
// already have public key; match payload
|
||||
let reply_opt = match msg.payload {
|
||||
StacksMessageType::Handshake(_) => {
|
||||
// monitoring::increment_p2p_msg_authenticated_handshake_received_counter();
|
||||
monitoring::increment_msg_counter("p2p_authenticated_handshake".to_string());
|
||||
|
||||
debug!("{:?}: Got Handshake", &self);
|
||||
@@ -2113,7 +2108,6 @@ impl ConversationP2P {
|
||||
let solicited = self.connection.is_solicited(&msg);
|
||||
let reply_opt = match msg.payload {
|
||||
StacksMessageType::Handshake(_) => {
|
||||
// monitoring::increment_p2p_msg_unauthenticated_handshake_received_counter();
|
||||
monitoring::increment_msg_counter("p2p_unauthenticated_handshake".to_string());
|
||||
test_debug!("{:?}: Got unauthenticated Handshake", &self);
|
||||
let (reply_opt, handled) =
|
||||
@@ -2189,7 +2183,6 @@ impl ConversationP2P {
|
||||
nack_payload,
|
||||
);
|
||||
|
||||
// monitoring::increment_p2p_msg_nack_sent_counter();
|
||||
monitoring::increment_msg_counter("p2p_nack_sent".to_string());
|
||||
|
||||
// unauthenticated, so don't forward it (but do consume it, and do nack it)
|
||||
|
||||
Reference in New Issue
Block a user