All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased - ReleaseDate
0.28.0 - 2024-08-09
0.27.1 - 2023-12-02
0.27.0 - 2023-12-02
0.26.0 - 2023-10-13
- Add pretty_print method to ErgoTree and Expr #729
- Reset interpreter env after lambda call #728
0.25.0 - 2023-10-09
- Revamped errro messages for ErgoTree evaluation errors #720
- fix
Coll.slice
to gracefully handle indices out of bounds #725
0.24.1 - 2023-09-20
- add
Coll[Long]
parsing from an array of strings in Wasm APIConstant.from_js
; - impl
From
forEcPoint
;
- updated
wasm-bindgen
with a fix for wrong memory address when exceeding 2GB;
0.24.0 - 2023-05-12
- Introduce Wallet::sign_tx_input; by @greenhat in #689
- Introduce transaction::verify_tx_input_proof by @greenhat in #691
- Tuple expression support in register values by @greenhat in #702
- Include backtrace on error in Expr::check_post_eval_tpe by @greenhat in #713
- enable TC39 weak ref support in wasm-bindgen by @greenhat in #682
- update wasm-pack build command to use --dev profile for *-alpha builds; by @greenhat in #697
- fix wrong AvlTree method ids and missing PropertyCall type specialization by @greenhat in #696
- Store error message in
RegisterValue::Unparseable
and show it on writer-based serialization error by @greenhat in #699
0.23.0 - 2023-02-08
- serde serialization for NetworkAddress #667;
- expose constant value and type in C bindings #669
- Parse tx input's spending proof as either string or struct (explorer API) #671;
- Add FullBlock type #678;
- Validate parsed ErgoTree header, check no bytes left unconsumed after ErgoTree is parsed #684;
- Preserve ContextExtension items order in JSON encoding #687;
- Fix scientific notion deserialization with powSolutions d parameter #668;
0.22.0 - 2022-12-28
- Diffie-Hellman tuple secret support in wallet API #665
- make various types easier to use in multithread environment (remove
Rc
, switch toArc
, implementCopy
, etc.);
0.21.1 - 2022-11-21
ErgoBox::from_box_candidate
in Wasm API #651;
- uparseable register value should not prevent parsing
ErgoBox
from JSON #647; - rename
NonMandatoryRegisters:get
toNonMandatoryRegisters::get_constant
and returnNone
if the register value is unparseable #647; - add
NonMandatoryRegisters:get
returning newRegisterValue
holding either aConstant
or unparseable bytes #647;
0.21.0 - 2022-10-27
- add
type
andexports
fields in package.json #637; - Fix bottom-up and top-down traverals in the prover (affects nested sigma conjectures) #644;
- enable wasm-opt pass, make compiler optional to minimize wasm binary #646;
- Fix field names for
Transaction
,UnsignedTransaction
in EIP-12 format (.to_js_eip12()
) #627;
0.20.0 - 2022-09-07
- increase max tokens allowed in a box to 122 #616;
Transaction::verify_p2pk_input
for P2PK inputs verification #613;Constant::to_js
andfrom_js
arbitrary JS type toConstant
conversion 614;- add IP v6 support in
PeerAddr::as_http_url
#617;
0.19.0 - 2022-08-08
- only allow explicit token burning in
TxBuilder
and add token preservation check #603; - remove
min_value_change
parameter inTxBuilder::new
and add coin preservation check #605;
- fix distributed signing in case a script reduces to
true
#609; - fix
AtLeast
handling in the prover #598; - improve error messages for constant value parsing from JSON (box registers) #600.
0.18.0 - 2022-07-14
- add Address::content_bytes() in Wasm API #582;
- fix
peer_discovery()
in Chrome #584; - fix accidental token burn in change box in box selection process #591
0.17.0 - 2022-06-04
- Swift bindings for MnemonicGenerator #573;
- JSON encoding for TransactionHintsBag type hierarchy #577;
- eliminate
TransactionContext::get_boxes_to_spend()
and introduceTransactionContext::get_input_box(box_id: BoxId) -> Option<ErgoBox>
#574; - move
Header
type fromergotree-ir
toergo-chain-types
#572; - fix JSON encoding for no tokens (empty array); #578;
0.16.1 - 2022-05-04
- Convert vendored dependencies of ergo-rest into sub-modules #571;
0.16.0 - 2022-04-29
- REST API implementation is hidden behind the
rest
feature flag #554;
- arbitrary message signing and verification #553;
PoPowHeader
type #551;TokenId::from_base64
#555;Constant
to/fromTokenId
(Digest32
) conversion #557;TxBuilder::set_context_extension
to set aContextExtension
for a given input #560;- Serialization for NipopowProof #562;
- WASM/swift bindings for message signing/verifying #564;
- Add SUnit variant of SType #566;
- Node discovery via node's REST API #558;
- Add BatchMerkleProof + PoPow Interlink vector verification #538;
- add ErgoBox::tx_id() and index() in Wasm API #561;
0.15.0 - 2022-03-08
- Construct ErgoStateContext using last block headers #450;
AvlTree.remove
#436;AvlTree.update
#443;ReducedTransaction
implementation according to EIP-19 #442AvlTree.get
andAvlTree.getMany
#445;AvlTree.contains
[#437] (#437);LastBlockUtxoRootHash
#452;ExtPubKey
andDerivationPath
with BIP-32,44 and soft derivation support for Ledger #448;- Modulo binary op #460;
treeLookup
predefined function #459;createAvlTree
predefined function #466;ScorexSerializable
, serialization framework of the ergo node #485;Wallet::from_mnemonic
#492;- Peer management for p2p networking #493;
- C/Swift(iOS, macOS) bindings for ergo-lib #468;
- wallet extended secret key derivation #498;
- transaction serialization in Wasm API 506;
- support for
(Int, Int)
,Coll[Coll[Byte]]
,Coll[Int]
andBigInt
types in constant conversion in Wasm API; - mnemonic generation #505;
- arithmetic operations and polynomial interpolation over Galois fields GF(2^192) #496;
- Merkle tree support #521;
- NiPoPoW proof verification #517;
- distributed signatures support #470;
- fix
elem_tpe
inAppend
andSlice
evaluation #455 - fix
CollKind::elem_tpe
#457; - fix a bug with self box lookup in TransactionContext and added checks for box resolution in tx inputs and data_inputs #462;
- audit and remove unwraps and panics in ergo-lib #467;
- fix missing ContextExtenion support #458;
- make
BoxSelection::boxes
of non-empty type #471; - check for allowed ops in
Coll.flatMap
lambda #472; - missing
SGlobal.xor
,groupGenerator
method eval #523;
0.14.0 - 2021-10-07
Header
properties #433;PreHeader
properties #435;AvlTree
properties #432;AvlTree.insert
#413;SubstConstants
#410;Box.bytesWithoutRef
#409;Downcast
#408;Address::P2SH
support #407;Context.selfBoxIndex
#405;- Ensure JSON parsing for explorer API #398;
Box.bytes
#390;- add (Coll[Byte], Coll[Byte]) and (Long, Long) support for Constant conversion in JS #386;
- add
ErgoBox::serialized_additional_registers()
in Wasm #387; - add
Transaction::from_unsigned_tx()
to construct from unsigned tx + proofs #387; - extract distinct token ids on tx serialization and expose as
UnsignedTransaction::distinct_token_ids()
in Wasm #387; - add
to_bytes()
forBoxValue
andTokenAmount
in Wasm #387; Constant::sigma_serialize_bytes()
,ContextExtension::sigma_serialize_bytes()
in Wasm #387;TokenId::as_bytes()
andBoxId::as_bytes()
in Wasm #387;- add (Coll[Byte], Coll[Byte]) and (Long, Long) support for Constant conversion in JS #386;
- Serialization for
SigmaBoolean
types #341; - Diffie-Hellman tuples support in sigma protocol #315;
Coll.zip
#350;BigInt256
256-bit BigInt #325;- Logical XOR #349;
groupGenerator
global variable #340;GroupElement.getEncoded
method for GroupElement #335;Negate
IR node for GroupElement #334;Exponentiate
IR node for GroupElement #321;- WASM
to_js_eip12()
(alongto_json()
) that encodes JSON according to EIP-12 (similar to JSON byto_json()
, but box value and token amount encodes as strings to avoid accuracy loss in JS) #346; Coll.slice
#309;- Byte-wise XOR for byte arrays #310;
Constant::from_i64_str_array
andto_i64_str_array
forColl[Long]
encoding #311;Coll.append
#308;MultiplyGroup
IR node for GroupElement #316;SubstConst
IR node and serialization [#318] (#318);- Better Debug print for EC point #319;
Constant::from_ecpoint_bytes
to Wasm API #324;Constant::to/from_ergo_box
to Wasm API #397;
- WASM
to_json()
returns string (instead ofJsValue
) to avoid silent accuracy loss on JS object -> text conversion on JS side #346; SigmaSerializable:sigma_serialize_bytes
made failible (returnsResult
) #328;ErgoBox::new
,from_box_candidate
made failible (returnsResult
) #328;ErgoTree::new
,template_bytes
,to_base16_bytes
made failible (returnsResult
) #328;Transaction::new
made failible (returnsResult
) #328;- WASM
ErgoBox::new
,byte_to_sign
made failible (returnsResult
) #328; - WASM
ErgoTree::to_bytes
,to_base16_bytes
made failible (returnsResult
) #328; ErgoTree::to_bytes()
renamed toErgoTree::sigma_serialize_bytes()
in Wasm #387;ErgoBox
and other types that it uses moved toergotree_ir
crate and re-exported inergo_lib::ergotree_ir
#397;
- Switched to
ThreadRng
CSPRNG for source of randomness in sigma protocol #315; SigmaSerializable:sigma_serialize
errors are extended beyondio::Error
#328;ergotree-ir::mir::constant::constant_placeholder
module is public;ErgoTree::set_constant
is removed in favor ofErgoTree::with_constant
with an added check for matching constant type#323;- Eliminate and ban panics (unwrap, panic!, todo!, etc) in
sigma-ser
,ergotree-ir
andergotree-interpreter
crates #328, #344;
0.13.3 - 2021-06-11
- Implement CalcSha256 op for byte arrays #303;
- Parsing of
UnsignedTransaction
from JSON #304;
0.13.2 - 2021-06-09
- AND, OR conjecture support in sigma protocol #226;
- Support for ErgoTree header v1 with tree size #281;
- Add support for explorer v1 JSON format parsing for
BlockHeader::votes
#285; - Add bitwise binary operators (&|^) #290;
- make
ergotree_ir::serialization::constant_store
module public; Peekable
trait is removed insigma_ser
crate #284;
- change
MINER_PUBKEY
type toColl[Byte]
#291; - Make BigInt arithmetic ops check for 256-bit overflow #294;
- Fix numeric negation to give an error on overflow #294;
0.13.1 - 2021-05-28
- Fix VQL encoding/decoding for signed ints in ranges i32::MIN..-1073741825 and 1073741824..i32::MAX #263;
0.13.0 - 2021-05-26
- add
ErgoTree::template_bytes
#274;
- encode/decode
UnsignedTransaction
withoutid
and usingErgoBoxCandidate
foroutputs
instead ofErgoBox
#275;
0.12.0 - 2021-05-20
- add
Transaction::outputs()
returningErgoBoxes
#267;
- rename
Transaction::outputs()
andUnsignedTransaction::outputs()
tooutput_candidates()
in WASM (both returnErgoBoxCandidates
) #267;
- fix input box lookup on tx signing#268;
0.11.0 - 2021-05-19
ByteArrayToLong
ByteArrayToBigInt
LongToByteArray
IR nodes #244;ErgoTree::constants_len
,get_constant
,set_constant
API for accessing the constants list inErgoTree
#261;
0.10.0 - 2021-04-22
- Add MinerPubKey and Global as global variables #232;
- Implement parser and evaluator for DH tuple #233;
- Add method descriptions for SContext (serialization) #235
- Implement GetVar #236
- Implement Atleast IR node (serialization) #237
- Implementation of Deserialize{Context,Register} (serialization) #239
- WASM: fix DataInput construction, ErgoStateContext construction from parsed JSON block headers #238
- Explicitly handle errors in SMethod::from_ids & and PropertyCall deserialization #231;
- Fix flatmap method & GET_VAR opcode #234;
0.9.0 - 2021-04-09
Coll.indexOf
,flatMap
,forall
IR nodes (evaluation, serialization) #220;- Complete types serialization implementation #223;
Tuple
constructor evaluation and serialization #223;- Type unification (
SMethod
specialization) #225; SigmaAnd
,SigmaOr
serialization #225;Contract::ergo_tree()
in WASM API;decodePoint
IR node (evaluation and serialization) #227;
0.8.0 - 2021-03-22
proveDlog
,box.creationInfo
,Box.id
,Coll.exists
,SigmaProp.propBytes
,Option.isDefined
,Option.getOrElse
IR nodes (evaluation, serialization) #209;Box.R0..R3
register access #213;-
negation for numeric types evaluation and serialization #214;- BigInt values support, arithmetic operations (
+, -, *, /
),-
negation,Upcast
#216;
0.7.0 - 2021-03-03
- ErgoScript compiler pipeline draft (
ergoscript-compiler
crate) and added a feature(default) "compiler" inergo-lib
with compiler exposed viaContract::compile(source)
; ErgoTree:to_base16_bytes()
returns Base16-encoded serialized bytes;
- Extract Ergotree IR with serialization from
ergo-lib
crate intoergotree-ir
crate; - Extract ErgoTree IR interpreter from
ergo-lib
crate intoergotree-interpreter
crate;
0.5.1 - 2021-02-17
- Explorer v1 API support for box register parsing #197;
0.5.0 - 2021-02-04
CalcBlake2b256
IR node evaluation and serialization #179;- Arith ops (
+, -, *, /
) IR node evaluation and serialization #181; - Comparison ops (
>, >=, <, <=
) IR node evaluation and serialization #182; AND
,Collection
(collection declaration),BinAnd
IR nodes evaluation and serialization #183;Or
,BinOr
IR nodes evaluation and serialization #184;LogicalNot
IR nodes evaluation and serialization #185;Map
,Filter
IR nodes evaluation and serialization #186;BoolToSigmaProp
,If
,Min
,Max
IR nodes evaluation and serialization #187;ByIndex
,Box.tokens
IR nodes evaluation and serialization #188;
0.4.4 - 2021-01-20
BlockValue
,ValDef
,ValUse
,FuncValue
,Apply
IR nodes evaluation and serialization #171;SimpleBoxSelector
: sort inputs by target tokens and skip inputs that does not have target tokens #175;Fold
(collection),ExtractAmount
(Box.value
),SelectField
(tuple field access) IR nodes evaluation and serialization #173
0.4.3 - 2021-01-15
SType::STuple()
andValue::Tup()
types to store tuples. Implemented serialization, conversion between Rust types andConstant
(Value
,SType
) #166;EQ(==)
,NEQ(!=)
implementation #166;
0.4.2 - 2020-12-21
- Interpreter: Box.Rx properties (get register value), OptionGet #163;
- Interpreter: added global vars (
INPUTS
,OUTPUTS
,SELF
,HEIGHT
),Context
properties (dataInputs
) #155; - Explorer API v1 format parsing for box.additionalRegisters #161;
0.4.1 - 2020-11-19
- Support for parsing ErgoBox transaction id from
txId
JSON field name;
0.4.0 - 2020-11-19
- Support for parsing ErgoBox id also from "id" JSON field name #134
- Address::p2pk_from_pk_bytes to make an Address from serialized PK #136
- Address::from_str to parse an Address without checking the network prefix #136
- Address::recreate_from_ergo_tree to re-create the address from ErgoTree (built from the address) #146
- NetworkAddress to store Address + NetworkPrefix #146
- Move and changed visibility of various modules(input, data_input, prover_result, etc.) #135
- Add Context parameter to Prover::prove, Verifier::verify #139
- Move all transaction-related parameters into TransactionContext parameter in Wallet::sign_transaction #139
- Move Constant export from crate root to constant module (ast::constant) and made eval module private #142
- Make SType public #142
0.3.0 - 2020-11-04
- Add value extraction API for Constant (e.g i64::try_extract_from(constant)) #111.
- Implement From for DataInput #113.
- Add data inputs to TxBuilder #115.
- Read/Write register values in ErgoBox, ErgoBoxCandidate #116.
- Add tokens support in TxBuilder and ErgoBoxCandidateBuilder #118.
- Implement JSON encoding/decoding for UnsignedTransaction #123.
- Add TxBuilder::estimate_tx_size_bytes() to get estimated serialized transaction size in bytes after signing (assuming P2PK box spending); tx_builder::SUGGESTED_TX_FEE constant with "default" current tx fee used lately (1100000 nanoERGs); #128.
- Add checks when minting token for minting token exclusivity and registers overwrite #129.
- Add transaction validity checks in TxBuilder #130.
- Use TokenAmount instead of u64 in sum_tokens*() #130.
- Add TokenAmount::checked*() ops #130.
- Add I64::as_num() in WASM bindings #130
- box_id, box_value and register modules made private in ergo_box module and all types are re-exported from ergo_box module itself #131.
0.2.0 - 2020-10-06
- Binary serialization;
- JSON serialization;
- Box, Transaction building;
- Transaction signing (P2PK only);
- ErgoTree constant values conversion.