# TestNet and MainNet Update: 2.7.1

**URL:** <https://forum.algorand.co/t/testnet-and-mainnet-update-2-7-1/3647>\
**Category:** General\
**Tags:** testnet, mainnet\
**Created:** [June 30, 2021, 2:53pm UTC](https://forum.algorand.co/t/testnet-and-mainnet-update-2-7-1/3647 "2021-06-30T14:53:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devops-service](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/devops-service/32/2205_2.png) [@devops-service](https://forum.algorand.co/u/devops-service)\
**Post date:** [June 30, 2021, 2:53pm UTC](https://forum.algorand.co/t/testnet-and-mainnet-update-2-7-1/3647/1 "2021-06-30T14:53:50Z")

</div>

MainNet and TestNet have been updated to 2.7.1 today, Wed May 26, 2021 10:30 AM EDT (14:30 UTC)

[![GitHub Logo](https://us1.discourse-cdn.com/flex016/uploads/algorand/original/1X/fcd756bba61094f9e8774e43ec402e311aeea50e.jpeg)](https://raw.githubusercontent.com/algorand/go-algorand/master/release/release-banner.jpg)

## Protocol Upgrade

**This release will require a protocol upgrade.**  
This release contains a consensus protocol upgrade, which implements the following spec:

> **[GitHub - algorandfoundation/specs at 65b4ab3266c52c56a0fa7d591754887d68faad0a](https://github.com/algorandfoundation/specs/tree/65b4ab3266c52c56a0fa7d591754887d68faad0a)**
>
> 65b4ab3266c52c56a0fa7d591754887d68faad0a

Spec PR: [#2286](https://github.com/algorand/go-algorand/pull/2286)

# Highlights

This release represents a major milestone in smart contract functionality, as well as serves as a vote for the future of governance on chain.

In this release:

- Governance vote - see [Blog](https://algorand.foundation/news/algorand-governance-referendum)
- Algorand Virtual Machine (AVM) v0.9
  - Control Flow
    - New OpCodes: callsub, retsub
    - Allow backward jumps or indirect jumps
    - Dynamic cost accounting

  - Opcodes: Math related
    - New OpCodes: shl, shr, divmodw, exp, expw, sqrt, log2
    - Byteslice arithmetic

  - Contract-to-contract composability - allow contracts to share scratch space in a transaction group
  - Createable IDs in gtxns (they are not really deterministic, but rather new app/asset idx are available for subsequent apps within a transaction group)
  - Increased Program Limits
    - Ability to pay for extra pages
    - Pool fees - as long as fees in a covered in a gtxn, allow 0 fee txns
    - Increase ASA URL size from 32 bytes to 96 bytes (better IPFS support for NFTs)
    - Combine clear and approval limits
    - Combine schema key/value sizes

  - Optimize int/byte constant in assembly

- Participation key registration improvements (e.g. check valid ranges)
- Miscellaneous optimizations and test improvements

# Changes

1. AVM

- New Features
  - Control flow (callsub, retsub; backward/indirect jumps; dynamic cost accounting)
  - New math opcodes (shl, shr, divmodw, exp, expw, sqrt, log2) and byteslice-oriented math
  - Add ability to pay for more program space
  - Allow future app call transactions to read the scratch space of previous transactions in the same transaction group for contract to contract composability
  - Combine Clear and Approval Program size limits
  - Combine app state key/value size limits
  - Expose creatable IDs to AVM code within the same group
  - Pool fees in a transaction group and allow one user to pay all fees

- Enhancements
  - Allow AVM code to access a max number of foreign refs
  - Increase ASA URL size from 32 bytes to 96 bytes to support NFTs with longer IPFS URLs
  - Optimize constant assembly
  - Regularize access to “foreign” references

- Bug Fix - check setbyte length properly

1. REST API

- New Feature - add the AppsTotalExtraPages account field to the response returned by the /v2/accounts/{addr} endpoint
- Enhancement - make account endpoint produce deterministic JSON
- Bug Fix - make extra-program-pages and apps-total-extra-pages optional in order to do not exposing them before the protocol switch

1. Agreement

- Bug Fix - bug fix for proposal for a future round failing to be relayed

1. Catchup

- Enhancement - catchup: speedup initial node DNS bootstrap time

1. Goal

- Bug Fix - clean up `goal wallet new` output

1. Network

- Enhancement - start network only after handlers registration is complete
- Bug Fix - fix go vet error for string(int) conversion in TestWebsocketNetworkCancel

1. Node

- Enhancement - improve fresh node startup time
- Bug Fix - ensure stopping a node always stops KMD

1. Tools

- Enhancements - deprecate auction code
- Improve carpenter by adding timestamp

1. Tests

- New Feature - integrate with [codecov.io](http://codecov.io) to attach coverage reports to PRs
- Enhancements
  - Add PeerSelector and Catchup service tests
  - Add missing test for universalFetcher.go
  - Bandwidth stats for cluster tests
  - Disable compact certs and auction tests
  - Disable goal expect tests
  - Improve AVM tests
  - Improve TestRewardUnitThreshold predicate
  - Increase catchupaccessor code coverage
  - Temporarily disable TestBasicCatchpointCatchup test and reset timeouts
  - Temporarily disable TestPeriodicSync test
  - Use gotestsum instead of logfilter for test formatting
  - e2e sub assets-app speedup
  - sectok e2e faster

- Bug Fixes
  - Fix asynchronous startup case for rekey upgrade test
  - Fix bug in TestApplicationsUpgradeOverREST
  - Fix data race accessing messagesOfInterest during network shutdown
  - Fix random TestAccountInformationV2 test failures by refreshing wallet handle
  - Fix random failure in TestConsensusVersion
  - Fixing a bug in eval and TestOnSwitchToUnSupportedProtocol
  - Protocol upgrade tests - AgreementFilterTimeout was not set correctly
  - Fix TestRekeyUpgrade when round=0

1. Other

- New Feature - initial support for building CentOS Stream 8 RPM (still need publishing work)
- Enhancements
  - Add mention of install\_buildtools.sh to README
  - Fix docker builds after refactor: skip `make deps`
  - Modify build\_release to match build\_pr and remove ARM Deploy
  - Re-enable gofmt check during travis build
  - Refactor code generation verification
  - Remove ci-deps and update GOPROXY in Dockerfiles
  - Use minimal travis container since we install go ourselves

- Bug Fixes
  - Fix incorrect gaid and gaids docs
  - Fix nightly test genesis file issue
  - If the branch is rel/nightly set channel to nightly
  - Fix crash that should be a clean error report for using `substring` wrong

## Additional Resources

- [Developer Documentation](https://developer.algorand.org/)

---

<div class="post-metadata">

**Author:** ![rotem](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rotem](https://forum.algorand.co/u/rotem)\
**Post date:** [July 7, 2021, 8:37pm UTC](https://forum.algorand.co/t/testnet-and-mainnet-update-2-7-1/3647/2 "2021-07-07T20:37:14Z")

</div>

In this consensus upgrade, we increase the application size to 2KB with the option to add up to 6KB more, bringing the total max size to 8KB. Currently, applications up to 2KB in size can be updated, while applications between 2KB and 8KB in size can not. This discrepancy will be resolved in the next consensus upgrade and all applications of any size, including ones that have already been created, will updateable. Please note - 2KB applications can still be updated.
