From f87120095ab6b6b68aedb6f2a8e90c5b07863baf Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 15 Nov 2018 20:24:38 -0500 Subject: [PATCH 1/6] removes -M ("memory madness") --- include/vere/vere.h | 1 - vere/main.c | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/vere/vere.h b/include/vere/vere.h index 05506b86c5..7518e75230 100644 --- a/include/vere/vere.h +++ b/include/vere/vere.h @@ -600,7 +600,6 @@ c3_o gab; // -g, run with garbage collector c3_o has; // -S, Skip battery hashes c3_o git; // -s, pill url from arvo git hash - c3_o mem; // -M, memory madness c3_o net; // -N, remote networking in -F mode c3_o nuu; // -c, new pier c3_o pro; // -P, profile diff --git a/vere/main.c b/vere/main.c index c96cf8fcf6..9b9e05fe64 100644 --- a/vere/main.c +++ b/vere/main.c @@ -83,7 +83,6 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.git = c3n; u3_Host.ops_u.has = c3n; u3_Host.ops_u.net = c3n; - u3_Host.ops_u.mem = c3n; u3_Host.ops_u.nuu = c3n; u3_Host.ops_u.pro = c3n; u3_Host.ops_u.qui = c3n; @@ -92,12 +91,8 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.veb = c3n; u3_Host.ops_u.kno_w = DefaultKernel; - while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:l:n:p:r:NabcdgqstvxMPDXRS")) != -1 ) { + while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:l:n:p:r:NabcdgqstvxPDXRS")) != -1 ) { switch ( ch_i ) { - case 'M': { - u3_Host.ops_u.mem = c3y; - break; - } case 'B': { u3_Host.ops_u.pil_c = strdup(optarg); break; @@ -377,7 +372,6 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-K stage Start at Hoon kernel version stage\n", "-k keys Private key file\n", "-l port Initial peer port\n", - "-M Memory madness\n", "-n host Set unix hostname\n", "-N Enable networking in fake mode (-F)\n", "-p ames_port Set the ames port to bind to\n", From 0148b101e7d9f0c48422c4c419629c441027a427 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 15 Nov 2018 20:27:15 -0500 Subject: [PATCH 2/6] removes -X ("skip last event") --- include/vere/vere.h | 1 - vere/main.c | 8 +------- vere/sist.c | 4 ---- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/include/vere/vere.h b/include/vere/vere.h index 7518e75230..3bba22eb68 100644 --- a/include/vere/vere.h +++ b/include/vere/vere.h @@ -596,7 +596,6 @@ c3_o etn; // -t, use snapshot exclusively to boot c3_c* ets_c; // -E, eth snapshot c3_c* fak_c; // -F, fake ship - c3_o fog; // -X, skip last event c3_o gab; // -g, run with garbage collector c3_o has; // -S, Skip battery hashes c3_o git; // -s, pill url from arvo git hash diff --git a/vere/main.c b/vere/main.c index 9b9e05fe64..c885151b1a 100644 --- a/vere/main.c +++ b/vere/main.c @@ -78,7 +78,6 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.dem = c3n; u3_Host.ops_u.dry = c3n; u3_Host.ops_u.etn = c3n; - u3_Host.ops_u.fog = c3n; u3_Host.ops_u.gab = c3n; u3_Host.ops_u.git = c3n; u3_Host.ops_u.has = c3n; @@ -91,7 +90,7 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.veb = c3n; u3_Host.ops_u.kno_w = DefaultKernel; - while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:l:n:p:r:NabcdgqstvxPDXRS")) != -1 ) { + while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:l:n:p:r:NabcdgqstvxPDRS")) != -1 ) { switch ( ch_i ) { case 'B': { u3_Host.ops_u.pil_c = strdup(optarg); @@ -134,10 +133,6 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.tex = c3y; break; } - case 'X': { - u3_Host.ops_u.fog = c3y; - break; - } case 'f': { if ( c3n == _main_readw(optarg, 100, &u3_Host.ops_u.fuz_w) ) { return c3n; @@ -385,7 +380,6 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-v Verbose\n", "-w name Boot as ~name\n", "-x Exit immediately\n", - "-Xwtf Skip last event\n", "\n", "Development Usage:\n", " To create a development ship, use a fakezod:\n", diff --git a/vere/sist.c b/vere/sist.c index 9163dcd49f..6116f51518 100644 --- a/vere/sist.c +++ b/vere/sist.c @@ -1026,10 +1026,6 @@ _sist_rest() { fprintf(stderr, "replay: skipped veer\n"); } - else if ( c3y == u3_Host.ops_u.fog && - u3_nul == t_roe ) { - fprintf(stderr, "replay: -Xwtf, skipped last event\n"); - } else { _sist_sing(u3k(ovo)); fputc('.', stderr); From 3edcd47b7c4be25a0f505ef61cc4491b0adedbf5 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 15 Nov 2018 20:33:08 -0500 Subject: [PATCH 3/6] removes the option to set -l, -n, and -r (raft options) --- vere/main.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/vere/main.c b/vere/main.c index c885151b1a..1a0a507199 100644 --- a/vere/main.c +++ b/vere/main.c @@ -90,7 +90,11 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.veb = c3n; u3_Host.ops_u.kno_w = DefaultKernel; - while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:l:n:p:r:NabcdgqstvxPDRS")) != -1 ) { + u3_Host.ops_u.rop_s = 0; + u3_Host.ops_u.raf_c = 0; + u3_Host.ops_u.nam_c = 0; + + while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:p:NabcdgqstvxPDRS")) != -1 ) { switch ( ch_i ) { case 'B': { u3_Host.ops_u.pil_c = strdup(optarg); @@ -149,26 +153,12 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.key_c = strdup(optarg); break; } - case 'l': { - if ( c3n == _main_readw(optarg, 65536, &arg_w) ) { - return c3n; - } else u3_Host.ops_u.rop_s = arg_w; - break; - } - case 'n': { - u3_Host.ops_u.nam_c = strdup(optarg); - break; - } case 'p': { if ( c3n == _main_readw(optarg, 65536, &arg_w) ) { return c3n; } else u3_Host.ops_u.por_s = arg_w; break; } - case 'r': { - u3_Host.ops_u.raf_c = strdup(optarg); - break; - } case 'R': { u3_Host.ops_u.rep = c3y; return c3y; @@ -248,11 +238,6 @@ _main_getopt(c3_i argc, c3_c** argv) return c3n; } - if ( u3_Host.ops_u.rop_s == 0 && u3_Host.ops_u.raf_c != 0 ) { - fprintf(stderr, "The -r flag requires -l.\n"); - return c3n; - } - if ( c3y == u3_Host.ops_u.bat ) { u3_Host.ops_u.dem = c3y; u3_Host.ops_u.nuu = c3y; @@ -366,13 +351,10 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-g Set GC flag\n", "-K stage Start at Hoon kernel version stage\n", "-k keys Private key file\n", - "-l port Initial peer port\n", - "-n host Set unix hostname\n", "-N Enable networking in fake mode (-F)\n", "-p ames_port Set the ames port to bind to\n", "-P Profiling\n", "-q Quiet\n", - "-r host Initial peer address\n", "-R Report urbit build info\n", "-s Pill URL from arvo git hash\n", "-S Disable battery hashing\n", From eaab7dda8f76ba55209257c9e57da7b4b505f5cf Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 16 Nov 2018 11:49:55 -0500 Subject: [PATCH 4/6] replaces -N (enable fake networking) with -L (disable networking) --- include/vere/vere.h | 2 +- vere/main.c | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/vere/vere.h b/include/vere/vere.h index 3bba22eb68..1bbf75ba3f 100644 --- a/include/vere/vere.h +++ b/include/vere/vere.h @@ -599,7 +599,7 @@ c3_o gab; // -g, run with garbage collector c3_o has; // -S, Skip battery hashes c3_o git; // -s, pill url from arvo git hash - c3_o net; // -N, remote networking in -F mode + c3_o net; // -L, local networking only c3_o nuu; // -c, new pier c3_o pro; // -P, profile c3_o qui; // -q, quiet diff --git a/vere/main.c b/vere/main.c index 1a0a507199..0b2d7113e1 100644 --- a/vere/main.c +++ b/vere/main.c @@ -81,7 +81,7 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.gab = c3n; u3_Host.ops_u.git = c3n; u3_Host.ops_u.has = c3n; - u3_Host.ops_u.net = c3n; + u3_Host.ops_u.net = c3y; u3_Host.ops_u.nuu = c3n; u3_Host.ops_u.pro = c3n; u3_Host.ops_u.qui = c3n; @@ -94,7 +94,7 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.raf_c = 0; u3_Host.ops_u.nam_c = 0; - while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:p:NabcdgqstvxPDRS")) != -1 ) { + while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:p:LabcdgqstvxPDRS")) != -1 ) { switch ( ch_i ) { case 'B': { u3_Host.ops_u.pil_c = strdup(optarg); @@ -163,7 +163,7 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.rep = c3y; return c3y; } - case 'N': { u3_Host.ops_u.net = c3y; break; } + case 'L': { u3_Host.ops_u.net = c3n; break; } case 'a': { u3_Host.ops_u.abo = c3y; break; } case 'b': { u3_Host.ops_u.bat = c3y; break; } case 'c': { u3_Host.ops_u.nuu = c3y; break; } @@ -198,16 +198,9 @@ _main_getopt(c3_i argc, c3_c** argv) return c3n; } - // XX revisit - if ( (0 == u3_Host.ops_u.fak_c) && (c3y == u3_Host.ops_u.net) ) { - // fprintf(stderr, "-N only makes sense with -F\n"); - u3_Host.ops_u.net = c3n; - } else if ( (0 == u3_Host.ops_u.fak_c) && (c3n == u3_Host.ops_u.net) ) { - u3_Host.ops_u.net = c3y; /* remote networking is always on in real mode. */ - } - if ( 0 != u3_Host.ops_u.fak_c ) { u3_Host.ops_u.has = c3y; /* no battery hashing on fake ships. */ + u3_Host.ops_u.net = c3n; /* no networking on fake ships. */ } if ( u3_Host.ops_u.arv_c != 0 && !imp_t ) { @@ -351,7 +344,7 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-g Set GC flag\n", "-K stage Start at Hoon kernel version stage\n", "-k keys Private key file\n", - "-N Enable networking in fake mode (-F)\n", + "-L local networking only\n", "-p ames_port Set the ames port to bind to\n", "-P Profiling\n", "-q Quiet\n", From 80b1d34aa633683bf86a0009b3c92e32a602cd0e Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 16 Nov 2018 12:03:08 -0500 Subject: [PATCH 5/6] alphabetizes u3_opts and usage instructions --- include/vere/vere.h | 48 ++++++++++++++++++++++----------------------- vere/main.c | 8 ++++---- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/vere/vere.h b/include/vere/vere.h index 1bbf75ba3f..b9bb5f533d 100644 --- a/include/vere/vere.h +++ b/include/vere/vere.h @@ -580,37 +580,37 @@ */ typedef struct _u3_opts { c3_c* arv_c; // -A, initial sync from - c3_c* dns_c; // -H, ames bootstrap domain - c3_c* gen_c; // -G, czar generator - c3_c* nam_c; // -n, unix hostname + c3_o abo; // -a, abort aggressively c3_c* pil_c; // -B, bootstrap from - c3_c* raf_c; // -r, raft flotilla - c3_c* url_c; // -u, pill url - c3_c* who_c; // -w, begin with ticket - c3_c* key_c; // -K, private key file - c3_o abo; // -a c3_o bat; // -b, batch create - c3_o dem; // -d, daemon - c3_o dry; // -D, dry compute - c3_c* eth_c; // -e, ethereum node url - c3_o etn; // -t, use snapshot exclusively to boot - c3_c* ets_c; // -E, eth snapshot - c3_c* fak_c; // -F, fake ship - c3_o gab; // -g, run with garbage collector - c3_o has; // -S, Skip battery hashes - c3_o git; // -s, pill url from arvo git hash - c3_o net; // -L, local networking only c3_o nuu; // -c, new pier + c3_o dry; // -D, dry compute, no checkpoint + c3_o dem; // -d, daemon + c3_c* ets_c; // -E, eth snapshot + c3_c* eth_c; // -e, ethereum node url + c3_c* fak_c; // -F, fake ship + c3_w fuz_w; // -f, fuzz testing + c3_c* gen_c; // -G, czar generator + c3_o gab; // -g, test garbage collection + c3_c* dns_c; // -H, ames bootstrap domain + c3_w kno_w; // -K, kernel version + c3_c* key_c; // -k, private key file + c3_o net; // -L, local-only networking + c3_s rop_s; // -l, raft port + c3_c* nam_c; // -n, unix hostname c3_o pro; // -P, profile + c3_s por_s; // -p, ames port c3_o qui; // -q, quiet c3_o rep; // -R, report build info - c3_o tex; // -x, exit after loading - c3_o veb; // -v, verbose (inverse of -q) + c3_c* raf_c; // -r, raft flotilla + c3_o has; // -S, Skip battery hashes + c3_o git; // -s, pill url from arvo git hash + c3_o etn; // -t, use snapshot exclusively to boot + c3_c* url_c; // -u, pill url c3_o vno; // -V, replay without reboots - c3_s por_s; // -p, ames port - c3_s rop_s; // -l, raft port - c3_w fuz_w; // -f, fuzz testing - c3_w kno_w; // -k, kernel version + c3_o veb; // -v, verbose (inverse of -q) + c3_c* who_c; // -w, begin with ticket + c3_o tex; // -x, exit after loading } u3_opts; /* u3_host: entire host. diff --git a/vere/main.c b/vere/main.c index 0b2d7113e1..2c6fd9bad0 100644 --- a/vere/main.c +++ b/vere/main.c @@ -333,11 +333,11 @@ u3_ve_usage(c3_i argc, c3_c** argv) "without the leading '~', and options is some subset of the following:\n", "\n", "-A dir Use dir for initial galaxy sync\n", - "-b Batch create\n", "-B pill Bootstrap from this pill\n", + "-b Batch create\n", "-c pier Create a new urbit in pier/\n", - "-d Daemon mode\n", "-D Recompute from events\n", + "-d Daemon mode\n", "-e url Ethereum gateway\n", "-F ship Fake keys; also disables networking\n", "-f Fuzz testing\n", @@ -345,12 +345,12 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-K stage Start at Hoon kernel version stage\n", "-k keys Private key file\n", "-L local networking only\n", - "-p ames_port Set the ames port to bind to\n", "-P Profiling\n", + "-p ames_port Set the ames port to bind to\n", "-q Quiet\n", "-R Report urbit build info\n", - "-s Pill URL from arvo git hash\n", "-S Disable battery hashing\n", + "-s Pill URL from arvo git hash\n", "-u url URL from which to download pill\n", "-v Verbose\n", "-w name Boot as ~name\n", From 42c61039a49049333419a9a0fa28dfe7bceb3b19 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 16 Nov 2018 19:44:47 -0500 Subject: [PATCH 6/6] refines -F argument handling --- vere/main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/vere/main.c b/vere/main.c index 2c6fd9bad0..0ae11fca2c 100644 --- a/vere/main.c +++ b/vere/main.c @@ -189,20 +189,13 @@ _main_getopt(c3_i argc, c3_c** argv) } u3_Host.ops_u.who_c = strdup(u3_Host.ops_u.fak_c); + u3_Host.ops_u.has = c3y; /* no battery hashing on fake ships. */ + u3_Host.ops_u.net = c3n; /* no networking on fake ships. */ + u3_Host.ops_u.nuu = c3y; } c3_t imp_t = ( (0 != u3_Host.ops_u.who_c) && (4 == strlen(u3_Host.ops_u.who_c)) ); - if ( (0 != u3_Host.ops_u.fak_c) && (c3n == u3_Host.ops_u.nuu) ) { - fprintf(stderr, "-F only makes sense on initial boot\n"); - return c3n; - } - - if ( 0 != u3_Host.ops_u.fak_c ) { - u3_Host.ops_u.has = c3y; /* no battery hashing on fake ships. */ - u3_Host.ops_u.net = c3n; /* no networking on fake ships. */ - } - if ( u3_Host.ops_u.arv_c != 0 && !imp_t ) { fprintf(stderr, "-A only makes sense when creating a new galaxy\n"); return c3n;