Weekly Stacks 2.0 Progress Thread

5.19.2020
If you’ve been following these weekly updates, you know we’ve been uncovering and fixing issues on the Stacks 2.0 Testnet as they come up — especially reliability and performance issues. This is exactly what we hoped to accomplish with Neon and we thank everyone for testing, providing feedback, submitting bug reports, etc.!

Last week, testnet STX Mining was made available and more functionality is expected soon as part of Phase 2 (Argon). Stay tuned for more on that!

In the meantime, we wanted to make sure you didn’t miss the Clarity Hackathon. Submissions for the first phase of the hackathon can be submitted up until May 29th , so if you’ve been meaning to try out Clarity, now is a great time. You can submit up to 3 smart contracts, with a top prize of $1,000 up for grabs.

The Clarity Smart Contract language is one of the core pieces of the Stacks 2.0 upgrade, so it will be exciting to see what you build. If you’re not too familiar with Clarity yet, check out this introductory post or jump into the docs. There are also a number of workshops and new resources created for the hackathon that should be helpful whether you enter or not.

Learn more about the hackathon
Register

Jump into the Discord channel (#hackathons) or reply to this email if you have any questions.

See you in there!

1 Like

6.2.2020

Meet Argon and Earn Testnet Bounties

Welcome back to the weekly update of the anticipated Stacks 2.0 upgrade, including Proof of Transfer (PoX). This is a special edition of these updates as today, we’re excited to transition the Stacks 2.0 Testnet into Phase 2, codename Argon.

Thank you to everyone that’s been kicking the tires during the Neon phase over the past few weeks and helping to improve the network. We’re excited to keep moving toward a successful mainnet launch and for the improvements Argon offers.

So what’s new in Argon? (view the forum post for more detail)

Developer preview of the new Stacks 2.0 Explorer
Built with everything Stacks 2.0 in mind, this new explorer has several nifty Clarity specific features, including full source-code display with syntax-highlighting, inspecting post-conditions and more. → More detail

Better Clarity support in stacks-transactions-js
Most notably, the ability to broadcast transactions, upload contracts, call contract functions, specify post-conditions, and more! This will enable Javascript/Typescript applications (like web-based, Nodejs, etc.) to interact with Clarity smart contracts on Stacks 2.0.

Several stability and performance improvements
Stacks nodes can now tolerate forks of the underlying Bitcoin burnchain. This is crucial for the Stacks blockchain to be able to survive hard-forks and re-orgs of the underlying burnchain, and a requirement before we start integrating with the Bitcoin public testnet in a future phase.

Smart contract support in Blockstack Connect
Developers writing Clarity smart contracts can now empower their app users to sign transactions, bringing those contracts to life with real-world use cases. Give transaction signing a spin using the Blockstack Testnet Demo app.

Testnet Bounty Program
Last but not least, the testnet bounty program is now live! Earn rewards for identifying bugs or creating tools and resources. Bounties start at $100 USD (paid in BTC) and go up to $2,500 at present. We expect more to be added over time and there’s even an option to design your own bounty. Learn more in this forum post or view all bounties here.

Check out this forum post for a detailed breakdown of these updates.

6.18.2020

2 Weeks in to Argon

Welcome back to the weekly update on the anticipated Stacks 2.0 protocol upgrade, including PoX. The Argon phase of the testnet went live two weeks ago, along with the testnet bounty program, which rewards for finding bugs and building tools and resources around PoX.

Here are some of the highlighted technical updates and fixes from the previous week:

  • There was a lot of great conversation on the potential of storing traits in variables in Clarity without compromising decidability. Engineers worked closely with the Clarity Hackathon winner, PSQ, to introduce a ‘contract-of’ call which takes a trait as a parameter, and returns the contract principal that implements the supplied trait argument. → Github
  • This massive PR fixed a slew of networking related issues in the main stacks-blockchain repository. It fixed the net p2p failed walk throttle and cidr blocklist, and adds additional functionality to nodes in the network. A huge step in making Stacks 2.0 more stable. → Github
  • Updates to stacks-transactions-js that augments transaction broadcasting such that it returns a response instead of a string. If the response fails it will contain a TxBroadcastError. It also introduced a handful of custom error classes and changed the transaction broadcast API return type. → Github
  • Another PR was merged to stacks-transactions-js that allows buffers provided as contract-call arguments to be less than or equal to the size specified in the Application Binary Interface (ABI). → Github
  • To make feedback on the new Explorer more efficient, we added a feedback link to the footer, allowing anyone to quickly leave comments or bug reports via Blocksurvey. → Github

Development on Stacks 2.0 is really ramping up, and the next phase is laser-focused on Proof of Transfer and the Stacking mechanism. PoX is a massive technological undertaking, and engineers are heads-down in fleshing out the details and squashing bugs. Refactoring is inevitable, like this pull request that was just merged enabling generic MARFs in the ‘trie identifier’ and introducing a StacksBlockId type for capturing the index block hash. → Github

6.23.2020

3 Weeks in to Argon

Another week, another slew of Stacks 2.0 protocol upgrades and exciting Proof of Transfer (PoX) development. The Argon Testnet Phase is in its third week and we’re really excited to see the community starting to experiment with features and eliminate bugs. We’re offering BTC to anyone who gets friendly with the Blockstack Github and discovers a bug.

Blockchain performance has been promising, and recently reached it’s tallest chain height of 8k blocks. Here are a handful of highlights and technical updates from the last week:

  • A PR was merged that enables self-testing Clarity documentation, by setting up a docs-specific environment for executing the examples. It also fixed an implementation bug with try! error handling. → Github

  • A small change was made to stacks-transactions-js that renamed the makeSmartContractDeploy() function to makeContractDeploy to standardize naming conventions across the codebase. → Github

  • The implementation of contract-of was merged to the main branch, enabling devs to return the contract principal that implements a supplied trait argument. Shoutout to the community members who collaborated with Blockstack engineering to push this forward. → Github

    • Trait-inference was relaxed, allowing trait inference when a principal is being passed (as a literal) to a user defined function. → Github
  • In stacks-blockchain, the graceful termination limit was extended from 3 days to 7 days (From 8940 block height to 20460 block height). → Github

  • A fix was put in place for estimating contract deploy fees. Previously this was causing makeSmartContractDeploy fail when not specifying a fee. → Github

  • clarityRef.json was updated to latest version from stacks-blockchain and merged to main branch. → Github

6.30.2020

4 Weeks in to Argon

The testnet is growing up fast. We are now four weeks into the Argon phase, and thrilled to see all the tinkering and experiments being done with Clarity and the testnet. Don’t forget that we have whole set of bug bounties available for those that want to help build Stacks 2.0 and earn some Bitcoin.

Here are the highlights from the past week:

  • Added service for a Prometheus endpoint to stacks-blockchain for monitoring health and other statistics of network nodes. This is helps in gathering metrics like block processing time, peak node count, miner participation, and other fundamental blockchain benchmarks. → Github
  • Switched to u64 instead of u16 for block heights. This addresses various bugs such as mocknets crashing at a certain block height. Thanks to a community member for the suggestion! → Github
  • Check out the new Stacks Testnet Status Page where you can monitor the heath of the network. Anyone can now check the current status of the master node, Sidecar blockchain API, and explorer. There’s also some other useful details such as last chain tip block height, time since last chain reset, and estimated time until the next chain reset.
  • You can now specify initial STX balances with clarity-cli. Initially, the VM would start with 0 balances by default, which could add an unnecessary step during development. → Github
  • Various nonce fixes were applied to stacks-blockchain. These included uniqueness changes in the mempool sqlite table, which allow you to apply the unique property to individual elements instead of an entire tuple. This PR also enabled transaction chaining up to depth 5, as well as a myriad of other fixes that should alleviate indefinitely pending faucet transaction issues. → Github
  • A number of bug fixes were applied to the Explorer this past week. The speed for transaction generation was dramatically improved. Performance efficiencies were applied to ID generation & saving. Major design improvements were merged including the refactoring of components, tweaks to the sandbox redux state, and header enhancements. → Github
  • We’re hard at work overhauling documentation for Stacks 2.0 and all the new tech being rolled out this year. Unused/obsolete pages were removed, a single navigation bar was established, old static assets were removed, the reference page was cleaned up, materials for Blockstack Connect have been updated, and a new singular layout was standardized. → Github
  • Opened a PR for the ability to generate multi-signature transactions using stacks-transactions-js. This will enable partially signed transactions that can be passed on for additional signatures. → Github

7.7.2020

5 Weeks in to Argon

We’re currently a month and some change into the Argon phase of the testnet, and the tech gets more polished with every passing pull request and issue. We’re blown away by all of the community participation that is helping to stress test and mature the network.

Don’t forget there are a fleet of bounties available where you can earn Bitcoin for squashing bugs or building useful tools.

Check out some of the most important highlights to the codebase from the last week:

  • Fixes were applied that assist in debugging stalled nodes post-reset. The Argon master node’s p2p thread was stalling and ceased looping. This PR sets a panic handler to force the process to abort on thread panic. It also implements various top-level debugging messages that should greatly streamline network maintenance. → Github
  • The Clarity Hackathon Part 1 winner, PSQ, identified and corrected a handful of typos in the Stacks Improvement Proposals (SIP). → Github
  • PSQ also discovered a critical vulnerability in the blockchain repository that was distributing an incorrect block reward value. The arithmetic has been resolved, and the decaying block rewards function is back to operating as expected. PR has been reviewed and is ready to be merged to main upon the next chain reset. → Github
  • The Developer Experience team tested an implementation of the Github Project Board for project management this week. This allows them to visually track the completion of pull requests and issues from all our repositories. The project board is public and able to be viewed by anyone externally if you’d like to take a look at progress. → Github
  • A whole slew of fixes were applied to our new Stacks 2.0 testnet explorer. The page now auto-refreshes when transactions are pending, lighthouse integration was added to our Vercel account, a confirmation time error was resolved, contract generation issues in the Sandbox were solved, and transactions eliciting a “Failed to Fetch” error on Mocknet was due to instability with the node/sidecar and a solution was reached.
  • A slight change to stacks-transactions-js has been reviewed and is ready to be merged. This PR introduces a slight change to the cvToString() function. uInts are now serialized like “u10” instead of like “10”. Fixes a bug encountered when calling ft-get-balance. → Github
  • We’re excited to see tweaks to stacks-blockchain in preparation of Proof-of-Transfer! This past week, our engineering team began identifying refactoring that needs to be done to the codebase in order to migrate the Stacks 2.0 blockchain to the Proof-of-Transfer consensus mechanism. Still a lot of work to be done, but this is a promising first step. → Github
  • Reminder: Engineering calls are streamed weekly on Youtube

July 15, 2020

6 Weeks in to Argon

Another week, another batch of technical updates from the Argon phase as work continues toward Krypton (Phase 3)! The Stacks blockchain, JavaScript library, explorer, and docs pages are all improving with each iteration, and a handful of community members have stepped up with extremely beneficial contributions to the codebase.

You can get involved right now by taking on bounties for bug squashing, tool building, resource crafting, and even community enrichment.

Here are the highlights we’re most excited about from the last week:

  • BurnDB has been refactored to support Proof-of-Transfer (PoX). The previous BurnDB has become the SortitionDB, and entries in this database are identified by SortitionID . → Github
  • A lot of work was done to allow state representation of unanchored microblocks. This PR updates the MARF and Clarity DB so that it can both represent and persist a state that has not been confirmed by an anchored block. At the lowest layer, it adds an alternative way of loading and storing indexed data: unconfirmed Tries. It updates the MARF so that you can either begin() a new Trie as before, or begin_unconfirmed() . → Github
  • Dockerfile was updated to produce a stacks-node bin with Prometheus monitoring enabled. Before, it was compiling the stacks library with the monitoring_prom feature flag, but not cascading the flag to the stacks-node target. This resulted in the stacks-node code behind the feature gate not being checked / compiled / included. → Github
  • Related to monitoring, the team added a gauge for keeping track of active miners on the testnet. This is baked right into Prometheus, and will aid our ability to track testnet progress and miner interest. → Github
  • Various fixes were applied to the event dispatcher. We no longer want to suffix endpoints with a backslash, and will produce a parsing error when such a value is provided. Also included was a repair for a situation where content-type header was being added twice to a POST. → Github
  • Changes were made to stacks-transactions-js that exposes a few integral items from postconditions.ts . This will be used in integrating debug mode for transaction signing, which supports passing post conditions with Connect. In addition, the authenticator needs the PostCondition type, and client apps might need the post condition builders. → Github
  • Heads up: In the stacks-blockchain repo, we’re starting to use the pattern of merging any significant upgrades in the next branch instead of the master branch. The intention is that the next branch will be deployed on the next testnet reset, whereas whatever is in master is safe to run against what’s currently live on the testnet.
2 Likes

July 21, 2020

7 Weeks in to Argon

It was another productive week, resulting in an abundance of various Github updates related to Stacks 2.0. If you need a refresher on all the happenings around the Argon phase, remember to check out this blog post from Blockstack PBC’s Head of Engineering, Diwaker Gupta. Additionally, there are still a host of testnet bounties up for grabs if you’re interested in uncovering bugs and earning bitcoin.

Here are the highlights from the last week:

  • The trait-alias syntax was incorrectly being processed as a JSX element in documentation. It has been reformatted as in-line code and will no longer cause issues with rendering of content. → Github
  • A PR has been merged to stacks-blockchain that improves RPC deserialization error reporting. Previously, if the RPC handler failed while parsing a request from HTTP to a RequestType, the RPC server would return a 400 error, empty HTTP body, and some not very friendly error messages. This PR adds a test for that case, as well as introducing an error handling scheme. → Github
  • A helper function that validates addresses found it’s home in stacks-transactions-js this week. In addition, an optimized c32address validation function is being developed to avoid the relatively expensive process of a throw/try/catch. → Github
  • Removed a stacks-blockchain dependency on the byteorder package. We only used the byteorder crate for parsing little-endian integers in the vendored bitcoin crate. There is already code that does this, and the package was causing build failures on Windows. It also had unsafe code and limited benefit, so we just wrote the bits we needed and got rid of the dependency. → Github
  • The transaction signing documentation has been updated for testnet release. This removes the special configuration for using transaction signing since we’re merging this functionality into master. It also adds guidance about its usage on testnet. → Github
  • More guidance on checking a transaction’s status when using Blockstack Connect has been added to the docs. There is now more info on using the Stacks Blockstack API to request the status of the transaction. The API will respond with a JSON object that includes a tx_status field. → Github
  • The guidance in the docs for the sendToSignIn has been corrected to accurately reflect the result of boolean value being true or false. → Github
  • Last but not least, there are a whole bunch of Proof-of-Transfer refactoring pull requests under review as we work towards its integration into the testnet.
    • This PR is introducing the ChainsCoordinator - the structure in charge of updating the chain’s states and consensus for each new Block / BurnchainBlock. → Github
    • This PR brings the refactor of StacksChainState, Stacks Block DB, and the stacks header hash cache. It does so by systemically changing the way we index Stacks blocks, from using burn_header_hash/block_hash to consensus_hash/block_hash. → Github

7/28/2020

8 Weeks in to Argon

Another exciting week of technical updates for Stacks 2.0 as the protocol continues to mature. For an in-depth description of the current testnet phase, check out this forum post from Diwaker Gupta, Blockstack PBC’s Head of Engineering.

In short, the testnet hit some road bumps last week and encountered reliability issues. Fixes required a handful of resets throughout the week, so we appreciate your patience as the issue was debugged.

Reminder: There are a multitude of bounties available for uncovering bugs in the codebase or building tools that help other developers. → Bounties

Here are highlights from the past week:

  • A monster, high-priority fix was applied to trie_ancestor_hash_bytes_cache usage in MARF. This PR corrects an error in the MARF storage that would lead to invalid states. Debugging was led by Aaron Blankstein (Blockstack PBC) and Jude Nelson (Stacks Foundation) — they discovered that the cache needed to be cleared whenever there is a change in the open block. → Full Post-Morten
  • Functionality was added that allows easier detection of MARF corruption. This PR adds a high-level testcase in which we confirm that it is possible to render a StacksChainState in an unusable state. It also adds another low-level tool to blockstack-core to replay a chainstate’s blocks and sortitions. → Github
  • The DevEx team has started monthly testing with developers never previously exposed to Blockstack in order to evaluate documentation and tutorials. Thanks to this feedback, numerous fixes were applied to reduce obstacles and improve experience. → Github
  • Additional features were added to the Explorer Sandbox. Logging in with Blockstack Connect is now available, Sandbox UI has been improved, and minor performance tweaks were pushed. → Github
  • Fixed an issue in stacks-transactions-js that caused the broadcastTransaction function to return transaction ID incorrectly formatted with quotes. → Github
  • A big shoutout to community member PSQ for his efforts identifying bugs, fixing typos, and cleaning up repositories. This week there was a fantastic discussion around bad nonce output messages. → Github
  • Helpful debug symbols were added to our release profile, plus improvements to debug logging. → Github
  • A PR was merged to stacks-blockchain-api that requires an account property in order to check account balance. → Github
  • DevEx extraordinaire Alex Graebe did his Sidecar chores this week and added improved docs for core node, address, and search endpoints, better document request and response fields, and a “Run in Postman” button. → Github
    • ICYMI - The sidecar repository has been renamed to stacks-blockchain-api for better recognizability. → Github
  • A PR was merged that added the literal type pending to MempoolTransactions, facilitating union types. → Github

Again, a huge thank you to everyone experimenting with the testnet! The MARF bug this week is a perfect example of why your efforts are so valuable — this bug was impossible to reproduce locally or in any other environment, only manifesting when someone was mining invalid blocks and a specific sequence of events was triggered.

1 Like

August 4, 2020

9 Weeks in to Argon

Hey there, Blockstackers. Another week of Stacks 2.0 testnet means a whole new set of development updates as we work towards Proof-of-Transfer, Stacking, and eventually a Stacks 2.0 mainnet launch!

In general, the team continues to be heads down with PoX development.

Resources:

  • new : A public tracker has been set up so you can easily follow stacks-blockchain progress on the upcoming phase (Krypton) of the testnet
  • Full description of the current Argon phase
  • Bounties are still available and we’re paying faster than ever - take a look!

Here are the most significant updates from the past week:

  • A PR was merged ensuring that the parent burn header hash is used to confirm that the latest burn block (seen by a miner when the block commit was produced) is the parent of the sortition in which that block won. → Github
    • This also fixed a regression problem for neon_node.rs in the next branch and alleviated a bug that was causing particular tests to time out due to a regression in the way a block’s parent’s header is loaded. → Github
  • Community member PSQ was the lead contributor to an updated implementation of withdraw-reward. He identified that it would be more efficient to directly credit miners without an additional transaction. → Github
  • When connecting peers using NAT, the “Confirm IP Address” step of the public IP-learning protocol was removed. Now, the IP-learning protocol just asks one of the initial seed nodes given to the peer DB for the peer IP address. → Github
  • A PR was merged that makes sure that all DB commits to the sortition DB and Stacks DB first commit their MARF-indexed values, and then commit their MARF tries. It removes a race condition where an indexed commit was superseding the full transaction commit, and was the root-cause of at least one observed thread of panic on the testnet. → Github
  • We are systemically changing the way we index Stacks blocks in preparation of Proof of Transfer. A PR was merged that begins the chainstate refactor for the transition. In doing so, Stacks blocks are unique to their PoX fork. This PR will not be compatible with the current Argon testnet. → Github
  • Various bug report templates were added to the stacks-transactions-js repo to allow for more formalized and categorized bug reporting. → Github
  • A PR has been merged that enables the construction of sponsored transactions where a second “sponsor” signer can pay the fees of a transaction signed by the origin. → Github
    • The stacks-blockchain-api has also been updated to enable sponsored transactions. → Github
  • A bug was fixed where an address’ STX balance value was not taking fees into account. Also, a new API for STX-only wallets which doesn’t perform queries on FTs/NFTs was added. → Github
  • A GH Action workflow was added to the stacks-blockchain-api repo which automates linting, testing, build, release & semantic versioning. → Github
  • A slew of updates have been applied to the Blockstack docs. In the pipeline is a new URL scheme, major image consolidation, retitling of pages, and helpful formatting fixes. → Github

In case you missed it: In the stacks-blockchain repo, we’re starting to use the pattern of merging any significant upgrades in the next branch instead of the master branch. The intention is that the next branch will be deployed on the next testnet reset, whereas whatever is in master is safe to run against what’s currently live on the testnet.

8.12.2020

10 Weeks in to Argon

It was another big week around the ecosystem with the Clarity Hackathon in full swing, Muneeb on the Edcon panel with Vitalik Buterin, and the first Stacks Ecosystem call hosted by the Stacks Foundation.

Proof-of-Transfer is currently the primary focus for implementation on the Stacks 2.0 Testnet. Feature updates and bug fixes are pouring in thanks to contributions from the community.

Check out the highest priority updates from the past week:

  • In addition to general documentation design overhaul, a Stacks 2.0 testnet status checker has been added above the navigation bar on various related documentation pages to assist with monitoring downtime. → Github
    • A status checker is also in the works for the testnet explorer. → Github
  • A PR was merged that allows more parameters to be configured via configuration file, and better default download_interval for mining on testnet. This should alleviate issues some users were encountering with bitcoin-test failure, and greatly increase ease of spinning up a miner and downloading blocks. → Github
  • An update was merged to stacks-blockchain that exposes tx-sender and contract-caller to bare code in smart contracts. Fixes an issue where they were not available during contract initialization. → Github
  • Multi-sig transaction support is in the works for stacks-transactions-js after hash modes are implemented and authentication clearing is verified. → Github
    • Support for unsigned transactions is also in the works. This should add compatibility for certain hardware wallets such as Ledger that sign transactions while keeping the private key on the device. → Github
  • A pull request is in review to bring native string-ascii and string-utf8 types to Clarity. →Github
  • Call for community feedback: The implementation of Proof-of-Transfer is on its way. We want to hear from developers what elements should exposed through the API, and what features should be added to the explorer. → Github

Resources:

  • A public tracker has been set up so you can easily follow stacks-blockchain progress on the upcoming phase (Krypton) of the testnet.
  • Don’t forget about the new Stacks 2.0 Testnet Status page for a quick glance at the health and history of the network.
  • A full description of the current Argon phase from the Blockstack forum.
  • The first round of bug bounty payments will be announced soon and bounties are still available - take a look!

One last reminder: In the stacks-blockchain repo, we’re starting to use the pattern of merging any significant upgrades in the next branch instead of the master branch. The intention is that the next branch will be deployed on the next testnet reset, whereas whatever is in master is safe to run against what’s currently live on the testnet.

There was a wide-spread outage of PBC infrastructure on Friday that led to many services, including testnet, being unavailable. This was followed by additional instability over the weekend, culminating in another reset on Sunday.

If you have any questions on the updates included in this email, or on PoX, STX Mining, or the Stacks 2.0 testnet, please reach out to Xan at [email protected].

Best,
The Blockstack PBC Team

8.18.2020

11 Weeks in to Argon

What do autumn and the Krypton testnet phase have in common? They’re both right around the corner! Everyone has been in heads-down development mode and the testnet implementation of Proof-of-Transfer is now on the horizon. Learn more about the PoX consensus mechanism straight from Blockstack Co-Founder, Muneeb Ali, this weekend at the FuturePROOF Summit.

Technical highlights:

  • A fix was applied that solves p2p handle deadlock issues on the testnet. Improvements were made to PeerRequest commands. → Github
  • A PR was merged that integrated the ChainsCoordinator with the bitcoin indexer, network relayer, and run_loop::neon implementation. This implementation constructs a set of singleton communication channels for signaling to the coordinator. → Github
  • Bug fixes were applied that enables an alternative implementation of array buffers. → Github
  • RPC Websocket improvements such as event streams for specific addresses or transactions. → Github

Documentation update:

  • The Blockstack documentation pages have been completely overhauled and redesigned!
    • Overview of documentation design updates. → Github
    • Converts the docs site from using jekyll to using next.js and mdx. This gives us the ability to write standard markdown, but include react components, and ultimately render it with all of our standing UI components found within @blockstack/ui.
    • MDX gives us the ability to write JSX (similar in nature to liquid, which jekyll used as a templating language) directly in our markdown.
    • Also integrated the Remark preprocessor. It allows specialization and customization of text, and automatic combination of many markdown documents into one.
  • A multitude of design, UX, and content upgrades. For instance: a brand new overview page for the docs and a dark-mode switcher!
  • The ability to search has been added to the docs, allowing easy querying for specific items. → Github
  • Improved references for better automation and readability. → Github
  • A fix was applied to the status indicator component of the docs, allowing for quick monitoring of network health. → Github
  • For the docs, the shiki syntax highlighter has been implemented for more structured & visual code representation. → Github
  • Image management and formatting in the docs has been greatly streamlined using imgix. → Github
  • Revamp of docs URL structures to improve SEO and folder structure. → Github

Resources:

  • A public tracker has been set up so you can easily follow stacks-blockchain progress on the upcoming phase (Krypton) of the testnet.
  • The Stacks 2.0 Testnet Status page displays real-time health and history of the network
  • A full description of the current Argon phase from the Blockstack forum.
  • Bug Bounties are still available, paying out $BTC for discovering vulnerabilities.

One last reminder: In the stacks-blockchain repo, we’re starting to use the pattern of merging any significant upgrades in the next branch instead of the master branch. The intention is that the next branch will be deployed on the next testnet reset, whereas whatever is in master is safe to run against what’s currently live on the testnet.

August 26, 2020

Congratulations to Bounty Winners!

A big congratulations goes out to the recipients of the first round of Stacks 2.0 Testnet Bug Bounty payments! Community rockstars Friedger Müffke and Pascal Belloncle both made significant contributions to the Blockstack Github repositories, and always inspire educational conversation surrounding issues. Pascal was able to uncover two major mining related bugs, while Friedger knocked out three minor bugs related to Clarity and stacks-transactions-js. Don’t forget that the bug bounties are still available and this $BTC is just begging to be paid out!

3 Months into Argon

This week marks 3 months into the Argon phase of the Stacks 2.0 Testnet! After a jam-packed weekend full of awesome talks & workshops at FuturePROOF, we’re back to the grindstone. Pull requests for the Proof-of-Transfer implementation are starting to trickle in, and the transition from the Argon phase to Krypton is just weeks away.

Take a look at the most significant technical updates from the last week:

  • Multi-signature transaction support was added to stacks-transactions-js! The same PR introduces the ability to construct transactions and sign them later as a separate step. → Github
  • Changes are being iterated on for the launch on Xenon, the testnet phase after Krypton. Identifying requirements like a testnet bitcoinid or a testnet $BTC faucet. → Github
    • ELI5: We’re starting to work on Stacks 2.0 integration with Bitcoin’s primary testnet (Argon and Krypton both use a bitcoin regtest setup). This is an important step in building confidence in our ability to work with Bitcoin’s mainnet!
  • Rosetta implementation PRs are starting to trickle in, thanks to work by Tintash! → Github
  • A trait lookup fix was applied to stacks-blockchain that alleviates an issue where contract-of couldn’t be used with traits from function parameters in clarity within a let context. → Github
  • Proof-of-Transfer anchor block detection was implemented! This PR also included some test cases for the ChainsCoordinator that exercise the detection mechanism. → Github
  • A client library has been generated for stacks-blockchain-api. We use openapi-generator to generate a client library based off the openapi.yaml and json schema files. → Github
  • A PR to be merged soon for the API client library documentation. → Github
  • Support for passing traits as arguments in a contract call is being added to stacks-transactions-js → Github
  • Module import improvements & miscellaneous fixes were applied to stacks-transactions-js. This included a lodash update, eslint reconfiguration, a webpack UMD build fix, fetch error handling, and global scope pollution. → Github
  • A new blockstack.js release persists etags in the UserSession store so they don’t always need to be fetched when the page is loaded. → Github
  • Added two new Stacks API endpoints for block time to provide clients with a programmatic way to estimate how much time a transaction will take to complete. This will be used in the Explorer soon to improve UX. → Github

Just a heads up: Some important PRs are currently in-review for Clarity and PoX! Such as native string types in Clarity, PoX anchor block detection, PoX lockup and delegation, and more!

Resources:

  • Follow stacks-blockchain progress for the upcoming phase (Krypton) of the testnet on Github with the public tracker.
  • The Stacks 2.0 Testnet Status page displays realtime health and history of the network.
    • Note : We’ve bumped up the block interval from 30 seconds to 2 minutes (so the chain is producing bitcoin blocks slower than before). The reason being is Bitcoin mainnet has 10 minute block intervals, so we gradually want to increase our block intervals to simulate that environment.
  • A full description of the current Argon phase from the Blockstack forum.

9.2.2020

13 Weeks into Argon

It’s been another busy week in Stacks 2.0 Github repositories. Soon we’ll be saying goodbye to the Argon phase of the testnet, and hello to Krypton. More pull requests for Proof-of-Transfer & Stacking functionality are being merged every week thanks to hard work from community members. Keep your eyes peeled for a Krypton launch date soon!

Take a look at the most significant technical updates from the past week:

  • The stacks-blockchain Github workflow has been updated to build a docker image and release with new distributions. → Github
  • Required adjustments are beginning to be made for the transition to Krypton, and eventually Xenon, so that Stacks nodes can interact with the Bitcoin test network. → Github
  • A PR has been merged that introduces string-ascii & string-utf8 as types in Clarity. → Github
    • Support for these new String types has been added to stacks-transactions-js. → Github
  • Some of the core mechanisms of Proof-of-Transfer are starting to be implemented, such as sortition evaluation using recipients selected from the reward set. → Github
    • A PR implementing the Proof-of-Transfer STX lock-up and PoX delegation logic is in review. → Github
  • The instructions for installing RUST on a machine have been simplified. Before, it was up to the user to select the default installation. Community member Jason Schrader identified that the default installation can be designated within the single-line installation command. → Github
  • Documentation information has been updated pertaining to the API Client Library. This should help developers using the JS WebSocket. → Github
  • A developer preview of the Stacks Blockchain API is now available! → Forum
  • A Rosetta implementation is underway (two PRs merged and two more in-progress) thanks to fantastic work from community members. → Github
  • A script was to stacks-transactions-js added that allows for a self-contained Docker image which will start a Stacks 2.0 blockchain and API testnet. → Github
  • Documentation has been reworked with an OpenAPI section for mempool transactions. → Github
  • A new version of blockstack.js has been released. → Github
  • Added a Stacks API endpoint for block time to help clients estimate how long it will take for a transaction to complete. → Github

Resources:

thanks…its so useful to me read the answers

1 Like

September 17, 2020
Closing in on full Proof-of-Transfer

Welcome back, Blockstackers. After a Labor Day hiatus, Stacks 2.0 updates return with a heaping pile of merged PRs and feature additions. Engineering (with the help of some superstar community members) is hard at work putting the finishing touches on the Krypton phase of testnet, including full Proof-of-Transfer.

Here were the most significant development updates from the past week:

  • The Verifiable Random Function (VRF) is now allowed to reuse public keys, and will only register a key once in the node. → Github
    • Small change → HUGE IMPACT. This reduces BTC fees for STX miners by eliminating repeated VRF key registration transactions. Also improves mining behavior by eliminating the need to scan the burnchain for certain transactions. → Github
    • More details on VRF public key reuse → Github
  • A square root function has been implemented, which fixes issues encountered with Clarity’s power function (pow) having undocumented restrictions on exponents. → Github
  • After a much iteration, stacks-blockchain has added support for trait lookup and passing traits as arguments in contract calls. → Github
  • We are transitioning the NPM scope of the explorer UI from @blockstack to @stacks. → Github
  • Fixed a bug where the standalone docker image was unexpectedly starting stacks-node twice. → Github
  • Improvements were made to the openapi schema, including adding response definitions and function argument parameters to read-only functions. → Github
    • A readOnlyFunctionArgs call has been added to the stacks-blockchain-api. This should alleviate problems where developers desired functionArgs as a property of CallReadOnlyFunctionRequest. → Github
    • Pagination options were added to the client libraries → Github
  • The rest of the necessary data api endpoints have been added for the implementation of Rosetta. → Github
  • The option to start the self-contained image in mocknet mode has been added to the stacks-blockchain-api. → Github
  • Updated the jsonrc package to fix a critical dependency error. → Github
  • A lot of substantial documentation upgrades are happening in anticipation of Krypton.
    • Transaction signing docs have been have been polished for testnet release. → Github
    • Page naming convention was reorganized and standardized. → Github
    • A breaking change was fixed in mdx-remote that corrects highlighting across external markdown files. → Github
    • The project now uses new packages, @stacks/ui and @stacks/ui-core to enable the use of emotion & theme-ui in place of styled-components and styled-system. → Github
    • Bugs were fixed in the claim-from-faucet function cause by map-set and err arguments. → Github

Resources:

2 Likes

October 1, 2020
1st Week of Krypton

Good afternoon, Blockstackers! It felt like Christmas in September last week when the Krypton phase of the Stacks 2.0 testnet officially went live! This was a massive milestone on the way toward Mainnet, and we’re looking forward to community members testing out all the new features. PoX Mining and Stacking are open for business, and documentation has been updated so you can dive into experimentation.

Here are the most substantial technical developments from the past week:

stacks-blockchain

  • Updates to the networking stack for Proof-of-Transfer: This PR implemented many of the features needed for Krypton, including a ground-up rewrite of the block inventory synchronization logic that takes into account what the local and remote nodes know about the states of PoX anchor blocks. → Github
    • In the first phase, a node incrementally builds a view of the remote node’s knowledge of PoX anchor blocks.
    • Once a local node has a view of a remote node’s PoX state, it will incrementally build up a view of the remote node’s present Stacks blocks and microblocks.
  • Adjustments to the Krypton deployment. Determined Krypton PoX parameters such as Reward cycle length, threshold, and prepare length. → Github
  • Numerous bug fixes were applied for Krypton. → Github
    • chainstate.get_reward_addresses needed to take the current burnchain block height as an additional argument.

    • The default constants in the pox.clar change depending on mainnet flag.

    • The reward set is sorted by address.

  • Developer Experience adjustments for Krypton. → Github
    • Mechanism to let the sidecar know that a transaction stacked some STX.
    • Ability to discover PoX parameters.
    • Ability to confirm that a user is eligible for PoX.
    • Includes a noop handler for STXLockEvent. → Github
  • Fixed the neighbor walk logic so it doesn’t get stuck in a GetHandshakesBegin state forever if it tries to connect to an unresponsive neighbor. → Github
  • Thanks whoabuddy on Github, the ‘neighbors failed to connect’ messages have been changed from info to debug. → Github
  • Fixed event ID resource leak for connecting sockets that time out. This should cause the follower node to not freeze up after a few hours. → Github
  • Another PR adds a compile-enabled feature for storing to a table a copy of the transaction ID and transaction data whenever a transaction is processed. This lets devs figure out whether or not a particular TXID was processed, and if so, what the result of it was. → Github

stacks-transactions-js

  • The multisig feature has now been documented in the README. → Github

docs

  • Some quick fixes were applied, including low-hanging fruit structural changes. → Github
  • User-facing docs for Stacks Wallet Trezor support were added. → Github
  • Tutorials and guides have been updated for Krypton PoX mining. → Github
  • Updated rpc references and added a missing redirect. → Github

stacks-blockchain-api

  • Rosetta construction/preprocess endpoint implementation will be used to construct metadata to build a transaction except for nonce. → Github

  • Implemented a Prometheus metrics endpoint with the same libraries being used in the new Explorer. → Github

    • This endpoint can be accessed at the root of port 9153.
  • Testnet faucet generosity has been adjusted to give users a larger amount of testnet STX upon request. Required for Stacking. → Github

  • Updating all hardcoded records to use CNAME’d records. → Github

  • Added version 2 PoX endpoint proxy and documentation. → Github

  • Added a follower-mode VScode debugging configuration. → Github

  • Implementation of rosetta construction/metadata & hash endpoints. → Github

Resources:

October 13, 2020
3rd Week of Krypton

Hello out there all you blockchain believers! The Krypton phase of Stacks 2.0 has been live for three weeks now and users are beginning to sink their teeth into new features like Proof-of-Transfer Mining and Stacking. A whole new slew of upgrades came in this week, including delegated/pooled Stacking features just as this post on the Stacking Earnings Model dropped.

Here’s a detailed look at the most substantial technical updates from the past week:

stacks-blockchain (v23.0.0.4-krypton)

  • This PR implements block download rate tracking by making it so the burnchain-processing loop in the testnet node will:
    • Fetch burnchain blocks and process sortitions in batches with length no greater than the reward cycle length.
    • Monitor the Stacks staging DB for blocks that are imminently processable while the P2P thread downloads blocks and the relayer thread processes them. → Github
  • This PR adds delegation and pooling support to the pox contract. It does so by adding four public methods:
    • delegate-stx, revoke-delegate-stx, delegator-stack-stx, and stack-aggregation-commit.
    • Additionally, other modifications were made to PoX contract behavior such as making reward addresses reusable. → Github
  • A fix has been applied that alleviates strange miner behavior. A node can now accept BlocksData messages from inbound authenticated neighbors, as well as outbound. → Github
  • Copyright assignment for the stacks-blockchain repository has transitioned to the Stacks Foundation! → Github

stacks-transactions-js (v0.4.1)

  • You can now query the blockchain for data map entries of a contract. This pull request adds the getMapEntry function which uses helper methods cvToHex and parseMapEntryResponse. → Github

stacks-blockchain-api (v0.26.0)

  • Rosetta mempool/transaction response functionality implemented. → Github
  • A broken standalone docker image has been repaired. → Github
  • Added support for public keys in preprocess and metadata endpoint to accommodate Rosetta functionality. → Github

docs

  • Testnet participation workflow streamlined and instructions updated. → Github
  • A reference has been added to the stacks-gen repo, created by psq, which helps with generating keys needed for stacking and mining on testnet. → Github
  • A guide for Stacking on the Stacks 2.0 testnet has been made live! → Github
  • Instructions for the most recent wallet release (v3.1.0) were updated. → Github

October 20, 2020
4th Week of Krypton

Good day to all you decentralization devotees! It’s been absolutely spooky how many pull requests have been merged the last few weeks.

For a deeper dive, take a look at the most substantive technical developments from the past week:

stacks-blockchain (v23.0.0.6-krypton)

  • The threshold adjustment described in SIP-007 was implemented. → Github
    • Reward address repetition handling has also been configured.
  • A fix that verifies a message to be relayed is not sent to anyone in the relayer set at the time of relay instead of at the time of sampling. → Github
  • Anchor block recency is now enforced with burn-block-ht parameter. → Github
    • burn-block-ht parameters added to stack-stx and delegate-stack-stx.
  • This PR adds vm::docs::contracts, which supports auto-generating JSON documentation for boot code contracts. → Github
  • Fixed a discrepancy in abi serialization for string-ascii and string-utf8. → Github
  • This PR forces the neighbor walk logic to re-sample the peer DB every so often, no matter how ‘error-free’ the current walk is. → Github
  • string-ascii is now being used instead of instead of buffer in the Getting started contract. → Github
  • A networking PR is under review that should address the lingering block propagation issues that we’ve seen on Krypton. → Github

explorer (v1.0.3)

  • A PR was merged that encodes function names before calling the stacks node endpoint for read-only functions. → Github
    • Fixes an issue where some read-only calls were failing.

stacks-blockchain-api (v0.26.0)

docs

  • The Stacking reference page has been fully updated for the Krypton testnet phase! → Github
  • Stacks Blockchain overview has been reworked to be comprehensible and consistent with other Blockstack messaging. → Github
  • Replaced the current link to the source code of AuthOptions from the connect repo to the ux repo. → Github
    • Also updated the optional flags in the properties table of AuthOptions.

Hacktoberfest

  • Blockstack will be offering additional Hacktoberfest prizing to encourage the Stacks Community to contribute to open source! In addition to the typical Hacktoberfest prizing (2020 edition tee or a tree planted on your behalf), eligible participants will receive custom Stacks branded swag.
  • Check out Blockstack’s Hacktoberfest repos and start hacking now.

The Blockstack x Hacktoberfest guide + repos can be found here!: Blockstack x Hacktoberfest: Win additional prizing for participating