Skip to content

Commit

Permalink
Release v0.2.0 Berlin (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
xermicus committed Dec 2, 2022
1 parent b52cb40 commit 1aa5263
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -103,7 +103,7 @@ jobs:
with:
submodules: recursive
- name: Download LLVM
run: curl -sSL -o c:\llvm.zip https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-win.zip
run: curl -sSL -o c:\llvm.zip https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-win.zip
- name: Extract LLVM
run: unzip c:\llvm.zip -d c:/
- name: Add LLVM to Path
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
default: true
profile: minimal
- name: Get LLVM
run: curl -L --output llvm13.0-mac-arm.tar.xz https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-mac-arm.tar.xz
run: curl -L --output llvm13.0-mac-arm.tar.xz https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-arm.tar.xz
- name: Extract LLVM
run: tar Jxf llvm13.0-mac-arm.tar.xz
- name: Add LLVM to Path
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
default: true
profile: minimal
- name: Get LLVM
run: wget -q -O llvm13.0-mac-intel.tar.xz https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-mac-intel.tar.xz
run: wget -q -O llvm13.0-mac-intel.tar.xz https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-intel.tar.xz
- name: Extract LLVM
run: tar Jxf llvm13.0-mac-intel.tar.xz
- name: Add LLVM to Path
Expand Down
49 changes: 47 additions & 2 deletions CHANGELOG.md
Expand Up @@ -2,12 +2,57 @@
All notable changes to [Solang](https://github.com/hyperledger/solang/)
will be documented here.

## Unreleased
## v0.2.0.0 Berlin
We are happy to release solang `v0.2.0` codenamed `Berlin` today. Aside from containing many small fixes and improvements, this release marks a milestone towards maturing our Substrate compilation target: any regressions building up since `ink!` v3.0 are fixed, most notably the metadata format (shoutout and many thanks to external contributor [extraymond](https://github.com/extraymond)) and event topics. Furthermore, we are leaving `ink!` version 3 behind us, in favor of introducing compatibility with the recent `ink!` 4 beta release and the latest pallet contract `v0.22.1`.

### Added
- Introduce new sub-command `solang idl` which can be used for generating
- **Solana / breaking:** The try-catch construct is no longer permitted on Solana, as it
never worked. Any CPI error will abort the transaction.
[seanyoung](https://github.com/seanyoung)
- **Solana:** Introduce new sub-command `solang idl` which can be used for generating
a Solidity interface file from an Anchor IDL file. This can be used for calling
Anchor Contracts on Solana. [seanyoung](https://github.com/seanyoung)
- **Substrate:** Provide specific Substrate builtins via a "substrate" file. The
`Hash` type from `ink!` is the first `ink!` specific type made available for Solidity
contracts.
[xermicus](https://github.com/xermicus)
- **Substrate:** Introduce the `--log-api-return-codes` CLI flag, which changes the
emitted code to print return codes for `seal` API calls into the debug buffer.
[xermicus](https://github.com/xermicus)
- Introduce function name mangling for overloaded functions and constructors, so
that they can be represented properly in the metadata.
[xermicus](https://github.com/xermicus)

### Changed
- The Solana target now uses Borsh encoding rather than eth abi
encoding. This is aimed at making Solang contracts Anchor compatible.
[LucasSte](https://github.com/LucasSte)
- **Substrate / breaking:** Supported node version is now pallet contracts `v0.22.1`.
[xermicus](https://github.com/xermicus)
- **Substrate / breaking:** Remove the deprecated `random` builtin.
[xermicus](https://github.com/xermicus)

### Fixed
- Whenever possible, the parser does not give up after the first error.
[salaheldinsoliman](https://github.com/salaheldinsoliman)
- Constant expressions are checked for overflow.
[salaheldinsoliman](https://github.com/salaheldinsoliman)
- AddMod and MulMod were broken. This is now fixed.
[LucasSte](https://github.com/LucasSte)
- **Substrate / breaking:** Solang is now compatible with `ink!` version 4 (beta).
[xermicus](https://github.com/xermicus)
- **Substrate:** Switched ABI generation to use official `ink!` crates, which fixes all
remaining metadata regressions.
[extraymond](https://github.com/extraymond) and [xermicus](https://github.com/xermicus)
- **Substrate:** Allow constructors to have a name, so that multiple constructors are
supported, like in `ink!`.
[xermicus](https://github.com/xermicus)
- All provided examples as well as most of the Solidity code snippets in our
documentation are now checked for succesful compilation on the Solang CI.
[xermicus](https://github.com/xermicus)
- **Substrate:** Fix events with topics. The topic hashes generated by Solang
contracts are now exactly the same as those generated by `ink!`.
[xermicus](https://github.com/xermicus)

## v0.1.13 Genoa

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "solang"
version = "0.1.13"
version = "0.2.0"
authors = ["Sean Young <sean@mess.org>"]
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.8"
once_cell = "1.10"
solang-parser = { path = "solang-parser", version = "0.1.18" }
solang-parser = { path = "solang-parser", version = "0.2.0" }
codespan-reporting = "0.11"
phf = { version = "0.11", features = ["macros"] }
rust-lapper = "1.0"
Expand Down
19 changes: 5 additions & 14 deletions README.md
Expand Up @@ -116,17 +116,6 @@ node flipper.js

## Build for Substrate

### Status
:warning: Solang was developed against Substrate v3.0. It has been a while since the last time the Substrate target was worked on, which introduced a few known regressions. Currently, the following is known to **not** work with recent Substrate versions:

* Function call arguments of type `address`
* Function return values of type `address`
* Cross-contract calls
* Events with indexed fields

Maintenance on the Substrate target has now resumed and we are working on fixing these issues.

### Building
Run:

```bash
Expand Down Expand Up @@ -156,8 +145,8 @@ Here is a brief description of what we envision for the next versions.
| Solana SPL tokens compatibility | Completed |
| Parse and resolve inline assembly | Completed |
| Generate code for inline assembly | Completed |
| Support Solana's Program Derived Addresses | In Progress |
| Support latest Substrate production target | In Progress |
| Support latest Substrate production target | Completed |
| Improve parser resilience | Completed |


### V0.3
Expand All @@ -166,10 +155,12 @@ Here is a brief description of what we envision for the next versions.
|--------------------------------------------|-------------|
| Call Solana's Rust contracts from Solidity | In progress |
| Improvements in overflow checking | In progress |
| Support Solana's Program Derived Addresses | In Progress |
| Call Solidity from Solana's Rust contracts | Not started |
| Improve parser resilience | Not started |
| Improve developer experience for Substrate | Not started |
| Tooling for calls between ink! <> solidity | Not started |
| Support chain extensions for Substrate | Not started |
| Provide CLI for node interactions | Not started |


### V0.4
Expand Down
22 changes: 11 additions & 11 deletions docs/installing.rst
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.1.13/solang-linux-x86-64>`_
- `Linux arm64 <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-linux-arm64>`_
- `Windows x64 <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang.exe>`_
- `MacOS intel <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-mac-intel>`_
- `MacOS arm <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-mac-arm>`_
- `Linux x86-64 <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-linux-x86-64>`_
- `Linux arm64 <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-linux-arm64>`_
- `Windows x64 <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang.exe>`_
- `MacOS intel <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-mac-intel>`_
- `MacOS arm <https://github.com/hyperledger/solang/releases/download/v0.2.0/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.1.13` tag and a `latest` tag:
There is a release `v0.2.0` tag and a `latest` tag:

.. code-block:: bash
Expand Down Expand Up @@ -113,15 +113,15 @@ These patches make it possible to generate code for Solana, and fixes
concurrency issues in the lld linker.

You can either download the pre-built libraries from
`github <https://github.com/hyperledger/solang/releases/tag/v0.1.13>`_
`github <https://github.com/hyperledger/solang/releases/tag/v0.2.0>`_
or :ref:`build your own from source <llvm-from-source>`. After that, you need to add the ``bin`` of your
LLVM directory to your path, so that the build system of Solang can find the correct version of LLVM to use.

Linux
~~~~~

A pre-built version of LLVM, specifically configured for Solang, is available at
`<https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-linux-x86-64.tar.xz>`_.
`<https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-linux-x86-64.tar.xz>`_.
After downloading, untar the file in a terminal and add it to your path.

.. code-block:: bash
Expand All @@ -133,7 +133,7 @@ Windows
~~~~~~~

A pre-built version of LLVM, specifically configured for Solang, is available at
`<https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-win.zip>`_.
`<https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-win.zip>`_.

After unzipping the file, add the bin directory to your path.

Expand All @@ -145,8 +145,8 @@ Mac
~~~

A pre-built version of LLVM for intel macs, is available at
`<https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-mac-intel.tar.xz>`_ and for arm macs there is
`<https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-mac-arm.tar.xz>`_. After downloading,
`<https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-intel.tar.xz>`_ and for arm macs there is
`<https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-arm.tar.xz>`_. After downloading,
untar the file in a terminal and add it to your path like so:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion solang-parser/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "solang-parser"
version = "0.1.18"
version = "0.2.0"
authors = ["Sean Young <sean@mess.org>"]
homepage = "https://github.com/hyperledger/solang"
documentation = "https://solang.readthedocs.io/"
Expand Down

0 comments on commit 1aa5263

Please sign in to comment.