- fixed the dependency contract constructors which were spilled to
input.json
- fixed the toolset version check during project downloading
- fixed incorrect multi-line comment location tracking in some cases
- fixed the bug where contract instance aggregation caused a stack underflow
- fixed the false-positive type errors in some conditionals
- fixed the incorrect storage address output after manual VM runs
- fixed interface descriptions and help messages
- added the
Contract::fetch
function description - added the
std::collections::MTreeMap
initialization example - fixed some obsolete information
- implemented the Rust-like dependency system
- added the library project type
- allowed to create and use other smart contract instances using the dependency system
- extended the attribute syntax to set the
zksync::msg
variable in unit tests - turned the
zksync::transfer
function into a built-in contract method
- fixed the bug with invalid scope for contract fields and methods
- fixed the bug where enum variants were not treated as constants
- fixed the bug where contract storage fields could be addressed without an instance
- fixed the bug where structures and contracts could be initialized with fewer fields than needed
- performed an inventory of compiler errors and created an error reference
- prevented contract storage and zkSync side effects in false condition branches
- fixed circuit unit tests
- replaced the
Exit
instruction withReturn
- disabled the proof verification tools, as they are temporarily unsupported
- initial deposits for contract publishing are not required anymore
- fixed the segmentation fault during HTTP requests on Linux
- added the smart contract troubleshooting chapter
- added the dependency system chapter
- merged
zinc_build
andzinc_zksync
intozinc_types
,zinc_source
andzinc_manifest
intozinc_project
General
- implemented the module system with access to the root and parent modules
- allowed declaring constants, types, functions, and modules in arbitrary order
- added aliases to the
use
import statement - implemented unit-testing functionality
- renamed the
assert!
function torequire
Object-oriented
- added methods with by-value
self
instance parameter - added the syntax sugar for calling methods via the dot
.
operator
Compile-time
- extended constant expressions with arrays, tuples, structures, blocks, conditionals, and matches
- implemented primitive constant functions
Expressions
- fixed the issue where operations on enums could result into an invalid variant
- allowed bitwise operations on non-constant and witness values
- forbidden bitwise operations on signed integers and fields
- implemented the type inference for integer literals in expressions
- added the exponent notation of integer literals
- implemented declaration of multiple variables via tuple destructuring
- removed the mandatory semicolon after block, conditional, and match expressions
- fixed the bug where namespace items where resolved from outside the namespace
- fixed the bug where the type of
match
enumeration variant path pattern used to be unchecked - fixed the bug where a structure could be initialized without fields
- implemented the per-entry dead code elimination optimization for unreachable functions
- implemented the short-circuiting boolean expressions evaluation
- improved some error messages
- added the overflow checking and
enum
validation for input JSON files - allowed witness array indexes without constraints
- improved some error messages
- generalized for managing both circuit and smart contract projects
- improved some commands and default values to decrease redundancy
- added some commands for publishing and working with smart contracts
- taught Zargo to mimic Cargo more accurately
- added doc comments for the entire project using
missing_docs_*
lints - moved some shared data to crates:
zinc_logger
zinc_const
zinc_math
zinc_manifest
zinc_source
zinc_types
zinc_types
- implemented basic smart contracts
- developed the Zandbox application for publishing and running smart contracts
- forbidden the division operator
/
, but implementedstd::ff::invert
forfield
inversion - allowed casting to types with lesser bitlength (runtime error on overflow)
- added the bitwise operators
|
,|=
,^
,^=
,&
,&=
,<<
,<<=
,>>
,>>=
,~
(constant expressions only) - added the binary (e.g.
0b101010
) and octal (e.g.0o52
) integer literals - implemented match exhaustiveness checking without the binding or wildcard pattern
- removed
static
statements for global variables (useconst
instead) - limited
match
scrutinee expression to boolean and integer only, since it is impossible to destructure complex types for now - reserved some keywords (see Appendix C of the Zinc book)
- fixed the bug with
!
while passing a non-builtin function call as a built-in one's argument - fixed the bug with duplicate match expression branches
- added a wrapper directory to the release archives to prevent tar- and zip-bombs
- added the Schnorr signature verification to the standard library
- made enumerations strongly typed, not just groups of constants
- match scrutinee can be any expression again (including structure literals)
- implemented automatic loop bounds range type upcasting
- implemented arithmetic assignment operators (
+=
,-=
,*=
,/=
,%=
) - allowed constant expressions as array sizes (both types and literals)
- field division (i.e. multiplication by inverted value)
- field comparison (treated as unsigned numbers)
- implemented advanced errors with Rust-like formatting, hints, location pointers
- added constant overflow checking at compile-time
- the constant expression Euclidean division and remainder now work just like in VM
- fixed 'unconstrained' variables in hash functions
- fixed constraint generation when the same variable is encountered multiple times in the same expression
- fixed some type errors
- optimized constraint generation for deterministic expressions
- added the Schnorr signature tool
- fixed the compile error with a comment at the end of a file
- added an empty statement to allow optional semicolons
- the structure literal does not require the
struct
keyword anymore dbg!(...)
string interpolation, e.g.dbg!("{} + {} = {}", 2, 2, 4)
;assert!(...)
now accepts an optional string message as the 2nd argument- match scrutinee expression now can only be a single identifier (will be fixed soon)
- operators
/
,%
,>=
,>
,<=
,<
are temporarily forbidden for the typefield
- the 'run' command now builds the circuit before running
- added the 'proof-check` command, which executes the sequence 'build + setup + proof + verify'
- circuit data (keys, inputs, outputs) moved from
build
todata
folder
- fixed many boundaries of integer types
- fixed the loop range overflow in some edge values of integer types
- fixed the invalid operand order bug in some cases
- fixed conflicting namespaces for functions and types with the same name
- improved some error messages
- fixed
pedersen
hash - fixed unsigned integers division
- fixed the
while
condition - fixed the function argument order in some
std
functions - made the
std::convert::from_bits_signed
result two-complement - pretty error reporting with file, line, and column
- improved some error messages
- removed the redundant 'field' and 'value' keys from the structure type in input JSON templates
- full integration test coverage
- improved logging
Internal dogfooding/testing release
Initial release