diff --git a/.changelog/dry-ants-bow.md b/.changelog/dry-ants-bow.md new file mode 100644 index 0000000000..45c4ee58f9 --- /dev/null +++ b/.changelog/dry-ants-bow.md @@ -0,0 +1,5 @@ +--- +reth: patch +--- + +Removed Windows platform support from the codebase, including the Windows cross-compilation Dockerfile, build targets in Cross.toml and Makefile, and Windows-specific options in the bug report template. diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index b01d4518f7..062edac9d3 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -43,7 +43,6 @@ body: - `~/.cache/reth/logs` on Linux - `~/Library/Caches/reth/logs` on macOS - - `%localAppData%/reth/logs` on Windows render: text validations: required: false @@ -58,8 +57,6 @@ body: - Linux (ARM) - Mac (Intel) - Mac (Apple Silicon) - - Windows (x86) - - Windows (ARM) - type: dropdown id: container_type attributes: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 991199fe7b..71a626c651 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,10 +85,6 @@ jobs: os: macos-14 profile: maxperf allow_fail: false - - target: x86_64-pc-windows-gnu - os: ubuntu-24.04 - profile: maxperf - allow_fail: false - target: riscv64gc-unknown-linux-gnu os: ubuntu-24.04 profile: maxperf @@ -122,8 +118,7 @@ jobs: - name: Move binary run: | mkdir artifacts - [[ "${{ matrix.configs.target }}" == *windows* ]] && ext=".exe" - mv "target/${{ matrix.configs.target }}/${{ matrix.configs.profile }}/${{ matrix.build.binary }}${ext}" ./artifacts + mv "target/${{ matrix.configs.target }}/${{ matrix.configs.profile }}/${{ matrix.build.binary }}" ./artifacts - name: Configure GPG and create artifacts env: @@ -240,7 +235,6 @@ jobs: |:---:|:---:|:---:|:---| | | x86_64 | [reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) | | | aarch64 | [reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) | - | | x86_64 | [reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz.asc) | | | x86_64 | [reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) | | | aarch64 | [reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) | | | Docker | [${{ env.IMAGE_NAME }}](${{ env.DOCKER_IMAGE_NAME_URL }}) | - | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 3358ae2561..0000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Windows build - -name: windows - -on: - push: - branches: [main] - pull_request: - branches: [main] - merge_group: - -env: - RUSTC_WRAPPER: "sccache" - -jobs: - check-reth: - runs-on: depot-ubuntu-latest - timeout-minutes: 60 - - steps: - - uses: actions/checkout@v6 - - uses: rui314/setup-mold@v1 - - uses: dtolnay/rust-toolchain@stable - with: - target: x86_64-pc-windows-gnu - - uses: taiki-e/install-action@cross - - uses: mozilla-actions/sccache-action@v0.0.9 - - uses: Swatinem/rust-cache@v2 - with: - cache-on-failure: true - - name: mingw-w64 - run: sudo apt-get install -y mingw-w64 - - name: Check Reth - run: cargo check --target x86_64-pc-windows-gnu diff --git a/Cross.toml b/Cross.toml index 9b4fd44f75..e5fee71871 100644 --- a/Cross.toml +++ b/Cross.toml @@ -15,15 +15,6 @@ pre-build = [ "apt-get update && apt-get install --assume-yes --no-install-recommends llvm-dev libclang-dev clang", ] -[target.x86_64-pc-windows-gnu] -# Why do we need a custom Dockerfile on Windows: -# 1. `reth-libmdbx` stopped working with MinGW 9.3 that cross image comes with. -# 2. To be able to update the version of MinGW, we need to also update the Ubuntu that the image is based on. -# -# Also see https://github.com/cross-rs/cross/issues/1667 -# Inspired by https://github.com/cross-rs/cross/blob/9e2298e17170655342d3248a9c8ac37ef92ba38f/docker/Dockerfile.x86_64-pc-windows-gnu#L51 -dockerfile = "./Dockerfile.x86_64-pc-windows-gnu" - [target.riscv64gc-unknown-linux-gnu] image = "ubuntu:24.04" pre-build = [ diff --git a/Dockerfile.x86_64-pc-windows-gnu b/Dockerfile.x86_64-pc-windows-gnu deleted file mode 100644 index c4611c249f..0000000000 --- a/Dockerfile.x86_64-pc-windows-gnu +++ /dev/null @@ -1,79 +0,0 @@ -FROM ubuntu:24.04 AS cross-base -ENV DEBIAN_FRONTEND=noninteractive - -# Use HTTPS for package sources -RUN apt-get update && apt-get install --assume-yes --no-install-recommends ca-certificates -RUN find /etc/apt/ -type f \( -name '*.list' -o -name '*.sources' \) -exec sed -i 's|http://|https://|g' {} + - -# Configure APT retries and timeouts to handle network issues -RUN echo 'Acquire::Retries \"3\";' > /etc/apt/apt.conf.d/80-retries && \ - echo 'Acquire::http::Timeout \"60\";' >> /etc/apt/apt.conf.d/80-retries && \ - echo 'Acquire::ftp::Timeout \"60\";' >> /etc/apt/apt.conf.d/80-retries - -# configure fallback mirrors -RUN sed -i 's|URIs: https://archive.ubuntu.com/ubuntu/|URIs: https://mirror.cov.ukservers.com/ubuntu/ https://archive.ubuntu.com/ubuntu/ https://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources - -RUN apt-get update && apt-get install --assume-yes --no-install-recommends git - -RUN git clone https://github.com/cross-rs/cross /cross -WORKDIR /cross/docker -RUN git checkout baf457efc2555225af47963475bd70e8d2f5993f - -# xargo doesn't work with Rust 1.89 and higher: https://github.com/cross-rs/cross/issues/1701. -# -# When this PR https://github.com/cross-rs/cross/pull/1580 is merged, -# we can update the checkout above and remove this replacement. -RUN sed -i 's|sh rustup-init.sh -y --no-modify-path --profile minimal|sh rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain=1.88.0|' xargo.sh - -RUN cp common.sh lib.sh / && /common.sh -RUN cp cmake.sh / && /cmake.sh -RUN cp xargo.sh / && /xargo.sh - -FROM cross-base AS build - -RUN apt-get install --assume-yes --no-install-recommends libz-mingw-w64-dev g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64 - -# Install Wine using OpenSUSE repository because official one is often lagging behind -RUN dpkg --add-architecture i386 && \ - apt-get install --assume-yes --no-install-recommends wget gpg && \ - mkdir -pm755 /etc/apt/keyrings && curl -fsSL \ - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_24.04/Release.key \ - | tee /etc/apt/keyrings/obs-winehq.key >/dev/null && \ - echo "deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/obs-winehq.key] \ - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_24.04/ ./" \ - | tee /etc/apt/sources.list.d/obs-winehq.list && \ - apt-get update && apt-get install --assume-yes --install-recommends winehq-stable - -# run-detectors are responsible for calling the correct interpreter for exe -# files. For some reason it does not work inside a docker container (it works -# fine in the host). So we replace the usual paths of run-detectors to run wine -# directly. This only affects the guest, we are not messing up with the host. -# -# See /usr/share/doc/binfmt-support/detectors -RUN mkdir -p /usr/lib/binfmt-support/ && \ - rm -f /usr/lib/binfmt-support/run-detectors /usr/bin/run-detectors && \ - ln -s /usr/bin/wine /usr/lib/binfmt-support/run-detectors && \ - ln -s /usr/bin/wine /usr/bin/run-detectors - -RUN cp windows-entry.sh / -ENTRYPOINT ["/windows-entry.sh"] - -RUN cp toolchain.cmake /opt/toolchain.cmake - -# for why we always link with pthread support, see: -# https://github.com/cross-rs/cross/pull/1123#issuecomment-1312287148 -ENV CROSS_TOOLCHAIN_PREFIX=x86_64-w64-mingw32- -ENV CROSS_TOOLCHAIN_SUFFIX=-posix -ENV CROSS_SYSROOT=/usr/x86_64-w64-mingw32 -ENV CROSS_TARGET_RUNNER="env -u CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER wine" -ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc"$CROSS_TOOLCHAIN_SUFFIX" \ - CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER="$CROSS_TARGET_RUNNER" \ - AR_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \ - CC_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc"$CROSS_TOOLCHAIN_SUFFIX" \ - CXX_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"g++"$CROSS_TOOLCHAIN_SUFFIX" \ - CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_gnu=/opt/toolchain.cmake \ - BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \ - CROSS_CMAKE_SYSTEM_NAME=Windows \ - CROSS_CMAKE_SYSTEM_PROCESSOR=AMD64 \ - CROSS_CMAKE_CRT=gnu \ - CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -m64" diff --git a/Makefile b/Makefile index a9068025a3..28b4333037 100644 --- a/Makefile +++ b/Makefile @@ -98,9 +98,6 @@ build-native-%: # pages. See: https://github.com/paradigmxyz/reth/issues/6742 build-aarch64-unknown-linux-gnu: export JEMALLOC_SYS_WITH_LG_PAGE=16 -# No jemalloc on Windows -build-x86_64-pc-windows-gnu: FEATURES := $(filter-out jemalloc jemalloc-prof,$(FEATURES)) - # Note: The additional rustc compiler flags are for intrinsics needed by MDBX. # See: https://github.com/cross-rs/cross/wiki/FAQ#undefined-reference-with-build-std build-%: @@ -152,8 +149,6 @@ build-release-tarballs: ## Create a series of `.tar.gz` files in the BIN_DIR dir $(call tarball_release_binary,"x86_64-unknown-linux-gnu","reth","") $(MAKE) build-aarch64-unknown-linux-gnu $(call tarball_release_binary,"aarch64-unknown-linux-gnu","reth","") - $(MAKE) build-x86_64-pc-windows-gnu - $(call tarball_release_binary,"x86_64-pc-windows-gnu","reth.exe","") ##@ Test diff --git a/crates/fs-util/src/lib.rs b/crates/fs-util/src/lib.rs index 54a22875d9..e309a67d2e 100644 --- a/crates/fs-util/src/lib.rs +++ b/crates/fs-util/src/lib.rs @@ -319,9 +319,6 @@ where F: FnOnce(&mut File) -> std::result::Result<(), E>, E: Into>, { - #[cfg(windows)] - use std::os::windows::fs::OpenOptionsExt; - let mut tmp_path = file_path.to_path_buf(); tmp_path.set_extension("tmp"); @@ -350,17 +347,6 @@ where // fsync() directory if let Some(parent) = file_path.parent() { - #[cfg(windows)] - OpenOptions::new() - .read(true) - .write(true) - .custom_flags(0x02000000) // FILE_FLAG_BACKUP_SEMANTICS - .open(parent) - .map_err(|err| FsPathError::open(err, parent))? - .sync_all() - .map_err(|err| FsPathError::fsync(err, parent))?; - - #[cfg(not(windows))] OpenOptions::new() .read(true) .open(parent) diff --git a/crates/rpc/ipc/src/server/mod.rs b/crates/rpc/ipc/src/server/mod.rs index 58cd2f29e8..6e58c0b5b8 100644 --- a/crates/rpc/ipc/src/server/mod.rs +++ b/crates/rpc/ipc/src/server/mod.rs @@ -763,11 +763,7 @@ impl Builder { pub fn dummy_name() -> String { use rand::Rng; let num: u64 = rand::rng().random(); - if cfg!(windows) { - format!(r"\\.\pipe\my-pipe-{num}") - } else { - format!(r"/tmp/my-uds-{num}") - } + format!(r"/tmp/my-uds-{num}") } #[cfg(test)] diff --git a/crates/rpc/rpc-server-types/src/constants.rs b/crates/rpc/rpc-server-types/src/constants.rs index 8f52f611db..ed03dc8566 100644 --- a/crates/rpc/rpc-server-types/src/constants.rs +++ b/crates/rpc/rpc-server-types/src/constants.rs @@ -47,19 +47,9 @@ pub fn default_max_tracing_requests() -> usize { pub const DEFAULT_PROOF_PERMITS: usize = 25; /// The default IPC endpoint -#[cfg(windows)] -pub const DEFAULT_IPC_ENDPOINT: &str = r"\\.\pipe\reth.ipc"; - -/// The default IPC endpoint -#[cfg(not(windows))] pub const DEFAULT_IPC_ENDPOINT: &str = "/tmp/reth.ipc"; -/// The engine_api IPC endpoint -#[cfg(windows)] -pub const DEFAULT_ENGINE_API_IPC_ENDPOINT: &str = r"\\.\pipe\reth_engine_api.ipc"; - /// The `engine_api` IPC endpoint -#[cfg(not(windows))] pub const DEFAULT_ENGINE_API_IPC_ENDPOINT: &str = "/tmp/reth_engine_api.ipc"; /// The default limit for blocks count in `eth_simulateV1`. diff --git a/docs/cli/help.rs b/docs/cli/help.rs index 692720111d..d5971e70d8 100755 --- a/docs/cli/help.rs +++ b/docs/cli/help.rs @@ -460,7 +460,6 @@ fn preprocess_help(s: &str) -> Cow<'_, str> { // rustup available targets: // aarch64-apple-darwin // x86_64-unknown-linux-gnu - // x86_64-pc-windows-gnu ( r"default: reth/.*-[0-9A-Fa-f]{6,10}/([_\w]+)-(\w+)-(\w+)(-\w+)?", "default: reth/-/",