mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
* Update `build-dependencies` CI action
* Update `develop` to `patch-polkadot-sdk`
Allows us to finally remove the old `serai-dex/substrate` repository _and_
should have CI pass without issue on `develop` again.
The changes made here should be trivial and maintain all prior
behavior/functionality. The most notable are to `chain_spec.rs`, in order to
still use a SCALE-encoded `GenesisConfig` (avoiding `serde_json`).
* CI fixes
* Add `/usr/local/opt/llvm/lib` to paths on macOS hosts
* Attempt to use `LD_LIBRARY_PATH` in macOS GitHub CI
* Use `libp2p 0.56` in `serai-node`
* Correct Windows build dependencies
* Correct `llvm/lib` path on macOS
* Correct how macOS 13 and 14 have different homebrew paths
* Use `sw_vers` instead of `uname` on macOS
Yields the macOS version instead of the kernel's version.
* Replace hard-coded path with the intended env variable to fix macOS 13
* Add `libclang-dev` as dependency to the Debian Dockerfile
* Set the `CODE` storage slot
* Update to a version of substrate without `wasmtimer`
Turns out `wasmtimer` is WASM only. This should restore the node's functioning
on non-WASM environments.
* Restore `clang` as a dependency due to the Debian Dockerfile as we require a C++ compiler
* Move from Debian bookworm to trixie
* Restore `chain_getBlockBin` to the RPC
* Always generate a new key for the P2P network
* Mention every account on-chain before they publish a transaction
`CheckNonce` required accounts have a provider in order to even have their
nonce considered. This shims that by claiming every account has a provider at
the start of a block, if it signs a transaction.
The actual execution could presumably diverge between block building (which
sets the provider before each transaction) and execution (which sets the
providers at the start of the block). It doesn't diverge in our current
configuration and it won't be propagated to `next` (which doesn't use
`CheckNonce`).
Also uses explicit indexes for the `serai_abi::{Call, Event}` `enum`s.
* Adopt `patch-polkadot-sdk` with fixed peering
* Manually insert the authority discovery key into the keystore
I did try pulling in `pallet-authority-discovery` for this, updating
`SessionKeys`, but that was insufficient for whatever reason.
* Update to latest `substrate-wasm-builder`
* Fix timeline for incrementing providers
e1671dd71b incremented the providers for every
single transaction's sender before execution, noting the solution was fragile
but it worked for us at this time. It did not work for us at this time.
The new solution replaces `inc_providers` with direct access to the `Account`
`StorageMap` to increment the providers, achieving the desired goal, _without_
emitting an event (which is ordered, and the disparate order between building
and execution was causing mismatches of the state root).
This solution is also fragile and may also be insufficient. None of this code
exists anymore on `next` however. It just has to work sufficiently for now.
* clippy
86 lines
3.3 KiB
YAML
86 lines
3.3 KiB
YAML
name: build-dependencies
|
|
description: Installs build dependencies for Serai
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Remove unused packages
|
|
shell: bash
|
|
run: |
|
|
# Ensure the repositories are synced
|
|
sudo apt update -y
|
|
|
|
# Actually perform the removals
|
|
sudo apt remove -y "*powershell*" "*nuget*" "*bazel*" "*ansible*" "*terraform*" "*heroku*" "*aws*" azure-cli
|
|
sudo apt remove -y "*nodejs*" "*npm*" "*yarn*" "*java*" "*kotlin*" "*golang*" "*swift*" "*julia*" "*fortran*" "*android*"
|
|
sudo apt remove -y "*apache2*" "*nginx*" "*firefox*" "*chromium*" "*chrome*" "*edge*"
|
|
|
|
sudo apt remove -y --allow-remove-essential -f shim-signed *python3*
|
|
# This removal command requires the prior removals due to unmet dependencies otherwise
|
|
sudo apt remove -y "*qemu*" "*sql*" "*texinfo*" "*imagemagick*"
|
|
|
|
# Reinstall python3 as a general dependency of a functional operating system
|
|
sudo apt install -y python3 --fix-missing
|
|
if: runner.os == 'Linux'
|
|
|
|
- name: Remove unused packages
|
|
shell: bash
|
|
run: |
|
|
(gem uninstall -aIx) || (exit 0)
|
|
brew uninstall --force "*msbuild*" "*powershell*" "*nuget*" "*bazel*" "*ansible*" "*terraform*" "*heroku*" "*aws*" azure-cli
|
|
brew uninstall --force "*nodejs*" "*npm*" "*yarn*" "*java*" "*kotlin*" "*golang*" "*swift*" "*julia*" "*fortran*" "*android*"
|
|
brew uninstall --force "*apache2*" "*nginx*" "*firefox*" "*chromium*" "*chrome*" "*edge*"
|
|
brew uninstall --force "*qemu*" "*sql*" "*texinfo*" "*imagemagick*"
|
|
brew cleanup
|
|
if: runner.os == 'macOS'
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
|
sudo apt install -y ca-certificates protobuf-compiler libclang-dev
|
|
elif [ "$RUNNER_OS" == "Windows" ]; then
|
|
choco install protoc
|
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
|
brew install protobuf llvm
|
|
HOMEBREW_ROOT_PATH=/opt/homebrew # macOS 14+
|
|
if [ $(sw_vers -productVersion | awk -F "." '{ print $1 }') = "13" ]; then HOMEBREW_ROOT_PATH=/usr/local; fi # macOS 13
|
|
ls $HOMEBREW_ROOT_PATH/opt/llvm/lib | grep "libclang.dylib" # Make sure this installed `libclang`
|
|
echo "DYLD_LIBRARY_PATH=$HOMEBREW_ROOT_PATH/opt/llvm/lib:$DYLD_LIBRARY_PATH" >> "$GITHUB_ENV"
|
|
fi
|
|
|
|
- name: Install solc
|
|
shell: bash
|
|
run: |
|
|
cargo +1.89 install svm-rs --version =0.5.18
|
|
svm install 0.8.26
|
|
svm use 0.8.26
|
|
|
|
- name: Remove preinstalled Docker
|
|
shell: bash
|
|
run: |
|
|
docker system prune -a --volumes
|
|
sudo apt remove -y *docker*
|
|
# Install uidmap which will be required for the explicitly installed Docker
|
|
sudo apt install uidmap
|
|
if: runner.os == 'Linux'
|
|
|
|
- name: Update system dependencies
|
|
shell: bash
|
|
run: |
|
|
sudo apt update -y
|
|
sudo apt upgrade -y
|
|
sudo apt autoremove -y
|
|
sudo apt clean
|
|
if: runner.os == 'Linux'
|
|
|
|
- name: Install rootless Docker
|
|
uses: docker/setup-docker-action@b60f85385d03ac8acfca6d9996982511d8620a19
|
|
with:
|
|
rootless: true
|
|
set-host: true
|
|
if: runner.os == 'Linux'
|
|
|
|
# - name: Cache Rust
|
|
# uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43
|