Commit Graph

333 Commits

Author SHA1 Message Date
xermicus 77e0344d80 llvm-context: remove dead code (#247)
- remove the __sha3 function symbol: this is provided by the pallet
- remove the storage address spaces: they are not mapped into memory

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2025-02-28 15:38:42 +01:00
Alexander Theißen 2fb8beee62 Build LLVM for Windows (#248)
This PR changes the CI build scripts to also build LLVM for windows.
**It doesn't build `revive` itself for windows**. This will come in a
follow up. But once we have a LLVM binary release the turn around time
will be much quicker for experimenting with the revive windows build.

I manually uploaded the release those changes produce
[here](https://github.com/paritytech/revive-alex-workflowtest/releases/tag/llvm-18.1.8-revive.22f3ceb).
This enables this PR's CI to find the proper release. This is necessary
because I am also making changes to the folder structure and artifact
naming that the other CI jobs are depending on.

Releases generated from this branch can be inspected here:
https://github.com/paritytech/revive-alex-workflowtest/releases/tag/v0.1.0-dev.12

Summary of changes:
- Change `llvm-builder` to use MSVC toolchain on windows
- Fix `llvm-builder` to work with `.exe` files
- Unify the llvm release jobs into a single one. This removed a lot of
copy pasted code and also speeds up the build by giving each their own
runner.
- Use the LLVM target triple to name the binary releases instead of an
ad-hoc naming convention
- Remove the nested folder hierarchy inside the llvm release. Its just
now a single folder `llvm-<target>` that contains the toolchain.
- Give jobs and workflows consistent names
- Replace all runners bei their `*-latest` counterpart
- Only use `parity-large` to build llvm now. All other jobs use github
runners
2025-02-28 15:06:03 +01:00
xermicus 93788e72e9 integration: additional mcopy test (#245)
Closes #237

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
llvm-18.1.8-revive.22f3ceb
2025-02-27 11:39:31 +01:00
xermicus 296a226d0b integration: add delegate call corner case test (#243)
Closes #235

---------

Signed-off-by: xermicus <cyrill@parity.io>
2025-02-27 11:10:00 +01:00
xermicus 84deb3a29d integration: add function return type test (#244)
Closes #236
2025-02-27 10:37:37 +01:00
Evgeny Snitko ee064671e0 Release archive path fix (#241) 2025-02-26 16:40:49 +01:00
xermicus 63dfd046e5 Update RELEASE.md (#239) 2025-02-26 09:38:00 +01:00
xermicus 08f341ccc1 release resolc v0.1.0-dev.12 (#238)
Signed-off-by: xermicus <cyrill@parity.io>
2025-02-26 09:36:28 +01:00
xermicus a07968205b llvm-context: modularize compiler builtin functions (#234)
- Add the revive runtime function interface to minimize boiler plate
code.
- Outline heavily repeated code into dedicated functions to bring down
code size.
- The code size tests builds optimized for size.
- Function attributes are passed as slices.

This significantly brings down the code size for all OpenZeppelin wizard
contracts (using all possible features) compiled against OpenZeppelin
`v5.0.0` with size optimizations.

|contract|| `-Oz` main | `-Oz` PR || `-O3` main | `-O3` PR |
|-|-|-|-|-|-|-|
|erc1155.sol||100K|67K||114K|147K|
|erc20.sol||120K|90K||160K|191K|
|erc721.sol||128K|101K||178K|214K|
|governor.sol||226K|165K||293K|349K|
|rwa.sol||116K|85K||154K|185K|
|stable.sol||116K|86K||155K|192K|

On the flip side this introduces a heavy penalty for cycle optimized
builds. Setting the no-inline attributes for cycle optimized builds
helps a lot but heavily penalizes runtime speed (LLVM does not yet
inline everything properly - to be investigated later on).

Next steps:
- Modularize more functions
- Refactor the YUL function arguments to use pointers instead of values
- Afterwards check if LLVM still has trouble inline-ing properly on O3
or set the no-inline attribute if it does not penalize runtime
performance too bad.
2025-02-25 16:47:01 +01:00
Evgeny Snitko 7ffe64ed7c CI improvements (#230)
- llvm artifacts search, download and extract now in `get-llvm` action 
- `get-emsdk` action - clone, install, activate emsdk, so we don't need
to build `revive-builder` for this
- switch workflows to new actions
- `concurrency` for remaining workflows (cancel run if new run is
triggered)
- `target_commitish` for main release, fixes release commit 
- Run release workflow in PR without creating a release if PR is labeled
with `release-test`

---------

Co-authored-by: cornholio <0@mcornholio.ru>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: xermicus <cyrill@parity.io>
Co-authored-by: xermicus <bigcyrill@hotmail.com>
2025-02-25 14:33:59 +01:00
Yuri Volkov f1bce4fe3f llvm-builder testing workflow (#164)
Co-authored-by: xermicus <cyrill@parity.io>
2025-02-25 12:39:03 +01:00
xermicus 9efbb4c0b4 ci: temporarily disable the machete (#233) 2025-02-25 09:40:40 +01:00
xermicus bcc8fa892c update dependencies (#229) 2025-02-24 12:45:05 +01:00
Pavlo Khrystenko 89ec25da65 Add per file output selection for --standard-json mode and some other small foundry support bits. (#228) 2025-02-24 12:44:22 +01:00
xermicus 75a83af4da ci: clippy (#227)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-21 16:43:09 +01:00
xermicus 9c330ef8fc llvm-builder: only run expensive tests on linux (#226)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-21 16:38:44 +01:00
Yuri Volkov 687cec31ef Using released LLVM in revive build (#220) 2025-02-21 16:30:26 +01:00
Yuri Volkov 48a019e0ad Fix: add llvm- prefix to llvm version tag (#225)
Needed both for differentiating them from regular releases and for
filtering the tags in automation
llvm-18.1.8-revive.48a019e
2025-02-21 12:05:40 +01:00
xermicus 17a2d2f9f2 update README.md (#223)
Signed-off-by: xermicus <cyrill@parity.io>
2025-02-21 10:51:40 +01:00
Yuri Volkov 6ad7908c5e Using workflow_dispatch for LLVM releases (#222) 2025-02-20 20:00:33 +01:00
Yuri Volkov 840a736fc5 LLVM release workflows (#207)
Co-authored-by: xermicus <cyrill@parity.io>
2025-02-20 12:30:52 +01:00
xermicus 89cdfefab4 remove some dead code leftovers (#218)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-19 10:41:32 +01:00
xermicus 6c2c633651 release resolc v0.1.0-dev.11 (#214)
Signed-off-by: xermicus <cyrill@parity.io>
v0.1.0-dev.11
2025-02-18 08:08:20 +01:00
xermicus a73b0925c6 ci: do not run bun tests (#215) 2025-02-17 17:04:53 +01:00
xermicus ee650cf03a ci: use upstream evm for tests (#213)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-17 11:33:30 +01:00
Evgeny Snitko c2210442b6 Release workflow (#201)
Co-authored-by: xermicus <cyrill@parity.io>
2025-02-17 11:09:10 +01:00
xermicus cb268850a9 llvm-context: remove the linear memory pointer indirection (#211) 2025-02-13 13:21:43 +01:00
xermicus f3a86588f3 update dependencies (#210)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-12 13:12:09 +01:00
xermicus 7233738f45 release resolc v0.1.0-dev.10 (#209)
Signed-off-by: xermicus <cyrill@parity.io>
v0.1.0-dev.10
2025-02-11 15:51:52 +01:00
Sebastian Miasojed 79ec4dd04b Add all resolc dependencies to resolc_web.js file (#176) 2025-02-11 11:55:24 +01:00
xermicus 374563bbe5 integration: add function pointer integration test (#205)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-10 18:50:12 +01:00
xermicus a921e425b4 CI: fix and pin geth (#206) 2025-02-10 17:39:44 +01:00
xermicus 60fc09f787 llvm-context: disable call re-entrancy for send and transfer (#196) 2025-02-06 16:49:50 +01:00
Sebastian Miasojed 10b8ff989c Align emscripten compilation options (#180) 2025-02-06 00:37:10 +01:00
xermicus 157647d5c1 remove superfluous warning and clippy allows (#194)
Signed-off-by: xermicus <cyrill@parity.io>
2025-02-05 12:44:29 +01:00
xermicus 35419e8202 solidity: update custom warnings and version validation (#193) 2025-02-05 11:42:35 +01:00
xermicus de3e7bf253 integration: add create2 test case with duplicate salt (#188)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-04 14:04:14 +01:00
xermicus 9fb24b607d disable werror (#191)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-02-04 12:43:56 +01:00
xermicus ba7310fdff integration: bugfix blob cache (#192)
Signed-off-by: xermicus <cyrill@parity.io>
2025-02-04 12:11:25 +01:00
dependabot[bot] 4ef495beea Bump openssl from 0.10.68 to 0.10.70 (#190)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.68 to 0.10.70.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.70)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 07:28:29 +01:00
xermicus 8ed689e7ec solidity: various small resolc fixes (#189) 2025-02-03 16:16:54 +01:00
xermicus bfda465c32 remove support for legacy evm assembly (#186) 2025-02-03 14:13:43 +01:00
xermicus ab90af49df Solidity: add --libraries to sources (#187)
* bugfix: add libraries to sources

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-01-31 18:08:11 +01:00
Sebastian Miasojed 8201401fef Fix stack overflow issue (#184) 2025-01-31 14:31:34 +01:00
xermicus 1a8a7926e9 implement the coinbase opcode (#179)
Signed-off-by: xermicus <cyrill@parity.io>
2025-01-29 15:24:45 +01:00
xermicus bec5d60b7c release resolc-0.1.0-dev.9 (#178)
Signed-off-by: xermicus <cyrill@parity.io>
v0.1.0-dev.9
2025-01-29 12:49:54 +01:00
xermicus 3608a5a143 runtime-api: pass call arguments in registers instead of spilling to stack (#174)
Companion to paritytech/polkadot-sdk#7319

Signed-off-by: xermicus <cyrill@parity.io>
2025-01-28 12:45:54 +01:00
Sebastian Miasojed 888723eb0d Fix issue with relative path in web worker (#169) 2025-01-22 23:58:47 +01:00
Cyrill Leutwiler fe1b3258d2 bump crate versions (#171)
- bump crate versions
- point out the supported polkadot sdk version in the changelog
v0.1.0-dev.8
2025-01-17 17:29:38 +01:00
Cyrill Leutwiler d8a72e580b release resolc-0.1.0-dev.8 (#170)
Signed-off-by: xermicus <cyrill@parity.io>
2025-01-17 17:00:25 +01:00