Our team is happy to announce a new version of the Aleo Stack, which includes the node implementation snarkOS and the programming language Leo. These applications are built on top of the developer-friendly snarkVM and Aleo SDK libraries. Aleo is an open source cryptocurrency through which developers can deploy cryptographically secure dApps.
v4.3.0 - snarkOS Release Notes | AnnounceHQ
Most notably, this release unlocks native Keccak+ECDSA-based signature verification, allowing for messages from other popular cryptocurrency ecosystems like Ethereum to be verified in Aleo’s public smart contract scope - while still having access to native zero knowledge proofs verification too. Moreover, maximum array sizes have increased, node syncing is 5x faster, and both transaction and solution broadcasting has been greatly stabilized. \
ATTENTION: Validators that do not upgrade in time will be at risk of forking and require manual intervention. Clients that do not upgrade will be at risk of halting until an upgrade occurs.
Keccak+ECDSA signature verification opcodes
Aleo added native ECDSA signature verification to on-chain (finalize) execution to improve interoperability and broaden supported signature formats. With on-chain verification, programs can trust externally signed messages and approvals without off-chain helpers, enabling cross-chain messaging, asset flows, multisig/governance, etc. The initial scope focuses on verification with a simple canonical representation and deterministic, consensus-safe behavior, while leaving room to add other schemes and encodings over time.
The core design revolves around the new ecdsa.verify.* instructions that will be available to new programs. In order to support this, we require a lot of supporting features that enable the use of the new signature verification algorithm.
ECDSA
This PR introduces native ECDSA signature verification to on-chain (finalize) execution to improve interoperability and broaden supported signature formats. With on-chain verification, programs can trust externally signed messages and approvals without off-chain helpers, enabling cross-chain messaging, asset flows, multisig/governance, etc. The initial scope focuses on verification with a simple canonical representation and deterministic, consensus-safe behavior, while leaving room to add other schemes and encodings over time.
The list of new ecdsa.verify.<variant> instructions are as follows:
ecdsa.verify.keccak256
ecdsa.verify.keccak256.raw
ecdsa.verify.keccak256.eth
ecdsa.verify.keccak384
ecdsa.verify.keccak384.raw
ecdsa.verify.keccak384.eth
ecdsa.verify.keccak512
ecdsa.verify.keccak512.raw
ecdsa.verify.keccak512.eth
ecdsa.verify.sha3_256
ecdsa.verify.sha3_256.raw
ecdsa.verify.sha3_256.eth
ecdsa.verify.sha3_384
ecdsa.verify.sha3_384.raw
ecdsa.verify.sha3_384.eth
ecdsa.verify.sha3_512
ecdsa.verify.sha3_512.raw
ecdsa.verify.sha3_512.eth
The variant types allow the users to select the underlying hash function used, the serialization type (with .raw), and if the address being verified is a 20-byte Ethereum address. The .raw variants indicate if the message should be serialized in it's raw bit form or with Aleo specific variant bits; this is necessary to ensure compatibility with external signing libraries. By default the .eth variants will serialize the message in it's raw form, so there is no need for an additional .eth.raw suffixed variant. Both .raw and .eth variant messages must be "byte-aligned", meaning that the length of it's bit representation must be a multiple of 8.
Hash Functions
To further interoperability of AVM programs between EVM programs, this PR introduces .native variants of the hash.keccak* and hash.sha3* opcodes that allow the user to output the hash as a bit array. These opcodes do not implicitly perform the BHP hash on the result. The PR also introduces .raw variants use the raw serialization of the pre-image that does not contain any Aleo specific variant bits.
The list of new instructions are as follows:
hash.keccak256.native
hash.keccak384.native
hash.keccak512.native
hash.sha3_256.native
hash.sha3_384.native
hash.sha3_512.native
hash.keccak256.native.raw
hash.keccak384.native.raw
hash.keccak512.native.raw
hash.sha3_256.native.raw
hash.sha3_384.native.raw
hash.sha3_512.native.raw
hash.keccak256.raw
hash.keccak384.raw
hash.keccak512.raw
hash.sha3_256.raw
hash.sha3_384.raw
hash.sha3_512.raw
Note that all .raw variant inputs must be byte-aligned.
Serialization Operations
This PR also introduces serialize.* and deserialize.* opcodes which allow encoding and decoding AVM values to and from bits respectively.
The list of new instructions are as follows:
serialize.bits
serialize.bits.raw
deserialize.bits
deserialize.bits.raw
Increase Array Size Limit to 512
N::MAX_ARRAY_ELEMENTS is updated from 32 to 512. This provides more general flexibility for handling inputs to hash and signature verification functions without having to construct custom structs to get around the existing limitation.
Both transaction and solution broadcast now offer the same broadcast strategy to ensure even when clients are out of sync they may still propagate transactions and solutions.
Moreover, transactions which hit a "global state root not found" errors are still propagated. In all likelihood, these are caused by nodes temporarily being behind. This PR improves the network's UX by letting those transactions propagate anyway.
Improvements for node operators
Further improvements worth mentioning include:
A local peer cache was introduced for client, prover and validator nodes. The cache is stored in the ledger folder, and allows a node to be able to find its previous (high quality) peers again. Ultimately this paves the way for clients not having to manually specify other clients anymore, as after an initial connection via bootstrap peers, they will always be able to find each other again directly. Connections to new nodes are partially guided by whether they are ahead or not.
This PR implements snarkos account import to allow derivation of view key and address from a given private key, allowing easier testing without the use of the leo binary.
This PR introduces a special bootstrap client, which can be enabled by running snarkos start with --bootstrap-client. This client is specialized in facilitating peer list gossip, and doesn’t participate in block syncing.
This PR documents a native backup utility. Node operators should be able to create fast local backups either:
using a JWT, which they can read from a file instead of stdout
explicitly passing in --nojwt, not having to authenticate if they already have a solid firewall and don't want to deal with the complexity of JWT creation and backup
snarkVM is a zkVM library. It powers the Aleo network and most of the software used to interact with it. The following contains some of the most relevant changes which were introduced:
The snarkVM CLI was removed - instead we encourage users to make use of the snarkos developer or leo cli tools.