Skip to content

Commit f44b248

Browse files
committed
lint
1 parent f6a412e commit f44b248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2977
-755
lines changed
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
name: "Get Emscripten SDK"
2-
inputs:
3-
version:
4-
description: ""
5-
required: false
6-
default: "3.1.64"
7-
8-
9-
runs:
10-
using: "composite"
11-
steps:
12-
- name: install emsdk
13-
shell: bash
14-
run: |
15-
git clone https://github.com/emscripten-core/emsdk.git ./emsdk/
16-
cd emsdk
17-
git checkout tags/${{ inputs.version }}
18-
./emsdk install ${{ inputs.version }}
19-
./emsdk activate ${{ inputs.version }}
1+
name: "Get Emscripten SDK"
2+
inputs:
3+
version:
4+
description: ""
5+
required: false
6+
default: "3.1.64"
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: install emsdk
12+
shell: bash
13+
run: |
14+
git clone https://github.com/emscripten-core/emsdk.git ./emsdk/
15+
cd emsdk
16+
git checkout tags/${{ inputs.version }}
17+
./emsdk install ${{ inputs.version }}
18+
./emsdk activate ${{ inputs.version }}
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
# example:
2-
# - uses: ./.github/actions/get-llvm
3-
# with:
4-
# target: x86_64-unknown-linux-gnu
5-
6-
name: "Download LLVM"
7-
inputs:
8-
target:
9-
required: true
10-
11-
runs:
12-
using: "composite"
13-
steps:
14-
- name: find asset
15-
id: find
16-
uses: actions/github-script@v7
17-
env:
18-
target: ${{ inputs.target }}
19-
with:
20-
result-encoding: string
21-
script: |
22-
let page = 1;
23-
let releases = [];
24-
25-
let releasePrefix = "llvm-"
26-
let target = process.env.target
27-
28-
do {
29-
const res = await github.rest.repos.listReleases({
30-
owner: context.repo.owner,
31-
repo: context.repo.repo,
32-
per_page: 50,
33-
page,
34-
});
35-
36-
releases = res.data
37-
releases.sort((a, b) => {
38-
return (a.published_at < b.published_at) ? 1 : ((a.published_at > b.published_at) ? -1 : 0);
39-
});
40-
41-
let llvmLatestRelease = releases.find(release => {
42-
return release.tag_name.startsWith(releasePrefix);
43-
});
44-
if (llvmLatestRelease){
45-
let asset = llvmLatestRelease.assets.find(asset =>{
46-
return asset.name.includes(target);
47-
});
48-
if (!asset){
49-
core.setFailed(`Artifact for '${target}' not found in release ${llvmLatestRelease.tag_name} (${llvmLatestRelease.html_url})`);
50-
process.exit();
51-
}
52-
return asset.browser_download_url;
53-
}
54-
55-
page++;
56-
} while(releases.length > 0);
57-
58-
core.setFailed(`No LLVM releases with '${releasePrefix}' atifacts found! Please release LLVM before running this workflow.`);
59-
process.exit();
60-
61-
- name: download
62-
shell: bash
63-
run: |
64-
curl -sSLo llvm.tar.gz ${{ steps.find.outputs.result }}
65-
66-
- name: unpack
67-
shell: bash
68-
run: |
69-
tar -xf llvm.tar.gz
70-
rm llvm.tar.gz
1+
# example:
2+
# - uses: ./.github/actions/get-llvm
3+
# with:
4+
# target: x86_64-unknown-linux-gnu
5+
6+
name: "Download LLVM"
7+
inputs:
8+
target:
9+
required: true
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: find asset
15+
id: find
16+
uses: actions/github-script@v7
17+
env:
18+
target: ${{ inputs.target }}
19+
with:
20+
result-encoding: string
21+
script: |
22+
let page = 1;
23+
let releases = [];
24+
25+
let releasePrefix = "llvm-"
26+
let target = process.env.target
27+
28+
do {
29+
const res = await github.rest.repos.listReleases({
30+
owner: context.repo.owner,
31+
repo: context.repo.repo,
32+
per_page: 50,
33+
page,
34+
});
35+
36+
releases = res.data
37+
releases.sort((a, b) => {
38+
return (a.published_at < b.published_at) ? 1 : ((a.published_at > b.published_at) ? -1 : 0);
39+
});
40+
41+
let llvmLatestRelease = releases.find(release => {
42+
return release.tag_name.startsWith(releasePrefix);
43+
});
44+
if (llvmLatestRelease){
45+
let asset = llvmLatestRelease.assets.find(asset =>{
46+
return asset.name.includes(target);
47+
});
48+
if (!asset){
49+
core.setFailed(`Artifact for '${target}' not found in release ${llvmLatestRelease.tag_name} (${llvmLatestRelease.html_url})`);
50+
process.exit();
51+
}
52+
return asset.browser_download_url;
53+
}
54+
55+
page++;
56+
} while(releases.length > 0);
57+
58+
core.setFailed(`No LLVM releases with '${releasePrefix}' atifacts found! Please release LLVM before running this workflow.`);
59+
process.exit();
60+
61+
- name: download
62+
shell: bash
63+
run: |
64+
curl -sSLo llvm.tar.gz ${{ steps.find.outputs.result }}
65+
66+
- name: unpack
67+
shell: bash
68+
run: |
69+
tar -xf llvm.tar.gz
70+
rm llvm.tar.gz

