diff --git a/Formula/cartesi-rollups-node.rb b/Formula/cartesi-rollups-node.rb index 2336c90..5feb4a1 100644 --- a/Formula/cartesi-rollups-node.rb +++ b/Formula/cartesi-rollups-node.rb @@ -1,8 +1,8 @@ class CartesiRollupsNode < Formula desc "Reference implementation of the Cartesi Rollups Node" homepage "https://github.com/cartesi/rollups-node" - url "https://github.com/cartesi/rollups-node/archive/refs/tags/v2.0.0-alpha.12.tar.gz" - sha256 "8fcf4d775c7637b7698e642c70c31b7c16af28b77c118207a90d93da6187fc9a" + url "https://github.com/cartesi/rollups-node/archive/refs/tags/v2.0.0-alpha.13.tar.gz" + sha256 "05a4ba96c3c69cd802a93c909479dce69d70e4adebe39cdd59cabce26f21ef01" license "Apache-2.0" livecheck do @@ -10,22 +10,14 @@ class CartesiRollupsNode < Formula regex(/^v?(\d+(?:\.\d+)+(?:-alpha\.\d+)?)$/i) end - bottle do - root_url "https://ghcr.io/v2/cartesi/tap" - sha256 cellar: :any, arm64_tahoe: "4f403018e8acec663cfd4b498d499b85a05c15be4d516490fe0d67ef11b26b74" - sha256 cellar: :any, arm64_sequoia: "0252680120275a942b194412fd3afeb13e28760c54ffafffa74032b89275c570" - end - depends_on "go" => :build - # 2.0.0-alpha.x builds against the 0.20 C API (machine-c-api.h), which the - # current cartesi-machine-emulator (0.21) renamed and changed. - depends_on "cartesi-machine-emulator@0.20" + depends_on "cartesi-machine-emulator" def install - emulator = Formula["cartesi-machine-emulator@0.20"] + emulator = Formula["cartesi-machine-emulator"] - # The emulator is keg-only, so point cgo at its headers and libraries and - # bake an rpath so the node binaries find libcartesi at runtime. + # Point cgo at the emulator's headers and libraries and bake an rpath to its + # opt prefix so the node binaries find libcartesi at runtime. ENV["CGO_CFLAGS"] = "-I#{emulator.opt_include}" ENV["CGO_LDFLAGS"] = "-L#{emulator.opt_lib}" ldflags = %W[ @@ -34,10 +26,10 @@ def install -r #{emulator.opt_lib} ] - # These link against libcartesi and spawn `cartesi-jsonrpc-machine`, which - # lives in the keg-only emulator and is therefore not on PATH. Build them - # into bin, then let env_script_all_files move everything currently in bin - # to libexec/bin and leave wrappers in bin that prepend the emulator's bin. + # These link against libcartesi and spawn `cartesi-jsonrpc-machine`. Build + # them into bin, then let env_script_all_files move everything currently in + # bin to libexec/bin and leave wrappers in bin that prepend the emulator's + # bin, so the server is found even when the Homebrew prefix is not on PATH. machine_binaries = %w[node advancer validator] machine_binaries.each do |name| system "go", "build", *std_go_args(ldflags:, output: bin/"cartesi-rollups-#{name}"), @@ -55,7 +47,7 @@ def install test do assert_match "cartesi-rollups-cli version #{version}", shell_output("#{bin}/cartesi-rollups-cli --version") - # Exercises the wrapper and dynamic linking against the keg-only emulator. + # Exercises the wrapper and dynamic linking against the emulator. assert_match "cartesi-rollups-node version #{version}", shell_output("#{bin}/cartesi-rollups-node --version") assert_match "cartesi-rollups-advancer version #{version}", shell_output("#{bin}/cartesi-rollups-advancer --version") diff --git a/README.md b/README.md index 0268bdb..ac5d3c0 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Homebrew 5.x and earlier there is no `brew trust` command and no trust step is n | [`cartesi`](Formula/cartesi.rb) | CLI for developing Cartesi applications ([cartesi/cli](https://github.com/cartesi/cli)) | | [`cartesi-machine`](Formula/cartesi-machine.rb) | Metapackage that pulls in the emulator plus the Linux and rootfs images | | [`cartesi-machine-emulator`](Formula/cartesi-machine-emulator.rb) | Off-chain implementation of the Cartesi Machine ([cartesi/machine-emulator](https://github.com/cartesi/machine-emulator)) | -| [`cartesi-machine-emulator@0.20`](Formula/cartesi-machine-emulator@0.20.rb) | Keg-only emulator 0.20, kept for `cartesi-rollups-node` which still targets its C API | +| [`cartesi-machine-emulator@0.20`](Formula/cartesi-machine-emulator@0.20.rb) | Keg-only emulator 0.20, for software that still targets its C API | | [`cartesi-machine-linux-image`](Formula/cartesi-machine-linux-image.rb) | Kernel image for the Cartesi Machine ([cartesi/machine-linux-image](https://github.com/cartesi/machine-linux-image)) | | [`cartesi-machine-rootfs-image`](Formula/cartesi-machine-rootfs-image.rb) | Rootfs image for the Cartesi Machine ([cartesi/machine-guest-tools](https://github.com/cartesi/machine-guest-tools)) | | [`cartesi-rollups-node`](Formula/cartesi-rollups-node.rb) | Reference implementation of the Cartesi Rollups Node ([cartesi/rollups-node](https://github.com/cartesi/rollups-node)) | @@ -89,9 +89,7 @@ cartesi-rollups-node --version cartesi-rollups-cli --help ``` -`cartesi-rollups-node` pulls in `cartesi-machine-emulator@0.20`, a keg-only build of the emulator -that the 2.0.0-alpha node series still compiles against. It does not conflict with the current -`cartesi-machine-emulator` and is not linked into `bin`; the node binaries find it on their own. +`cartesi-rollups-node` builds against the current `cartesi-machine-emulator` and pulls it in. Running the node still needs a PostgreSQL database and an Ethereum JSON-RPC endpoint, configured through `CARTESI_*` environment variables as described in the [node documentation](https://github.com/cartesi/rollups-node).