Releases: ProvableHQ/leo
v2.4.1
Announcements
Check out our new workshop and try out the Leo debugger!
What's Changed
- Fix windows release CI. by @d0cd in #28470
- Typecheck block.height. by @mikebenfield in #28474
- chore: remove redundant words and fix some typos in comment by @cuibuwei in #28467
- Fix futures by @mikebenfield in #28469
- Debugger. by @mikebenfield in #28441
- [Fix] Select fee based on consensus height by @d0cd in #28473
New Contributors
Full Changelog: v2.4.0...v2.4.1
v2.4.0
What's Changed
- [Fix] Improve Leo release CI by @d0cd in #28462
- Error on futures in arrays, structs, or mappings. by @mikebenfield in #28466
- [Update] snarkVM rev to v1.1.0 by @d0cd in #28468
Full Changelog: v2.3.1...v2.4.0
v2.3.1
What's Changed
- Bump anyhow from 1.0.88 to 1.0.89 by @dependabot in #28350
- [Format] Update to latest nightly format recommendations. by @d0cd in #28367
- Address clippy lints. by @mikebenfield in #28374
- Bump thiserror from 1.0.63 to 1.0.64 by @dependabot in #28357
- Bump regex from 1.10.6 to 1.11.0 by @dependabot in #28359
- Bump tempfile from 3.12.0 to 3.13.0 by @dependabot in #28360
- Add function inputs to the type table. by @mikebenfield in #28373
- Bump clap from 4.5.17 to 4.5.19 by @dependabot in #28368
- Bump reqwest from 0.12.7 to 0.12.8 by @dependabot in #28362
- Display Type::Boolean as
bool
, notboolean
. by @mikebenfield in #28380 - Bump clap from 4.5.19 to 4.5.20 by @dependabot in #28385
- Require comma separators (and nothing else) between struct members. by @mikebenfield in #28381
- [Refactor] Remove
examples
and add it back in as a submodule by @d0cd in #28384 - hex and binary literals for integers. by @mikebenfield in #28383
- Clean up dependencies. by @mikebenfield in #28382
- Turn off LTO for dev and test builds. by @mikebenfield in #28397
- Fix help messages for command line options. by @mikebenfield in #28396
- only_testnet feature. by @mikebenfield in #28398
- Fixes to clap CLI code. by @mikebenfield in #28400
- Improve handling of guards while flattening. by @mikebenfield in #28392
- More cli fixes. by @mikebenfield in #28407
- Remove unused '.out' expectations files. by @mikebenfield in #28404
- Test format by @mikebenfield in #28412
- Bump serde from 1.0.210 to 1.0.211 by @dependabot in #28415
- Bump anyhow from 1.0.89 to 1.0.90 by @dependabot in #28408
- Consistently make 1 empty line between output items in codegen. by @mikebenfield in #28413
- Bump anyhow from 1.0.90 to 1.0.91 by @dependabot in #28420
- Bump serde from 1.0.211 to 1.0.213 by @dependabot in #28419
- Bump thiserror from 1.0.64 to 1.0.65 by @dependabot in #28418
- Handle closures that are invalid for Aleo. by @mikebenfield in #28417
- Don't panic when outputting TOML arrays in test failures. by @mikebenfield in #28421
- [Docs] Fix broken links by @d0cd in #28422
- Bump regex from 1.11.0 to 1.11.1 by @dependabot in #28423
- Bump reqwest from 0.12.8 to 0.12.9 by @dependabot in #28426
- Bump serde from 1.0.213 to 1.0.214 by @dependabot in #28427
- [CI] Move integration tests to CircleCI by @d0cd in #28414
- [Fix] Update HTTP headers in Leo CLI. by @d0cd in #28438
- Update MSRV; disallow long IDs by @mikebenfield in #28434
- Disallow local variables from shadowing functions, structs, mappings,… by @mikebenfield in #28433
- [Feature] CLI Update Notification. by @d0cd in #28440
- [Fix] Introduce
StaticAnalysis
pass and add checks on usage of async code for safety. by @d0cd in #28443 - [Fix] Minor fixes to Leo CI. by @d0cd in #28450
New Contributors
- @mikebenfield made their first contribution in #28374
Full Changelog: v2.3.0...v2.3.1
v2.3.0
What's Changed
- Bump reqwest from 0.12.5 to 0.12.7 by @dependabot in #28337
- Bump clap from 4.5.16 to 4.5.17 by @dependabot in #28336
- Bump backtrace from 0.3.73 to 0.3.74 by @dependabot in #28341
- Bump anyhow from 1.0.86 to 1.0.87 by @dependabot in #28340
- Bump serde from 1.0.209 to 1.0.210 by @dependabot in #28339
- Update API endpoint. by @d0cd in #28342
- Bump anyhow from 1.0.87 to 1.0.88 by @dependabot in #28348
- Update error messaging to account for redirects from APIs by @d0cd in #28349
- Update to the lastest snarkVM version. by @d0cd in #28352
Full Changelog: v2.2.0...v2.3.0
v2.2.0
What's Changed
- Bump serde from 1.0.204 to 1.0.207 by @dependabot in #28319
- Bump clap from 4.5.13 to 4.5.15 by @dependabot in #28318
- [Fix] Futures in Tuples by @evan-schott in #28316
- Bump ureq from 2.10.0 to 2.10.1 by @dependabot in #28314
- Bump assert_cmd from 2.0.15 to 2.0.16 by @dependabot in #28313
- Bump tempfile from 3.11.0 to 3.12.0 by @dependabot in #28310
- Update and improve some parser documentation. by @acoglio in #28320
- allow non-leo files to be in src folder by @ungaro in #28322
- Bump serde from 1.0.207 to 1.0.208 by @dependabot in #28325
- Bump clap from 4.5.15 to 4.5.16 by @dependabot in #28324
- Remove --seed flag from account sign command by @Meshiest in #28323
- small error formatting improvements by @ungaro in #28326
- Bump serde from 1.0.208 to 1.0.209 by @dependabot in #28329
- [Feature] Add deployment summary with comma-formatted variables and constraints counts. by @ungaro in #28330
- Update license header, Cargo metadata, and snarkVM rev. by @d0cd in #28334
New Contributors
Full Changelog: v2.1.0...v2.2.0
v2.1.0
chore(leo): bump version for new release
v2.0.0
v1.12.0
Announcements
- Leo v1.12.0 will be the last
testnet3
compatible version of Leo.
Language
Remove deprecation warning for leo build
Add opcode support for self.address, network.id and hello.aleo
Fix conditional execution in finalize
Fix external struct usability
CLI
Compatibility Notes
Internal Changes
Other
v1.11.0
Enhanced Dependency System
The latest update dramatically simplifies the development of Leo projects with enhanced support for external calls to both on-chain and local programs.
- Breaking Change: Now use import foo.aleo instead of import foo.leo, and attach the dependency using the CLI.
- New
.aleo/registry
structure in the~/.aleo
file system to store.aleo
files from the Aleo network. - Ability to automatically retrieve network dependencies and build complicated nested dependency structures.
// Pull credits.aleo as a dependency
leo add -n credits
// Add a local dependency named foo.aleo at path ../foo
leo add -l ../foo foo
// Attach dependencies in the Leo file
import credits.aleo
import foo.aleo
Reading External Mappings
Leo allows users to read external mappings.
let val:u32 = Mapping::get(token.aleo/account, 0u32);
let val_2:u32 = Mapping::get_or_use(token.aleo/account, 0u32, 0u32);
Relaxed Shadowing
Local mapping, struct, record and function names can now overlap with external objects.
let bar: hello.aleo/foo = bye.aleo/foo(foo {a: 1u32, b: 1u32});
v1.10.0
This release contains:
SHA3
hash functions.Keccak
hash functions.- Constant declarations.
self.signer
andself.caller
.- compatibility updates with snarkVM 0.16.1.
SHA3 and Keccak
Leo supports 235, 384, and 512 bit variants for SHA3
and Keccak
.
let a: address = SHA3_256::hash_to_address(input);
let b: u8 = SHA3_384::hash_to_u8(input);
let c: field = SHA3_512::hash_to_field(input);
let d: group = Keccak256::hash_to_group(input);
let e: i8 = Keccak384::hash_to_i8(input);
let d: u16 = Keccak512::hash_to_u16(input);
Constant Declarations
Leo allows users to declare global and local constants.
const START: u8 = 0u8;
self.signer
and self.caller
Leo supports:
self.signer
, which is the user that originated the program call.self.caller
, which is the user or program that called the current function.
Suppose that a user
calls program A
which calls program B
.
In program A:
self.signer
isuser
.self.caller
isuser
.
In program B
:
self.signer
isuser
.self.caller
isA
.
Note what was previously self.caller
is now self.signer
.