.github/workflows/release-llvm.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ jobs:
3737
build:
3838
strategy:
3939
matrix:
40-
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl, wasm32-unknown-emscripten, aarch64-apple-darwin, x86_64-apple-darwin, x86_64-pc-windows-msvc]
40+
target:
41+
[
42+
x86_64-unknown-linux-gnu,
43+
x86_64-unknown-linux-musl,
44+
wasm32-unknown-emscripten,
45+
aarch64-apple-darwin,
46+
x86_64-apple-darwin,
47+
x86_64-pc-windows-msvc,
48+
]
4149
include:
4250
- target: x86_64-unknown-linux-gnu
4351
builder-arg: gnu

.github/workflows/test-llvm-builder.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
branches: ["main"]
55
types: [opened, synchronize]
66
paths:
7-
- 'LLVM.lock'
8-
- 'crates/llvm-builder/**'
9-
- '.github/workflows/test-llvm-builder.yml'
7+
- "LLVM.lock"
8+
- "crates/llvm-builder/**"
9+
- ".github/workflows/test-llvm-builder.yml"
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/target
2+
/js/resolc/dist
23
target-llvm
34
*.dot
45
.vscode/

CHANGELOG.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ This is a development pre-release.
1919
Supported `polkadot-sdk` rev:`c29e72a8628835e34deb6aa7db9a78a2e4eabcee`
2020

2121
### Added
22-
- The `revive-runner` helper utility binary which helps to run contracts locally without a blockchain node.
22+
23+
- The `revive-runner` helper utility binary which helps to run contracts locally without a blockchain node.
2324
- Allow configuration of the EVM heap memory size and stack size via CLI flags and JSON input settings.
2425

2526
### Changed
27+
2628
- The default PVM stack memory size was increased from 16kb to 32kb.
2729

2830
### Fixed
31+
2932
- Constructors avoid storing zero sized immutable data on exit.
3033

3134
## v0.1.0-dev.13
@@ -35,16 +38,19 @@ This is a development pre-release.
3538
Supported `polkadot-sdk` rev:`c29e72a8628835e34deb6aa7db9a78a2e4eabcee`
3639

3740
### Added
41+
3842
- Support for solc v0.8.29
3943
- Decouples the solc JSON-input-output type definitions from the Solidity fronted and expose them via a dedicated crate.
4044
- `--supported-solc-versions` for `resolc` binary to return a `semver` range of supported `solc` versions.
4145
- Support for passing LLVM command line options via the prcoess input or providing one or more `--llvm-arg='..'` resolc CLI flag. This allows more fine-grained control over the LLVM backend configuration.
4246

4347
### Changed
48+
4449
- Storage keys and values are big endian. This was a pre-mature optimization because for the contract itself it this is a no-op and thus not observable. However we should consider the storage layout as part of the contract ABI. The endianness of transient storage values are still kept as-is.
4550
- Running `resolc` using webkit is no longer supported.
4651

4752
### Fixed
53+
4854
- A missing byte swap for the create2 salt value.
4955

5056
## v0.1.0-dev.12
@@ -54,10 +60,12 @@ This is a development pre-release.
5460
Supported `polkadot-sdk` rev: `21f6f0705e53c15aa2b8a5706b208200447774a9`
5561

5662
### Added
63+
5764
- Per file output selection for `--standard-json` mode.
5865
- The `ir` output selection option for `--standard-json` mode.
5966

6067
### Changed
68+
6169
- Improved code size: Large contracts compile to smaller code blobs when enabling aggressive size optimizations (`-Oz`).
6270

6371
### Fixed
@@ -73,6 +81,7 @@ Supported `polkadot-sdk` rev: `274a781e8ca1a9432c7ec87593bd93214abbff50`
7381
### Changed
7482

7583
### Fixed
84+
7685
- A bug causing incorrect loads from the emulated EVM linear memory.
7786
- A missing integer truncate after switching to 64bit.
7887

