Skip to content

Commit 1aa5263

Browse files
authored
Release v0.2.0 Berlin (#1090)
1 parent b52cb40 commit 1aa5263

File tree

6 files changed

+69
-33
lines changed

6 files changed

+69
-33
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
with:
104104
submodules: recursive
105105
- name: Download LLVM
106-
run: curl -sSL -o c:\llvm.zip https://github.com/hyperledger/solang/releases/download/v0.1.13/llvm13.0-win.zip
106+
run: curl -sSL -o c:\llvm.zip https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-win.zip
107107
- name: Extract LLVM
108108
run: unzip c:\llvm.zip -d c:/
109109
- name: Add LLVM to Path
@@ -141,7 +141,7 @@ jobs:
141141
default: true
142142
profile: minimal
143143
- name: Get LLVM
144-
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
144+
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
145145
- name: Extract LLVM
146146
run: tar Jxf llvm13.0-mac-arm.tar.xz
147147
- name: Add LLVM to Path
@@ -169,7 +169,7 @@ jobs:
169169
default: true
170170
profile: minimal
171171
- name: Get LLVM
172-
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
172+
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
173173
- name: Extract LLVM
174174
run: tar Jxf llvm13.0-mac-intel.tar.xz
175175
- name: Add LLVM to Path

CHANGELOG.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,57 @@
22
All notable changes to [Solang](https://github.com/hyperledger/solang/)
33
will be documented here.
44

5-
## Unreleased
5+
## v0.2.0.0 Berlin
6+
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`.
67

78
### Added
8-
- Introduce new sub-command `solang idl` which can be used for generating
9+
- **Solana / breaking:** The try-catch construct is no longer permitted on Solana, as it
10+
never worked. Any CPI error will abort the transaction.
11+
[seanyoung](https://github.com/seanyoung)
12+
- **Solana:** Introduce new sub-command `solang idl` which can be used for generating
913
a Solidity interface file from an Anchor IDL file. This can be used for calling
1014
Anchor Contracts on Solana. [seanyoung](https://github.com/seanyoung)
15+
- **Substrate:** Provide specific Substrate builtins via a "substrate" file. The
16+
`Hash` type from `ink!` is the first `ink!` specific type made available for Solidity
17+
contracts.
18+
[xermicus](https://github.com/xermicus)
19+
- **Substrate:** Introduce the `--log-api-return-codes` CLI flag, which changes the
20+
emitted code to print return codes for `seal` API calls into the debug buffer.
21+
[xermicus](https://github.com/xermicus)
22+
- Introduce function name mangling for overloaded functions and constructors, so
23+
that they can be represented properly in the metadata.
24+
[xermicus](https://github.com/xermicus)
25+
26+
### Changed
27+
- The Solana target now uses Borsh encoding rather than eth abi
28+
encoding. This is aimed at making Solang contracts Anchor compatible.
29+
[LucasSte](https://github.com/LucasSte)
30+
- **Substrate / breaking:** Supported node version is now pallet contracts `v0.22.1`.
31+
[xermicus](https://github.com/xermicus)
32+
- **Substrate / breaking:** Remove the deprecated `random` builtin.
33+
[xermicus](https://github.com/xermicus)
34+
35+
### Fixed
36+
- Whenever possible, the parser does not give up after the first error.
37+
[salaheldinsoliman](https://github.com/salaheldinsoliman)
38+
- Constant expressions are checked for overflow.
39+
[salaheldinsoliman](https://github.com/salaheldinsoliman)
40+
- AddMod and MulMod were broken. This is now fixed.
41+
[LucasSte](https://github.com/LucasSte)
42+
- **Substrate / breaking:** Solang is now compatible with `ink!` version 4 (beta).
43+
[xermicus](https://github.com/xermicus)
44+
- **Substrate:** Switched ABI generation to use official `ink!` crates, which fixes all
45+
remaining metadata regressions.
46+
[extraymond](https://github.com/extraymond) and [xermicus](https://github.com/xermicus)
47+
- **Substrate:** Allow constructors to have a name, so that multiple constructors are
48+
supported, like in `ink!`.
49+
[xermicus](https://github.com/xermicus)
50+
- All provided examples as well as most of the Solidity code snippets in our
51+
documentation are now checked for succesful compilation on the Solang CI.
52+
[xermicus](https://github.com/xermicus)
53+
- **Substrate:** Fix events with topics. The topic hashes generated by Solang
54+
contracts are now exactly the same as those generated by `ink!`.
55+
[xermicus](https://github.com/xermicus)
1156

1257
## v0.1.13 Genoa
1358

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "solang"
3-
version = "0.1.13"
3+
version = "0.2.0"
44
authors = ["Sean Young <[email protected]>"]
55
homepage = "https://github.com/hyperledger/solang"
66
documentation = "https://solang.readthedocs.io/"
@@ -46,7 +46,7 @@ itertools = "0.10"
4646
num-rational = "0.4"
4747
indexmap = "1.8"
4848
once_cell = "1.10"
49-
solang-parser = { path = "solang-parser", version = "0.1.18" }
49+
solang-parser = { path = "solang-parser", version = "0.2.0" }
5050
codespan-reporting = "0.11"
5151
phf = { version = "0.11", features = ["macros"] }
5252
rust-lapper = "1.0"

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,6 @@ node flipper.js
116116

117117
## Build for Substrate
118118

119-
### Status
120-
: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:
121-
122-
* Function call arguments of type `address`
123-
* Function return values of type `address`
124-
* Cross-contract calls
125-
* Events with indexed fields
126-
127-
Maintenance on the Substrate target has now resumed and we are working on fixing these issues.
128-
129-
### Building
130119
Run:
131120

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

162151

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

174165

175166
### V0.4

docs/installing.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ Option 2: Download binaries
2828

2929
There are binaries available on github releases:
3030

31-
- `Linux x86-64 <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-linux-x86-64>`_
32-
- `Linux arm64 <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-linux-arm64>`_
33-
- `Windows x64 <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang.exe>`_
34-
- `MacOS intel <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-mac-intel>`_
35-
- `MacOS arm <https://github.com/hyperledger/solang/releases/download/v0.1.13/solang-mac-arm>`_
31+
- `Linux x86-64 <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-linux-x86-64>`_
32+
- `Linux arm64 <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-linux-arm64>`_
33+
- `Windows x64 <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang.exe>`_
34+
- `MacOS intel <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-mac-intel>`_
35+
- `MacOS arm <https://github.com/hyperledger/solang/releases/download/v0.2.0/solang-mac-arm>`_
3636

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

5757
New images are automatically made available on
5858
`solang containers <https://github.com/hyperledger/solang/pkgs/container/solang>`_.
59-
There is a release `v0.1.13` tag and a `latest` tag:
59+
There is a release `v0.2.0` tag and a `latest` tag:
6060

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

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

120120
Linux
121121
~~~~~
122122

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

127127
.. code-block:: bash
@@ -133,7 +133,7 @@ Windows
133133
~~~~~~~
134134

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

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

@@ -145,8 +145,8 @@ Mac
145145
~~~
146146

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

152152
.. code-block:: bash

solang-parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "solang-parser"
3-
version = "0.1.18"
3+
version = "0.2.0"
44
authors = ["Sean Young <[email protected]>"]
55
homepage = "https://github.com/hyperledger/solang"
66
documentation = "https://solang.readthedocs.io/"

0 commit comments

Comments
 (0)