Skip to content

Commit

Permalink
v0.3.1: Göttingen release (aka June release) (#1404)
Browse files Browse the repository at this point in the history
* v0.3.1 Göttingen

### Added
- Write environment configuration into Substrate metadata. [xermicus](https://github.com/xermicus)
- Tornado cash as an exemplary integration test for Substrate chain extensions. [xermicus](https://github.com/xermicus)
- `is_contract` runtime API is available as a builtin for Substrate. [xermicus](https://github.com/xermicus)
- The `wasm-opt` optimizer now optimizes the Wasm bytecode on the Substrate target. [xermicus](https://github.com/xermicus)
- Call flags are now available for Substrate. [xermicus](https://github.com/xermicus)
- Read compiler configurations from toml file. [salaheldinsoliman](https://github.com/salaheldinsoliman)
- Accounts declared with `@payer(my_account)` can be accessed with the
  syntax `tx.accounts.my_account`. [LucasSte](https://github.com/LucasSte)
- `delegatecall()` builtin has been added for Substrate. [xermicus](https://github.com/xermicus)
- `get_contents_of_file_no` for Solang parser. [BenTheKush](https://github.com/BenTheKush)
- `set_code_hash()` builtin has been aded for Substrate. [xermicus](https://github.com/xermicus)

### Fixed
- Diagnostics do not include large numbers anymore. [seanyoung](https://github.com/seanyoung)
- Correctly parse and resolve `require(i < 2**255)`. [seanyoung](https://github.com/seanyoung)
- Virtual function are available for call. [xermicus](https://github.com/xermicus)
- Allow `.wrap()` and `.unwrap()` user defined type methods in constants. [xermicus](https://github.com/xermicus)
- `@inheritdoc` now works with bases of bases. [seanyoung](https://github.com/seanyoung)
- Allow destructures to assign to storage variables. [seanyoung](https://github.com/seanyoung)
- Do not allow push and pop in fixed length arrays. [LucasSte](https://github.com/LucasSte)
- Improve unused variable elimination to remove unused arrays. [LucasSte](https://github.com/LucasSte)
- Salt argument should be of type `bytes32`. [seanyoung](https://github.com/seanyoung)
- Allow return vallues to be ignored in try-catch statements. [seanyoung](https://github.com/seanyoung)
- Optimize modifiers' CFGs. [xermicus](https://github.com/xermicus)
- Fix an error whereby building large contracts would cause an LLVM error. [LucasSte](https://github.com/LucasSte)
- A constructor for a Solana contract cannot run twice on the same data account. [seanyoung](https://github.com/seanyoung)
- Split the `call` and `deploy` dispatches on Substrate. [xermicus](https://github.com/xermicus)

### Changed
-  Minimum Supported Rust Version (MSRV) is Rust `1.68`.
- `@payer` annotation declares an account in a constructor. [LucasSte](https://github.com/LucasSte)
- Do not allow `.call()` functions in functions declared as view. [seanyoung](https://github.com/seanyoung)
- Storage accessor function matches solc, and returns struct members if the sole return value is a single struct [seanyoung](https://github.com/seanyoung)
- **breaking** Constructor annotations above a constructor can either declare an account or receive a literal parameter. [LucasSte](https://github.com/LucasSte)
  ```
  contract MyContract {
    @payer(acc) // Declares account acc
    @space(2+3) // Only literals or constant expressions allowed
    @seed(myseed) // NOT ALLOWED
    constructor(bytes myseed) {}
  }
  ```
- Annotations placed before constructor arguments refer to the latter. [LucasSte](https://github.com/LucasSte)
  ```
  contract MyContract {
    @payer(acc) // Declares account acc
    @space(2+3) // Only literals or constant expressions allowed
    constructor(@seed bytes myseed) {}
    // When an annotations refers to a parameter, the former must appear right before the latter.
  }
  ```

Signed-off-by: Lucas Steuernagel <[email protected]>

---------

Signed-off-by: Lucas Steuernagel <[email protected]>
  • Loading branch information
LucasSte authored Jun 30, 2023
1 parent 94cff8f commit 002954d
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 11 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,61 @@
All notable changes to [Solang](https://github.com/hyperledger/solang/)
will be documented here.

## v0.3.1 Göttingen

### Added
- Write environment configuration into Substrate metadata. [xermicus](https://github.com/xermicus)
- Tornado cash as an exemplary integration test for Substrate chain extensions. [xermicus](https://github.com/xermicus)
- `is_contract` runtime API is available as a builtin for Substrate. [xermicus](https://github.com/xermicus)
- The `wasm-opt` optimizer now optimizes the Wasm bytecode on the Substrate target. [xermicus](https://github.com/xermicus)
- Call flags are now available for Substrate. [xermicus](https://github.com/xermicus)
- Read compiler configurations from toml file. [salaheldinsoliman](https://github.com/salaheldinsoliman)
- Accounts declared with `@payer(my_account)` can be accessed with the
syntax `tx.accounts.my_account`. [LucasSte](https://github.com/LucasSte)
- `delegatecall()` builtin has been added for Substrate. [xermicus](https://github.com/xermicus)
- `get_contents_of_file_no` for Solang parser. [BenTheKush](https://github.com/BenTheKush)
- `set_code_hash()` builtin has been aded for Substrate. [xermicus](https://github.com/xermicus)

### Fixed
- Diagnostics do not include large numbers anymore. [seanyoung](https://github.com/seanyoung)
- Correctly parse and resolve `require(i < 2**255)`. [seanyoung](https://github.com/seanyoung)
- Virtual function are available for call. [xermicus](https://github.com/xermicus)
- Allow `.wrap()` and `.unwrap()` user defined type methods in constants. [xermicus](https://github.com/xermicus)
- `@inheritdoc` now works with bases of bases. [seanyoung](https://github.com/seanyoung)
- Allow destructures to assign to storage variables. [seanyoung](https://github.com/seanyoung)
- Do not allow push and pop in fixed length arrays. [LucasSte](https://github.com/LucasSte)
- Improve unused variable elimination to remove unused arrays. [LucasSte](https://github.com/LucasSte)
- Salt argument should be of type `bytes32`. [seanyoung](https://github.com/seanyoung)
- Allow return vallues to be ignored in try-catch statements. [seanyoung](https://github.com/seanyoung)
- Optimize modifiers' CFGs. [xermicus](https://github.com/xermicus)
- Fix an error whereby building large contracts would cause an LLVM error. [LucasSte](https://github.com/LucasSte)
- A constructor for a Solana contract cannot run twice on the same data account. [seanyoung](https://github.com/seanyoung)
- Split the `call` and `deploy` dispatches on Substrate. [xermicus](https://github.com/xermicus)

### Changed
- Minimum Supported Rust Version (MSRV) is Rust `1.68`.
- `@payer` annotation declares an account in a constructor. [LucasSte](https://github.com/LucasSte)
- Do not allow `.call()` functions in functions declared as view. [seanyoung](https://github.com/seanyoung)
- Storage accessor function matches solc, and returns struct members if the sole return value is a single struct [seanyoung](https://github.com/seanyoung)
- **breaking** Constructor annotations above a constructor can either declare an account or receive a literal parameter. [LucasSte](https://github.com/LucasSte)
```
contract MyContract {
@payer(acc) // Declares account acc
@space(2+3) // Only literals or constant expressions allowed
@seed(myseed) // NOT ALLOWED
constructor(bytes myseed) {}
}
```
- Annotations placed before constructor arguments refer to the latter. [LucasSte](https://github.com/LucasSte)
```
contract MyContract {
@payer(acc) // Declares account acc
@space(2+3) // Only literals or constant expressions allowed
constructor(@seed bytes myseed) {}
// When an annotations refers to a parameter, the former must appear right before the latter.
}
```

## v0.3.0 Venice

The parser and semantic analysis stage of Solang have gone through
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solang"
version = "0.3.0"
version = "0.3.1"
authors = ["Sean Young <[email protected]>", "Lucas Steuernagel <[email protected]>", "Cyrill Leutwiler <[email protected]>"]
homepage = "https://github.com/hyperledger/solang"
documentation = "https://solang.readthedocs.io/"
Expand Down Expand Up @@ -46,7 +46,7 @@ itertools = "0.10"
num-rational = "0.4"
indexmap = "1.9"
once_cell = "1.17"
solang-parser = { path = "solang-parser", version = "0.3.0" }
solang-parser = { path = "solang-parser", version = "0.3.1" }
codespan-reporting = "0.11"
phf = { version = "0.11", features = ["macros"] }
rust-lapper = "1.1"
Expand Down
2 changes: 0 additions & 2 deletions RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Release Checklist

- For next release, fix:
https://github.com/hyperledger/solang/issues/1321
- Update the version in `Cargo.toml`, `solang-parser/Cargo.toml`, the binary
links in `docs/installing.rst`, and `CHANGELOG.md`. Remember to match the
solang-parser version in the top level `Cargo.toml`.
Expand Down
12 changes: 6 additions & 6 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Option 2: Download binaries

There are binaries available on github releases:

- `Linux x86-64 <https://github.com/hyperledger/solang/releases/download/v0.3.0/solang-linux-x86-64>`_
- `Linux arm64 <https://github.com/hyperledger/solang/releases/download/v0.3.0/solang-linux-arm64>`_
- `Windows x64 <https://github.com/hyperledger/solang/releases/download/v0.3.0/solang.exe>`_
- `MacOS intel <https://github.com/hyperledger/solang/releases/download/v0.3.0/solang-mac-intel>`_
- `MacOS arm <https://github.com/hyperledger/solang/releases/download/v0.3.0/solang-mac-arm>`_
- `Linux x86-64 <https://github.com/hyperledger/solang/releases/download/v0.3.1/solang-linux-x86-64>`_
- `Linux arm64 <https://github.com/hyperledger/solang/releases/download/v0.3.1/solang-linux-arm64>`_
- `Windows x64 <https://github.com/hyperledger/solang/releases/download/v0.3.1/solang.exe>`_
- `MacOS intel <https://github.com/hyperledger/solang/releases/download/v0.3.1/solang-mac-intel>`_
- `MacOS arm <https://github.com/hyperledger/solang/releases/download/v0.3.1/solang-mac-arm>`_

Download the file and save it somewhere in your ``$PATH``, for example the bin directory in your home directory. If the
path you use is not already in ``$PATH``, then you need to add it yourself.
Expand All @@ -56,7 +56,7 @@ Option 3: Use ghcr.io/hyperledger/solang containers

New images are automatically made available on
`solang containers <https://github.com/hyperledger/solang/pkgs/container/solang>`_.
There is a release `v0.3.0` tag and a `latest` tag:
There is a release `v0.3.1` tag and a `latest` tag:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion solang-parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solang-parser"
version = "0.3.0"
version = "0.3.1"
authors = ["Sean Young <[email protected]>", "Lucas Steuernagel <[email protected]>", "Cyrill Leutwiler <[email protected]>"]
homepage = "https://github.com/hyperledger/solang"
documentation = "https://solang.readthedocs.io/"
Expand Down

0 comments on commit 002954d

Please sign in to comment.