arvo: retool for goerli instead of deprecated ropsten

This commit is contained in:
Liam Fitzgerald 2022-10-26 13:01:32 +10:00
parent 361384d15c
commit ed96e6162c
20 changed files with 75 additions and 75 deletions

View File

@ -1,4 +1,4 @@
.PHONY: build build-all install cross release test pills ropsten-pills clean
.PHONY: build build-all install cross release test pills goerli-pills clean
build:
nix-build -A urbit --no-out-link
@ -17,8 +17,8 @@ pills:
sh/update-brass-pill
sh/update-ivory-pill
ropsten-pills:
sh/create-ropsten-pills
goerli-pills:
sh/create-goerli-pills
interface:
sh/build-interface

View File

@ -117,8 +117,8 @@ let
pill = solid.lfs;
};
ivory-ropsten = ivory.override { arvo = arvo.ropsten; };
brass-ropsten = brass.override { arvo = arvo.ropsten; };
ivory-goerli = ivory.override { arvo = arvo.goerli; };
brass-goerli = brass.override { arvo = arvo.goerli; };
# Create a .tgz of the primary binaries.
tarball = let

View File

@ -5,16 +5,16 @@ stdenvNoCC.mkDerivation {
src = marsSources;
outputs = [ "out" "ropsten" ];
outputs = [ "out" "goerli" ];
phases = [ "mainnetPhase" "ropstenPhase" ];
phases = [ "mainnetPhase" "goerliPhase" ];
mainnetPhase = ''
ln -s ${marsSources.out}/arvo $out
'';
ropstenPhase = ''
ln -s ${marsSources.ropsten}/arvo $ropsten
goerliPhase = ''
ln -s ${marsSources.goerli}/arvo $goerli
'';
preferLocalBuild = true;

View File

@ -6,16 +6,16 @@ stdenvNoCC.mkDerivation {
buildInputs = [ bc ];
outputs = [ "out" "ropsten" ];
outputs = [ "out" "goerli" ];
phases = [ "mainnetPhase" "ropstenPhase" ];
phases = [ "mainnetPhase" "goerliPhase" ];
mainnetPhase = ''
cp -r $src $out
chmod -R u+w $out
'';
ropstenPhase = ''
goerliPhase = ''
cp -r $src tmp
chmod -R u+w tmp
@ -23,9 +23,9 @@ stdenvNoCC.mkDerivation {
AMES=tmp/arvo/sys/vane/ames.hoon
ACME=tmp/arvo/app/acme.hoon
# Replace the mainnet azimuth contract with the ropsten contract
# Replace the mainnet azimuth contract with the goerli contract
sed --in-place \
's/\(\+\+ contracts \)mainnet\-contracts/\1ropsten-contracts/' \
's/\(\+\+ contracts \)mainnet\-contracts/\1goerli-contracts/' \
$ZUSE
# Increment the %ames protocol version
@ -38,8 +38,8 @@ stdenvNoCC.mkDerivation {
's_https://acme-v02.api.letsencrypt.org/directory_https://acme-staging-v02.api.letsencrypt.org/directory_' \
$ACME
cp -r tmp $ropsten
chmod -R u+w $ropsten
cp -r tmp $goerli
chmod -R u+w $goerli
'';
preferLocalBuild = true;

View File

@ -1,5 +1,5 @@
{ lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl
, withRopsten ? false }:
, withGoerli ? false }:
let
@ -9,9 +9,9 @@ in {
build = import ./builder.nix {
inherit stdenvNoCC urbit curl;
name = "brass" + lib.optionalString withRopsten "-ropsten";
name = "brass" + lib.optionalString withGoerli "-goerli";
builder = ./brass.sh;
arvo = if withRopsten then arvo.ropsten else arvo;
arvo = if withGoerli then arvo.goerli else arvo;
pier = bootFakeShip {
inherit urbit;
@ -19,4 +19,4 @@ in {
ship = "zod";
};
};
} // lib.optionalAttrs (!withRopsten) { inherit lfs; }
} // lib.optionalAttrs (!withGoerli) { inherit lfs; }

View File

@ -1,5 +1,5 @@
{ lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl, xxd
, withRopsten ? false }:
, withGoerli ? false }:
let
@ -9,9 +9,9 @@ in {
build = import ./builder.nix {
inherit stdenvNoCC urbit curl;
name = "ivory" + lib.optionalString withRopsten "-ropsten";
name = "ivory" + lib.optionalString withGoerli "-goerli";
builder = ./ivory.sh;
arvo = if withRopsten then arvo.ropsten else arvo;
arvo = if withGoerli then arvo.goerli else arvo;
pier = bootFakeShip {
inherit urbit;
@ -39,4 +39,4 @@ in {
preferLocalBuild = true;
};
} // lib.optionalAttrs (!withRopsten) { inherit lfs; }
} // lib.optionalAttrs (!withGoerli) { inherit lfs; }

View File

@ -185,7 +185,7 @@
::
?- network
%mainnet 0x1
%ropsten 0x3
%goerli 0x5
%fakenet `@ux``@`1.337
[%other *] id.network
==

View File

@ -65,7 +65,7 @@
:: frequency: time to wait between sending batches (TODO fancier)
:: endpoint: ethereum rpc endpoint to use
:: contract: ethereum contract address
:: chain-id: mainnet, ropsten, local (https://chainid.network/)
:: chain-id: mainnet, goerli, local (https://chainid.network/)
:: resend-time: time to resend a batch with higher gas prie
:: update-rate: frequency to update the roller's predicted state
:: fallback-gas-price: default batch gas price
@ -1019,7 +1019,7 @@
=, azimuth
?- net.config
%mainnet mainnet-contracts
%ropsten ropsten-contracts
%goerli goerli-contracts
%local local-contracts
%default contracts
==

View File

@ -1,5 +1,5 @@
:: Change node url and network for azimuth
::
:- %say
|= [* [url=@ta net=?(%mainnet %ropsten %local %default) ~] ~]
|= [* [url=@ta net=?(%mainnet %goerli %local %default) ~] ~]
[%azimuth-poke %watch url net]

View File

@ -1,4 +1,4 @@
::
:- %say
|= [* [url=@t net=?(%mainnet %ropsten %local) ~] ~]
|= [* [url=@t net=?(%mainnet %goerli %local) ~] ~]
[%roller-action %config %endpoint url net]

View File

@ -0,0 +1,10 @@
:: Configures /app/roller to listen to a Goerli Infura node
::
:- %say
|= *
:* %roller-action
%config
%endpoint
'https://goerli.infura.io/v3/2599df54929b47099bda360958d75aaf'
%goerli
==

View File

@ -1,10 +0,0 @@
:: Configures /app/roller to listen to a Ropsten Infura node
::
:- %say
|= *
:* %roller-action
%config
%endpoint
'https://ropsten.infura.io/v3/2599df54929b47099bda360958d75aaf'
%ropsten
==

View File

@ -25,7 +25,7 @@
|= =network
?+ network ~&(%careful-fallback-contracts mainnet-contracts:azimuth)
%mainnet mainnet-contracts:azimuth
%ropsten ropsten-contracts:azimuth
%goerli goerli-contracts:azimuth
==
::
++ encode-claz-call

View File

@ -32,9 +32,9 @@
^- [azimuth=@ux naive=@ux chain-id=@ launch=@]
=< [azimuth naive chain-id launch]
=, azimuth
?- net
?+ net !!
%mainnet mainnet-contracts
%ropsten ropsten-contracts
%goerli goerli-contracts
%local local-contracts
%default contracts
==

View File

@ -11,7 +11,7 @@
::
++ network
$? %mainnet
%ropsten
%goerli
%fakenet
[%other id=@]
==

View File

@ -8,7 +8,7 @@
+$ sponsors (map ship [residents=(set ship) requests=(set ship)])
+$ history (map address:ethereum (tree hist-tx))
+$ events (list event-log:rpc:ethereum)
+$ net ?(%mainnet %ropsten %local %default)
+$ net ?(%mainnet %ropsten %goerli %local %default)
+$ snap-state [%0 =id:block:jael nas=^state:naive =owners =sponsors]
::
+$ config

View File

@ -50,7 +50,7 @@
+$ address address:naive :: @ux
+$ keccak @ux :: used for transaction and roll hashes
+$ blocknum number:block :: @udblocknumber
+$ net net:dice :: ?(%mainnet %ropsten %local %default)
+$ net net:dice :: ?(%mainnet %goerli %local %default)
+$ roll-dat :: all data required for each roll
[[gas=@ud sender=address] =effects:naive]
+$ block-dat :: all data required for each block

View File

@ -114,29 +114,29 @@
::
:: Testnet contract addresses
::
++ ropsten-contracts
++ goerli-contracts
|%
++ azimuth
0x308a.b6a6.024c.f198.b57e.008d.0ac9.ad02.1988.6579
0xbb61.fa68.3e4b.9104.18e2.7b00.a143.8a93.6234.df52
::
++ ecliptic
0x8b9f.86a2.8921.d9c7.05b3.113a.755f.b979.e1bd.1bce
0xe129.0a32.9014.5e63.e6a8.ec1e.f661.6906.856d.0c8f
::
++ linear-star-release
0x1f8e.dd03.1ee4.1474.0aed.b39b.84fb.8f2f.66ca.422f
0x0
::
++ conditional-star-release
0x0
::
++ delegated-sending
0x3e8c.a510.354b.c2fd.bbd6.1502.52d9.3105.c9c2.7bbe
0x0
::
++ naive
0xe7cf.4b83.06d3.11ba.ca15.585f.e3f0.7cd0.441c.21d1
0x56e3.7137.cdaf.c026.a732.e8e8.40cd.621e.d50b.d210
::
++ launch 4.601.630
++ public launch
++ chain-id 3
++ launch 7.834.742
++ public 7.834.800
++ chain-id 5
--
::
:: Local contract addresses

21
sh/create-goerli-pills Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Usage: create-goerli-pills
# Build the ivory and brass goerli pills, copying them to the local directory,
# named with the current give revision
set -xeuo pipefail
cd "${0%/*}/.."
rev="$(git rev-parse HEAD)"
sha="${rev:0:5}"
brass="brass-goerli-${sha}.pill"
ivory="ivory-goerli-${sha}.pill"
cp -f "$(nix-build -A brass-goerli.build --no-out-link)" "$brass"
cp -f "$(nix-build -A ivory-goerli.build --no-out-link)" "$ivory"
chmod 0644 "$brass" "$ivory"

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Usage: create-ropsten-pills
# Build the ivory and brass ropsten pills, copying them to the local directory,
# named with the current give revision
set -xeuo pipefail
cd "${0%/*}/.."
rev="$(git rev-parse HEAD)"
sha="${rev:0:5}"
brass="brass-ropsten-${sha}.pill"
ivory="ivory-ropsten-${sha}.pill"
cp -f "$(nix-build -A brass-ropsten.build --no-out-link)" "$brass"
cp -f "$(nix-build -A ivory-ropsten.build --no-out-link)" "$ivory"
chmod 0644 "$brass" "$ivory"