Commit graph

41 commits

Author SHA1 Message Date
noot
63521f6a96
implement Router.sol and associated functions (#92)
* start Router contract

* use calldata for function args

* var name changes

* start testing router contract

* test with and without abi.encode

* cleanup

* why tf isn't tests/utils working

* cleanup tests

* remove unused files

* wip

* fix router contract and tests, add set/update public keys funcs

* impl some Froms

* make execute non-reentrant

* cleanup

* update Router to use ReentrancyGuard

* update contract to use errors, use bitfield in Executed event, minor other fixes

* wip

* fix build issues from merge, tests ok

* Router.sol cleanup

* cleanup, uncomment stuff

* bump ethers.rs version to latest

* make contract functions take generic middleware

* update build script to assert no compiler errors

* hardcode pubkey parity into contract, update tests

* Polish coins/ethereum in various ways

---------

Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2024-03-24 09:00:54 -04:00
Luke Parker
aaff74575f
Remove unused brew packages on macOS (#531)
* Remove unused brew packages on macOS

* Remove reference to Docker in macOS CI

* Remove gems, explicitly test Intel and m1 macOS

* Allow gem to error since it still mostly runs
2024-02-05 23:53:57 -05:00
Luke Parker
89788be034
macOS clippy (#526)
* Specifically use bash as a shell to try and get rustup to work on Windows

* Use bash for the call to echo

* Add macOS clippy

* Debug why git diff failed

* Restore macos-latest to matrix

* Allow whitespace before the fact 0 lines were modified

* Add LC_ALL env variable to grep

* Replace usage of -P with -e
2024-02-01 21:31:02 -05:00
Luke Parker
2b76e41c9a
Directly install protobuf-compiler without using an external action (#524)
* Directly install protobuf-compiler without using an external action

* Remove unused "github-token" input
2024-01-31 19:21:26 -05:00
Luke Parker
05219c3ce8
Windows Clippy (#525)
* Add windows clippy

* Adjust build-dependencies for Linux/Windows

* Specifically use bash as a shell to try and get rustup to work on Windows

* Use bash for the call to echo
2024-01-31 19:10:39 -05:00
Luke Parker
7c9b581723
Remove dtolnay's rust-toolchain action (#442)
* Remove dtolnay's rust-toolchain action

I believe our rust-toolchain.toml handles its use case exactly.

I don't believe this'll work, as it'd require rustup install a cargo stub
before any toolchain is installed, yet I want to confirm it doesn't.

* Place quotes around nightly toolchain version

* Put toolchain before options to resolve what appears to be a bug in rustup's help strings

* Add wasm32-unkknown-unknown to clippy workflow
2023-11-20 02:31:22 -05:00
Luke Parker
b37a0db538
Move where the RISC-V toolchain is installed during the no-std workflow 2023-11-19 22:45:51 -05:00
Luke Parker
05b975dff9
Rust 1.74
Adds a Rust toolchain file to be less disruptive to developers who don't keep
their toolchain synchronized (by now having rustup automatically synchronize).

Hopefully helps resolve how +nightly clippy may pass for the coordinator, yet
building would fail due to stable's (hopefully prior?) failure to model some
async functions re: Send/Sync.

Also adds rust-src as a component in preparation of
https://github.com/paritytech/polkadot-sdk/pull/2217
2023-11-19 17:47:46 -05:00
Luke Parker
a43815f101
Restore Foundry to a test dependency via direct usage of solc 2023-11-12 04:34:45 -05:00
Luke Parker
a0a2ef22e4
Remove ethers-solc
ethers-solc was used for a type (now manually specified) and to call out to
solc. Since Foundry was already a documented dependency, a call to it now
handles building.

Removing this single crate removes a total of 17 crates from our dependency
tree. While these may still be around due to Foundry, they at least may not
be.

Further work to remove the requirement on Foundry for solc alone would be
appreciated.
2023-11-08 06:25:35 -05:00
Luke Parker
a3278dfb31
Add ca-certificates as a dependency to the CI 2023-10-28 00:45:00 -04:00
Luke Parker
7d0d1dc382 Replace solc-select with svm-rs in CI and docs
svm-rs is already in tree as a library, so we may as well include it as a bin
instead of also pulling in solc-select.
2023-10-13 08:56:25 -04:00
Luke Parker
ed90d1752a
Minimal CI Attempts (#393)
* Add quotes around globs

* Don't remove current kernel

* Remove nvm due to nvme, go -> golang
2023-10-11 02:11:34 -04:00
Luke Parker
3261fde853
Remove homebrew from packages to remove 2023-10-11 01:19:04 -04:00
Luke Parker
7492adc473
Attempt to further minimize size of GH CI 2023-10-11 01:17:50 -04:00
Luke Parker
22371a6585
Also reinstall python3-pip 2023-10-10 22:34:19 -04:00
Luke Parker
b2d6a85ac0
Still remove sqlite3 to cause the majority of uninstalls 2023-10-10 22:31:07 -04:00
Luke Parker
44ca5e6520
Manually reinstall python3 after removing most packages 2023-10-10 22:29:25 -04:00
Luke Parker
83b7146e1a
Specify shell when removing unused packages 2023-10-10 22:21:03 -04:00
Luke Parker
985795e99d
Remove unused packages as part of build dependencies
The reproducible runtime test failed due to running out of space. If we have
multiple tests failing due to out of space, and all of our tests have these
unused, it makes sense just to always so uninstall.

Also extends the time limit of reproducible-runtime, as 2h has been hit a few
times before.
2023-10-10 21:09:45 -04:00
Luke Parker
b2ed2e961c
Correct rust version used in CI/orchestration 2023-10-05 18:24:21 -04:00
Luke Parker
a9468bf355
Pin CI from stable to 1.72.1
Enables better detection of regressions in Rust, a few of which 1.72.1 fixes.
2023-09-19 11:43:21 -04:00
Luke Parker
e3a7ee4927
Pin to exact GH actions, preventing ACE in CI
Also updates actions.
2023-09-15 14:30:18 -04:00
Luke Parker
6ac57be4e3
Disable Rust caching
We hit the cache limit after just one or two builds, making it infeasible.
2023-07-03 18:03:09 -04:00
Luke Parker
21f0bb2721
Pin setup-protoc to v2.0.0 2023-06-28 12:28:14 -04:00
Luke Parker
385ed2e97a
Build no-std tests with RISC-V 32 IMAC
Turns out wasm still has std, making it suboptimal to use here.
2023-06-28 12:26:53 -04:00
Luke Parker
30b8636641
Update to the latest Substrate commit
Enables building with only the stable toolchain. The nightly toolchain is still
used for clippy in order to access additional checks.
2023-03-31 02:34:52 -04:00
Luke Parker
4f28a38ce1
Implement #212 2023-03-28 05:34:21 -04:00
Luke Parker
422a562c78
Use arduino/setup-protoc@master instead of the tagged v1
The tag is ancient and uses the now-deprecated NodeJS v12. master uses 16.
2023-01-10 00:32:35 -05:00
Luke Parker
ea7c281a47
Move to dtolnay/toolchain (#211)
* Move to dtolnay/toolchain

* Correct dtolnay/toolchain to rust-roolchain

* Pass toolchain by argument instead of revision

Introduces malleability by referring to HEAD of dtolnay, yet GHA errored on the
prior syntax.
2023-01-09 17:21:31 -05:00
Luke Parker
bff5f33616
Correct GITHUB_TOKEN handling 2023-01-01 04:09:10 -05:00
Luke Parker
f10bcfddcb
Add repo token to arduino/setup-protoc to avoid rate limiting 2023-01-01 03:25:42 -05:00
Luke Parker
22713493d8
Move from set-output to $GITHUB_OUTPUT
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-10-21 22:19:01 -04:00
Luke Parker
826e27c80e
Pin CI to solc-select 0.2.1 2022-10-15 20:04:37 -04:00
Luke Parker
482a8ec209
Update to the latest Serai Substrate (#125)
* Update to the latest Serai Substrate

* Add Protobuf to build dependencies

Docker shouldn't need updating as this should've been added to the image 
in 
2dbace5b01.

* Get substrate to build

* Correct protoc build step

* Remove the benchmarking code

There's some macro resolution error that isn't apparent. I worked on it 
for about half an hour but...

* Remove unnecessary clone

* Correct runtime-benchmarks flag usage
2022-09-29 13:33:09 -05:00
Luke Parker
2393cdfe8c
Specify shell in build-dependencies 2022-09-17 16:29:44 -04:00
Luke Parker
34ffdfa8be
Use a fixed nightly version for the wasm toolchain 2022-09-17 16:26:56 -04:00
Luke Parker
09fdc1b77a
Close https://github.com/serai-dex/serai/issues/93 2022-08-30 14:35:33 -04:00
Luke Parker
534f951165
Consolidate GitHub CI actions, split out Monero (#71)
* Consolidate GitHub CI actions, split out Monero

build now includes the specified Rust toolchain/components.

Added a test dependencies action which grabs Foundry and Monero.

Split the Monero v14 job into a matrixed job in its own workflow flow. 
It's now only run when Monero has changes.

* Correct Monero unit/integration tests run timing

Additionally tests a feature-less Monero build.

Also removes a pointless Monero file, which already should have been 
removed, causing this workflow to be triggered.

* Correct exclusion and paths

Updates to FROST should re-run the Monero tests to ensure it didn't 
introduce API incompatibilities.
2022-07-29 09:36:09 -05:00
Luke Parker
7d9834be87
Correct clippy, remove Monero build depends 2022-07-26 03:48:46 -04:00
Luke Parker
18a1d15f78
Use composite actions in CI (#65)
* Attempt composite actions in CI

* Remove needs monero-daemon for the action

* Correct actions folder layout

* Remove empty inputs/outputs, add shell

* Try moving env declaration spot

* Remove usage of env

* Cached Rust composite action

* Replace [] with ""

Remove empty outputs
2022-07-23 06:05:31 -05:00