Skip to content

Releases: starkware-libs/cairo-lang

v0.9.0

06 Jun 13:36
Compare
Choose a tag to compare
v0.9.0 Pre-release
Pre-release

StarkNet:

  • Enforce fees - max_fee must not be set to zero, and selector must be __execute__
  • Split the concepts of contract class and contract instance. See here
    • Add declare transaction type
    • New API and CLI commands:
      • declare - Declares a contract class
      • get_class_by_hash - Returns the contract class given its hash
      • get_class_hash_at - Returns the class hash for a given contract instance address
    • Rename delegate_call to library_call, and change the contract address argument to class hash. See here
  • Add a deploy system call. See here
  • Rename ContractDefinition to ContractClass
  • Reduce the compiled contract file's size by removing unnecessary identifiers (this optimization can be disabled using --dont_filter_identifiers)

Cairo:

  • Initial support for the "EC-op" builtin (scalar multiplication over the STARK curve). Not supported in StarkNet yet.
  • Add additional helper methods to blake2s.cairo, including big-endian support
  • Technical changes:
    • Change function's return type from a struct to a named tuple. In particular, foo.Return.SIZE is no longer supported.

v0.8.2

10 May 08:15
Compare
Choose a tag to compare
v0.8.2 Pre-release
Pre-release

StarkNet:

  • Performance improvements in the get_block and get_state_update APIs
  • Fix a bug in the block hash response of get_block
  • Add gas_price and sequencer_address fields to block info
  • Add an option to explicitly pass latest in the blockNumber argument (you can pass latest or pending in addition to a block number).

Cairo:

  • New library functions:
    • keccak hash function - Cairo implementation
    • secp256k1 ECDSA (Ethereum compatible signature verification) - Cairo implementation
  • Auto-formatting of multiline tuple types

v0.8.1

06 Apr 07:39
Compare
Choose a tag to compare
v0.8.1 Pre-release
Pre-release

StarkNet:

  • API changes (breaking changes):
    • Convert the transaction's signature field to hex in the response objects
    • Add class_hash to DeploySpecificInfo
  • Fees:
    • Change the way transaction fee is computed to include L1 operations and system call costs
    • Use L1 data to obtain gas prices in ETH

Cairo:

  • Change the auto-formatting of function arguments to an argument-per-line mode (unless all arguments fit into a single line). Use --no_one_item_per_line for the old formatting.
  • Bug fixes:
    • A bug that prevented declaring local variables inside a with_attr statement
    • A bug that prevented using cairo-lang with python3.9

v0.8.0

14 Mar 10:16
Compare
Choose a tag to compare
v0.8.0 Pre-release
Pre-release

StarkNet

  • Support paying fees for transactions
  • System calls:
    • Add transaction hash and chain id to the TxInfo struct. See here
  • API:
    • estimate_fee
    • get_transaction_trace - shows the internal calls executed by the transactions in a tree structure. See here
    • get_transaction returns a new field max_fee and the calldata field was changed from decimal to hex
  • Add an option to cancel an L1->L2 message. See here
  • Testing framework:
    • Add replace_abi() function (useful for the proxy pattern)
  • Technical changes:
    • Add version and max_fee fields to the transaction hash
    • Account contracts should have an __execute__ function. To compile a contract with such an external function, you should pass the --account_contract flag to the compiler.

Cairo:

  • Syntax:
    • Add new operator. See here
    • Add named tuple types. See here
    • Add type aliases. See here
    • Support escape sequences in short strings (currently, only \x**)
    • Add codeoffset type for labels
    • Support negative values in dw statements
    • Forbid using nondet in references (since it may lead to unexpected behavior)
  • Standard library:
    • Add blake2s to the common library. See here
    • New functions: horner_eval and usort
    • Rename small_merkle_tree to small_merkle_tree_update
  • Other:
    • Support including local variables and arguments in error messages. See here

v0.7.1

16 Feb 09:05
Compare
Choose a tag to compare
v0.7.1 Pre-release
Pre-release

StarkNet:

Cairo:

  • Support felt* in nondet expressions.

v0.7.0

18 Jan 12:39
Compare
Choose a tag to compare
v0.7.0 Pre-release
Pre-release

StarkNet:

Cairo:

v0.6.2

13 Dec 08:46
Compare
Choose a tag to compare
v0.6.2 Pre-release
Pre-release

StarkNet:

  • Split PENDING status into PENDING and ACCEPTED_ON_L2.
  • StarkNet CLI: Renamed "alpha" network to "alpha-goerli".
  • Storage variables support felts-only types (structs and tuples that don't contain pointers).

Cairo:

  • Uint256 bitwise functions are now using the bitwise builtin (making them much more efficient).

v0.6.1

29 Nov 07:54
Compare
Choose a tag to compare
v0.6.1 Pre-release
Pre-release

StarkNet:

  • Support the alpha-mainnet network in the starknet CLI (use --network=alpha-mainnet or STARKNET_NETWORK=alpha-mainnet)

v0.6.0

17 Nov 12:28
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

StarkNet:

  • Replace block id with block hash (not verified by the OS yet)
  • Add constructor arguments to the computation of the contract's address
  • Add get_transaction_receipt command to the starknet CLI
  • New system calls:
    • get_contract_address - returns the address of the current contract
    • get_sequencer_address - this may be used in the future for paying fees
    • delegate_call - partial support

Cairo:

  • Add dw keyword for defining constant arrays

v0.5.2

10 Nov 08:27
Compare
Choose a tag to compare
v0.5.2 Pre-release
Pre-release

Cairo

  • In simple cases that do not involve if blocks and jumps, the compiler can automatically decide to create local variables for references that would have otherwise been revoked.