build: add Ropsten derivations for arvo and pills

Arvo testnets typically use Ropsten's deploy of the Azimuth contract
instead of mainnet's.  This commit adds an 'arvo-ropsten' derivation for
Arvo as specialised to Ropsten.

In addition to using a different Azimuth address in %zuse, this also
configures %ames and :acme appropriately for running an alternate
network on Ropsten.  %ames has its protocol version incremented, and
:acme uses the Let's Encrypt staging API.

Included here are derivations for creating brass and ivory pills using
arvo-ropsten, to boot.
This commit is contained in:
Jared Tobin 2019-10-23 06:28:35 +08:00
parent 536e56d675
commit 0bdced981e
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
4 changed files with 60 additions and 5 deletions

View File

@ -2,10 +2,11 @@
let
tlon = import ../pkgs { inherit pkgs; };
arvo = tlon.arvo;
herb = tlon.herb;
urbit = if debug then tlon.urbit-debug else tlon.urbit;
tlon = import ../pkgs { inherit pkgs; };
arvo = tlon.arvo;
arvo-ropsten = tlon.arvo-ropsten;
herb = tlon.herb;
urbit = if debug then tlon.urbit-debug else tlon.urbit;
bootbrass = ../../bin/brass.pill;
bootsolid = ../../bin/solid.pill;
@ -17,6 +18,13 @@ let
arvo = null;
};
ropzod = import ./fakeship {
inherit pkgs herb urbit;
pill = bootsolid;
ship = "zod";
arvo = arvo-ropsten;
};
zod = import ./fakeship {
inherit pkgs herb urbit arvo;
pill = bootsolid;
@ -48,11 +56,23 @@ rec {
pier = zod;
};
brass-ropsten = import ./brass {
inherit pkgs herb urbit;
arvo = arvo-ropsten;
pier = ropzod;
};
ivory = import ./ivory {
inherit pkgs herb urbit arvo;
pier = zod;
};
ivory-ropsten = import ./ivory {
inherit pkgs herb urbit;
arvo = arvo-ropsten;
pier = ropzod;
};
image = import ./image {
inherit pkgs urbit;
pill = bootsolid;

View File

@ -0,0 +1,26 @@
source $stdenv/setup
cp -r $src tmp
chmod -R u+w tmp
ZUSE=tmp/sys/zuse.hoon
AMES=tmp/sys/vane/ames.hoon
ACME=tmp/app/acme.hoon
# replace the mainnet azimuth contract with the ropsten contract
sed --in-place \
's/\(\+\+ contracts \)mainnet\-contracts/\1ropsten-contracts/' \
$ZUSE
# increment the %ames protocol version
sed -r --in-place \
's/^(=\+ protocol\-version=)([0-9])/echo "\1$(echo "(\2+1) % 8" | bc)"/e' \
$AMES
# use the staging API in :acme
sed --in-place \
's_https://acme-v02.api.letsencrypt.org/directory_https://acme-staging-v02.api.letsencrypt.org/directory_' \
$ACME
cp -r tmp $out
chmod -R u+w $out

View File

@ -0,0 +1,8 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
name = "arvo-ropsten";
buildInputs = [ pkgs.bc ];
builder = ./builder.sh;
src = pkgs.buildRustCrateHelpers.exclude [ ".git" ] ../../../pkg/arvo;
}

View File

@ -6,6 +6,7 @@ let
ent = import ./ent { inherit pkgs; };
arvo = import ./arvo { inherit pkgs; };
arvo-ropsten = import ./arvo-ropsten { inherit pkgs; };
herb = import ../../pkg/herb { inherit pkgs; };
ge-additions = import ./ge-additions {
@ -25,4 +26,4 @@ let
in
{ inherit ent ge-additions arvo herb urbit urbit-debug; }
{ inherit ent ge-additions arvo arvo-ropsten herb urbit urbit-debug; }