@@ -83,10 +92,12 @@ This is a development pre-release.
8392
Supported `polkadot-sdk` rev: `274a781e8ca1a9432c7ec87593bd93214abbff50`
8493

8594
### Added
95+
8696
- Support for the `coinbase` opcode.
8797
- The resolc web JS version.
8898

8999
### Changed
100+
90101
- Missing the `--overwrite` flag emits an error instead of a warning.
91102
- The `resolc` executable prints the help by default.
92103
- Removed support for legacy EVM assembly (EVMLA) translation.
@@ -96,6 +107,7 @@ Supported `polkadot-sdk` rev: `274a781e8ca1a9432c7ec87593bd93214abbff50`
96107
If detected, the re-entrant call flag is not set and 0 deposit limit is endowed.
97108

98109
### Fixed
110+
99111
- Solidity: Add the solc `--libraries` files to sources.
100112
- A data race in tests.
101113
- Fix `broken pipe` errors.
@@ -109,25 +121,30 @@ This is a development pre-release.
109121
### Added
110122

111123
### Changed
124+
112125
- Syscalls with more than 6 arguments now pack them into registers.
113126

114127
### Fixed
128+
115129
- Remove reloading of the resolc.js file (fix issue with relative path in web worker)
116130

117131
## v0.1.0-dev.8
118132

119133
This is a development pre-release.
120134

121135
### Added
136+
122137
- The `revive-llvm-builder` crate with the `revive-llvm` helper utility for streamlined management of the LLVM framework dependency.
123138
- Initial support for running `resolc` in the browser.
124139

125140
### Changed
141+
126142
- Suported contracts runtime is polkadot-sdk git version `d62a90c8c729acd98c7e9a5cab9803b8b211ffc5`.
127143
- The minimum supported Rust version is `1.81.0`.
128144
- Error out early instead of invoking `solc` with invalid base or include path flags.
129145

130146
### Fixed
147+
131148
- Decouple the LLVM target dependency from the LLVM host dependency.
132149
- Do not error out if no files and no errors were produced. This aligns resolc closer to solc.
133150
- Fixes input normalization in the Wasm version.
@@ -137,17 +154,20 @@ This is a development pre-release.
137154
This is a development pre-release.
138155

139156
### Added
157+
140158
- Implement the `GASPRICE` opcode.
141159
- Implement the `BASEFEE` opcode.
142160
- Implement the `GASLIMIT` opcode.
143161

144162
### Changed
163+
145164
- The `GAS` opcode now returns the remaining `ref_time`.
146165
- Contracts can now be supplied call data input of arbitrary size.
147-
- Some syscalls now return the value in a register, slightly improving emitted contract code.
166+
- Some syscalls now return the value in a register, slightly improving emitted contract code.
148167
- Calls forward maximum weight limits instead of 0, anticipating a change in polkadot-sdk where weight limits of 0 no longer interprets as uncapped limit.
149168

150169
### Fixed
170+
151171
- A linker bug which was preventing certain contracts from linking with the PVM linker.
152172
- JS: Fix encoding conversion from JS string (UTF-16) to UTF-8.
153173
- The git commit hash slug is always displayed in the version string.
@@ -157,28 +177,32 @@ This is a development pre-release.
157177
This is a development pre-release.
158178

159179
# Added
180+
160181
- Implement the `BLOCKHASH` opcode.
161182
- Implement delegate calls.
162183
- Implement the `GASPRICE` opcode. Currently hard-coded to return `1`.
163184
- The ELF shared object contract artifact is dumped into the debug output directory.
164185
- Initial support for emitting debug info (opt in via the `-g` flag)
165186

166187
# Changed
188+
167189
- resolc now emits 64bit PolkaVM blobs, reducing contract code size and execution time.
168190
- The RISC-V bit-manipulation target feature (`zbb`) is enabled.
169191

170192
# Fixed
171-
- Compilation to Wasm (for usage in node and web browsers)
172193

194+
- Compilation to Wasm (for usage in node and web browsers)
173195

174196
## v0.1.0-dev.5
175197

176198
This is development pre-release.
177199

178200
# Added
201+
179202
- Implement the `CODESIZE` and `EXTCODESIZE` opcodes.
180203

181204
# Changed
205+
182206
- Include the full revive version in the contract metadata.
183207

184208
# Fixed
@@ -188,9 +212,11 @@ This is development pre-release.
188212
This is development pre-release.
189213

190214
# Added
215+
191216
- Support the `ORIGIN` opcode.
192217

193218
# Changed
219+
194220
- Update polkavm to `v0.14.0`.
195221
- Enable the `a`, `fast-unaligned-access` and `xtheadcondmov` LLVM target features, decreasing the code size for some contracts.
196222

0 commit comments

Comments
 (0)