From 4caecf34aee2f044735dffd1c6b76ed7d12785b1 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 9 Jul 2020 15:57:18 +0200 Subject: [PATCH] print auth token ; set seal delay ; disable permissioned api proxies ; bump balances (#122) * print auth token ; set seal delay * disable permissioned proxy /2 (#123) * bump up balances (#124) * upgrade go.mod to use latest lotus next * make compiler happy due to change in APIs * fix k8s compositions to use natural time mining * add note for balances --- docker-images/Dockerfile.oni-runtime-debug | 28 ++++++++++ .../compositions/composition-drand-halt.toml | 2 +- .../compositions/composition-k8s-10-3.toml | 6 ++- .../compositions/composition-k8s-3-1.toml | 6 ++- .../compositions/composition-k8s-3-2.toml | 6 ++- lotus-soup/compositions/composition-k8s.toml | 5 +- .../compositions/composition-local-drand.toml | 2 +- .../compositions/composition-natural.toml | 2 +- ...sition-stress-test-concurrent-natural.toml | 2 +- .../composition-stress-test-concurrent.toml | 2 +- ...omposition-stress-test-serial-natural.toml | 2 +- .../composition-stress-test-serial.toml | 2 +- .../compositions/composition-tracer.toml | 2 +- lotus-soup/compositions/composition.toml | 2 +- .../stress-test-concurrent-natural-k8s.toml | 2 +- lotus-soup/deals_e2e.go | 4 +- lotus-soup/deals_stress.go | 2 +- lotus-soup/go.mod | 6 +-- lotus-soup/go.sum | 51 +++++++++++-------- lotus-soup/testkit/role_client.go | 8 +-- lotus-soup/testkit/role_miner.go | 27 ++++++++-- 21 files changed, 118 insertions(+), 51 deletions(-) create mode 100644 docker-images/Dockerfile.oni-runtime-debug diff --git a/docker-images/Dockerfile.oni-runtime-debug b/docker-images/Dockerfile.oni-runtime-debug new file mode 100644 index 000000000..85087adbd --- /dev/null +++ b/docker-images/Dockerfile.oni-runtime-debug @@ -0,0 +1,28 @@ +ARG GO_VERSION=1.14.2 + +FROM golang:${GO_VERSION}-buster as downloader + +## Fetch the proof parameters. +## 1. Install the paramfetch binary first, so it can be cached over builds. +## 2. Then copy over the parameters (which could change). +## 3. Trigger the download. +## Output will be in /var/tmp/filecoin-proof-parameters. + +RUN go get github.com/filecoin-project/go-paramfetch/paramfetch +COPY /proof-parameters.json / +RUN paramfetch 2048 /proof-parameters.json + +## for debug purposes +RUN apt update && apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl && git clone https://github.com/filecoin-project/lotus.git && cd lotus/ && git checkout next && make clean && make all && make install + +FROM ubuntu:18.04 + +RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc pkg-config net-tools netcat traceroute iputils-ping wget vim curl telnet iproute2 dnsutils +COPY --from=downloader /var/tmp/filecoin-proof-parameters /var/tmp/filecoin-proof-parameters + +## for debug purposes +COPY --from=downloader /usr/local/bin/lotus /usr/local/bin/lll +COPY --from=downloader /usr/local/bin/lotus-storage-miner /usr/local/bin/lsm + +ENV FULLNODE_API_INFO="dummytoken:/ip4/127.0.0.1/tcp/1234/http" +ENV STORAGE_API_INFO="dummytoken:/ip4/127.0.0.1/tcp/2345/http" diff --git a/lotus-soup/compositions/composition-drand-halt.toml b/lotus-soup/compositions/composition-drand-halt.toml index ea9ef8cfc..ce2610dc1 100644 --- a/lotus-soup/compositions/composition-drand-halt.toml +++ b/lotus-soup/compositions/composition-drand-halt.toml @@ -21,7 +21,7 @@ [global.run.test_params] clients = "1" miners = "1" - balance = "2000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" random_beacon_type = "local-drand" genesis_timestamp_offset = "0" diff --git a/lotus-soup/compositions/composition-k8s-10-3.toml b/lotus-soup/compositions/composition-k8s-10-3.toml index 5ca13fae7..4afd3375e 100644 --- a/lotus-soup/compositions/composition-k8s-10-3.toml +++ b/lotus-soup/compositions/composition-k8s-10-3.toml @@ -24,8 +24,10 @@ [global.run.test_params] clients = "10" miners = "3" - genesis_timestamp_offset = "100000" - balance = "2000" + genesis_timestamp_offset = "0" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B + random_beacon_type = "mock" + mining_mode = "natural" [[groups]] id = "bootstrapper" diff --git a/lotus-soup/compositions/composition-k8s-3-1.toml b/lotus-soup/compositions/composition-k8s-3-1.toml index ae56d06a1..18ce024bb 100644 --- a/lotus-soup/compositions/composition-k8s-3-1.toml +++ b/lotus-soup/compositions/composition-k8s-3-1.toml @@ -24,9 +24,11 @@ [global.run.test_params] clients = "3" miners = "1" - genesis_timestamp_offset = "100000" - balance = "2000" + genesis_timestamp_offset = "0" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" + random_beacon_type = "mock" + mining_mode = "natural" [[groups]] id = "bootstrapper" diff --git a/lotus-soup/compositions/composition-k8s-3-2.toml b/lotus-soup/compositions/composition-k8s-3-2.toml index a06e34ad0..98d581c9d 100644 --- a/lotus-soup/compositions/composition-k8s-3-2.toml +++ b/lotus-soup/compositions/composition-k8s-3-2.toml @@ -24,9 +24,11 @@ [global.run.test_params] clients = "3" miners = "2" - genesis_timestamp_offset = "100000" - balance = "2000" + genesis_timestamp_offset = "0" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" + random_beacon_type = "mock" + mining_mode = "natural" [[groups]] id = "bootstrapper" diff --git a/lotus-soup/compositions/composition-k8s.toml b/lotus-soup/compositions/composition-k8s.toml index 9eec1346b..6c9462679 100644 --- a/lotus-soup/compositions/composition-k8s.toml +++ b/lotus-soup/compositions/composition-k8s.toml @@ -24,9 +24,10 @@ [global.run.test_params] clients = "1" miners = "1" - genesis_timestamp_offset = "100000" - balance = "2000" + genesis_timestamp_offset = "0" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" + mining_mode = "natural" [[groups]] id = "bootstrapper" diff --git a/lotus-soup/compositions/composition-local-drand.toml b/lotus-soup/compositions/composition-local-drand.toml index 351df7d19..e942ed072 100644 --- a/lotus-soup/compositions/composition-local-drand.toml +++ b/lotus-soup/compositions/composition-local-drand.toml @@ -21,7 +21,7 @@ [global.run.test_params] clients = "1" miners = "1" - balance = "2000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" random_beacon_type = "local-drand" genesis_timestamp_offset = "0" diff --git a/lotus-soup/compositions/composition-natural.toml b/lotus-soup/compositions/composition-natural.toml index e729155c8..bfef6b844 100644 --- a/lotus-soup/compositions/composition-natural.toml +++ b/lotus-soup/compositions/composition-natural.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "100000" - balance = "2000000000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" random_beacon_type = "mock" diff --git a/lotus-soup/compositions/composition-stress-test-concurrent-natural.toml b/lotus-soup/compositions/composition-stress-test-concurrent-natural.toml index a0661c726..7a059ac6a 100644 --- a/lotus-soup/compositions/composition-stress-test-concurrent-natural.toml +++ b/lotus-soup/compositions/composition-stress-test-concurrent-natural.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "0" - balance = "2000000000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "1000" random_beacon_type = "mock" diff --git a/lotus-soup/compositions/composition-stress-test-concurrent.toml b/lotus-soup/compositions/composition-stress-test-concurrent.toml index aa6ef8b07..1c6a9f0ed 100644 --- a/lotus-soup/compositions/composition-stress-test-concurrent.toml +++ b/lotus-soup/compositions/composition-stress-test-concurrent.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "100000" - balance = "2000000000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "1000" random_beacon_type = "mock" diff --git a/lotus-soup/compositions/composition-stress-test-serial-natural.toml b/lotus-soup/compositions/composition-stress-test-serial-natural.toml index 5a878c681..5de35dea2 100644 --- a/lotus-soup/compositions/composition-stress-test-serial-natural.toml +++ b/lotus-soup/compositions/composition-stress-test-serial-natural.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "0" - balance = "2000000000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "1000" random_beacon_type = "mock" diff --git a/lotus-soup/compositions/composition-stress-test-serial.toml b/lotus-soup/compositions/composition-stress-test-serial.toml index dc97b2705..87e595c51 100644 --- a/lotus-soup/compositions/composition-stress-test-serial.toml +++ b/lotus-soup/compositions/composition-stress-test-serial.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "100000" - balance = "2000000000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "1000" random_beacon_type = "mock" diff --git a/lotus-soup/compositions/composition-tracer.toml b/lotus-soup/compositions/composition-tracer.toml index 146aded35..db9f111d1 100644 --- a/lotus-soup/compositions/composition-tracer.toml +++ b/lotus-soup/compositions/composition-tracer.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "100000" - balance = "2000000000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" random_beacon_type = "mock" enable_pubsub_tracer = "true" diff --git a/lotus-soup/compositions/composition.toml b/lotus-soup/compositions/composition.toml index 39a72d2d4..be035b6eb 100644 --- a/lotus-soup/compositions/composition.toml +++ b/lotus-soup/compositions/composition.toml @@ -22,7 +22,7 @@ clients = "3" miners = "2" genesis_timestamp_offset = "0" - balance = "20000000.5" + balance = "20000000.5" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "10" random_beacon_type = "mock" mining_mode = "natural" diff --git a/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml b/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml index bc09366c7..5d80e6486 100644 --- a/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml +++ b/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml @@ -25,7 +25,7 @@ clients = "6" miners = "2" genesis_timestamp_offset = "0" - balance = "200000" + balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B sectors = "100" random_beacon_type = "mock" diff --git a/lotus-soup/deals_e2e.go b/lotus-soup/deals_e2e.go index e968d9145..f6cb65dad 100644 --- a/lotus-soup/deals_e2e.go +++ b/lotus-soup/deals_e2e.go @@ -82,7 +82,7 @@ func dealsE2E(t *testkit.TestEnvironment) error { // start deal t1 := time.Now() - deal := testkit.StartDeal(ctx, minerAddr.MinerActorAddr, client, fcid) + deal := testkit.StartDeal(ctx, minerAddr.MinerActorAddr, client, fcid.Root) t.RecordMessage("started deal: %s", deal) // TODO: this sleep is only necessary because deals don't immediately get logged in the dealstore, we should fix this @@ -95,7 +95,7 @@ func dealsE2E(t *testkit.TestEnvironment) error { carExport := true t.RecordMessage("trying to retrieve %s", fcid) - testkit.RetrieveData(t, ctx, client, fcid, carExport, data) + testkit.RetrieveData(t, ctx, client, fcid.Root, carExport, data) t.D().ResettingHistogram("deal.retrieved").Update(int64(time.Since(t1))) t.SyncClient.MustSignalEntry(ctx, testkit.StateStopMining) diff --git a/lotus-soup/deals_stress.go b/lotus-soup/deals_stress.go index 7285ec25a..03f9cec4c 100644 --- a/lotus-soup/deals_stress.go +++ b/lotus-soup/deals_stress.go @@ -72,7 +72,7 @@ func dealStressTest(t *testkit.TestEnvironment) error { data = append(data, dealData) files = append(files, dealFile) - cids = append(cids, dealCid) + cids = append(cids, dealCid.Root) } concurrentDeals := true diff --git a/lotus-soup/go.mod b/lotus-soup/go.mod index 03e5b0f98..4f3997a00 100644 --- a/lotus-soup/go.mod +++ b/lotus-soup/go.mod @@ -7,11 +7,11 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4 github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef - github.com/filecoin-project/go-fil-markets v0.3.2-0.20200706104419-7c180fe156d4 + github.com/filecoin-project/go-fil-markets v0.4.0 github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b - github.com/filecoin-project/lotus v0.4.2-0.20200706172415-cf6ac44b6ec5 - github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf + github.com/filecoin-project/lotus v0.4.2-0.20200708212122-7d841dbfa81c + github.com/filecoin-project/specs-actors v0.7.1 github.com/gorilla/mux v1.7.4 github.com/influxdata/influxdb v1.8.0 // indirect github.com/ipfs/go-cid v0.0.6 diff --git a/lotus-soup/go.sum b/lotus-soup/go.sum index a828a36d4..68134c4cc 100644 --- a/lotus-soup/go.sum +++ b/lotus-soup/go.sum @@ -66,9 +66,11 @@ github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= @@ -218,8 +220,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09 h1:GuiNSEZ9nc05LUpKhABw/SO6t9wqCfsJX1D0ByWQjkc= -github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09/go.mod h1:HEJn6kOXMNhCNBYNTO/lrEI7wSgqCOR6hN5ecfYUnC8= +github.com/filecoin-project/chain-validation v0.0.6-0.20200701165912-3b6aaaa32a66 h1:LyYxtZe2SA2U0MV+hmDFtUHkLyvYauaahPpPZsF8Fdw= +github.com/filecoin-project/chain-validation v0.0.6-0.20200701165912-3b6aaaa32a66/go.mod h1:Tr0C0rl7WCPkkQOkrOLDR6k1ppFVgoIuj1s4KPs4bzo= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef h1:Wi5E+P1QfHP8IF27eUiTx5vYfqQZwfPxzq3oFEq8w8U= @@ -230,19 +232,18 @@ github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/ github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38 h1:B2gUde2DlfCb5YMYNVems2orobxC3KhrX3migym1IOQ= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1 h1:xuHlrdznafh7ul5t4xEncnA4qgpQvJZEw+mr98eqHXw= +github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.3.0 h1:BwBrrXu9Unh9JjjX4GAc5FfzUNioor/aATIjfc7JTBg= -github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= +github.com/filecoin-project/go-data-transfer v0.4.0 h1:xiC0qVZten8VtqEs5rRjyz2n/nZ8prbZSWvAr1V+CBE= +github.com/filecoin-project/go-data-transfer v0.4.0/go.mod h1:5ksROBkSREsb2O4h5vBcGMr9lXTpfeyjHo8o0yxf6FQ= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5 h1:yvQJCW9mmi9zy+51xA01Ea2X7/dL7r8eKDPuGUjRmbo= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200706104419-7c180fe156d4 h1:oI26a0ohPim5xcd/a4xW4GldplBgAGqayoeF+sgnJkQ= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200706104419-7c180fe156d4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= +github.com/filecoin-project/go-fil-markets v0.4.0 h1:toDPViYyQOHtUs6jl0KB9EzgdfCxXR11dZO/rqWbFtU= +github.com/filecoin-project/go-fil-markets v0.4.0/go.mod h1:VAH6h+sWuhPAsSwAS9Kecx8MI/dIjFkrLO8jJUmLWQc= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= @@ -252,29 +253,30 @@ github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/g github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba h1:GEWb/6KQyNZt4jm8fgVcIFPH0ElAGXfHM59ZSiqPTvY= -github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statemachine v0.0.0-20200703171610-a74a697973b9 h1:NagIOq5osclBprc95ILEnGCOpubuhalqwWvayYJmXLQ= +github.com/filecoin-project/go-statemachine v0.0.0-20200703171610-a74a697973b9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b h1:fkRZSPrYpk42PV3/lIXiL0LHetxde7vyYYvSsttQtfg= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= -github.com/filecoin-project/lotus v0.4.2-0.20200706172415-cf6ac44b6ec5 h1:wsEkRwhcWvaZowowC2Kj9ueJ2vIRDqOxOcFvqqgHdxE= -github.com/filecoin-project/lotus v0.4.2-0.20200706172415-cf6ac44b6ec5/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= +github.com/filecoin-project/lotus v0.4.2-0.20200708212122-7d841dbfa81c h1:eqLJHtS/fTYeYX90iUYU79x5FNlVihvYr2TNGRuDFYk= +github.com/filecoin-project/lotus v0.4.2-0.20200708212122-7d841dbfa81c/go.mod h1:q1K9ZdcmxhZJhzFpFtg/peJVoMMXIUE1rRDurQToI7Q= github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= -github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f h1:EHKqNJNIcYggqfrd5nu7SV1KR93ReZygfdSV0w/jefQ= -github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= +github.com/filecoin-project/sector-storage v0.0.0-20200708195134-e3b9ba01c287 h1:lMzTlms23AnWKx7+Bq0nMqSCnuE1tcMkMwtT8zfS7gE= +github.com/filecoin-project/sector-storage v0.0.0-20200708195134-e3b9ba01c287/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf h1:2ERozAZteHYef3tVLVJRepzYieLtJdxvfXNUel19CeU= -github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= +github.com/filecoin-project/specs-actors v0.7.0/go.mod h1:+z0htZu/wLBDbOLcQTKKUEC2rkUTFzL2KJ/bRAVWkws= +github.com/filecoin-project/specs-actors v0.7.1 h1:/zW++MN4gGIPvG+s0zmSI97k0Z/aaeiREjLC10gQbco= +github.com/filecoin-project/specs-actors v0.7.1/go.mod h1:+z0htZu/wLBDbOLcQTKKUEC2rkUTFzL2KJ/bRAVWkws= github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044 h1:i4oMhv1kx/MAUxRN4EM5tag5fI1uagrwQwINgKrzUt4= -github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= +github.com/filecoin-project/storage-fsm v0.0.0-20200707194229-bc5e298e2b4c h1:F6guH363a+fpew1zkgoez4/U0RqW4ph6GVXR23lVwng= +github.com/filecoin-project/storage-fsm v0.0.0-20200707194229-bc5e298e2b4c/go.mod h1:SXO4VnXG056B/lXHL8HZv54eMqlsyynm+v93BlLwlOY= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= @@ -497,6 +499,7 @@ github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67Fexh github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cidutil v0.0.2 h1:CNOboQf1t7Qp0nuNh8QMmhJs0+Q//bRL1axtCnIB1Yo= github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= @@ -518,6 +521,8 @@ github.com/ipfs/go-ds-badger v0.2.3 h1:J27YvAcpuA5IvZUbeBxOcQgqnYHUPxoygc6Qxxkod github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= github.com/ipfs/go-ds-badger2 v0.1.0 h1:784py6lXkwlVF+K6XSuqmdMgy5l8GI6k60ngBokb9Fg= github.com/ipfs/go-ds-badger2 v0.1.0/go.mod h1:pbR1p817OZbdId9EvLOhKBgUVTM3BMCSTan78lDDVaw= +github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e h1:Xi1nil8K2lBOorBS6Ys7+hmUCzH8fr3U9ipdL/IrcEI= +github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e/go.mod h1:lJnws7amT9Ehqzta0gwMrRsURU04caT0iRPr1W8AsOU= github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZCg+cSZvYb8= github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= @@ -529,8 +534,8 @@ github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEP github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= github.com/ipfs/go-fs-lock v0.0.1 h1:XHX8uW4jQBYWHj59XXcjg7BHlHxV9ZOYs6Y43yb7/l0= github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= -github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103 h1:SD+bXod/pOWKJCGj0tG140ht8Us5k+3JBcHw0PVYTho= -github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.0.6-0.20200708073926-caa872f68b2c h1:fCW8JzwvBMfODvdliK+s3ziYZPD/5FAzluahZYXVg3k= +github.com/ipfs/go-graphsync v0.0.6-0.20200708073926-caa872f68b2c/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= @@ -1416,6 +1421,8 @@ github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPyS github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 h1:oWgZJmC1DorFZDpfMfWg7xk29yEOZiXmo/wZl+utTI8= +github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= @@ -1514,6 +1521,7 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -1818,6 +1826,7 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/lotus-soup/testkit/role_client.go b/lotus-soup/testkit/role_client.go index 08bb82fbb..f26c20648 100644 --- a/lotus-soup/testkit/role_client.go +++ b/lotus-soup/testkit/role_client.go @@ -148,11 +148,13 @@ func (c *LotusClient) RunDefault() error { func startFullNodeAPIServer(t *TestEnvironment, repo *repo.MemRepo, api api.FullNode) error { rpcServer := jsonrpc.NewServer() - rpcServer.Register("Filecoin", apistruct.PermissionedFullAPI(api)) + rpcServer.Register("Filecoin", api) ah := &auth.Handler{ - Verify: api.AuthVerify, - Next: rpcServer.ServeHTTP, + Verify: func(ctx context.Context, token string) ([]auth.Permission, error) { + return apistruct.AllPermissions, nil + }, + Next: rpcServer.ServeHTTP, } http.Handle("/rpc/v0", ah) diff --git a/lotus-soup/testkit/role_miner.go b/lotus-soup/testkit/role_miner.go index 4850efedf..204b3a40a 100644 --- a/lotus-soup/testkit/role_miner.go +++ b/lotus-soup/testkit/role_miner.go @@ -6,6 +6,7 @@ import ( "fmt" "io/ioutil" "net/http" + "time" "contrib.go.opencensus.io/exporter/prometheus" "github.com/filecoin-project/go-address" @@ -36,6 +37,10 @@ import ( "github.com/testground/sdk-go/sync" ) +const ( + sealDelay = 30 * time.Second +) + type LotusMiner struct { *LotusNode @@ -245,6 +250,20 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) { // panic(err) // } + // set seal delay to lower value than 1 hour + err = n.MinerApi.SectorSetSealDelay(ctx, sealDelay) + if err != nil { + return nil, err + } + + // print out the admin auth token + token, err := n.MinerApi.AuthNew(ctx, apistruct.AllPermissions) + if err != nil { + return nil, err + } + + t.RecordMessage("Auth token: %s", string(token)) + // add local storage for presealed sectors err = n.MinerApi.StorageAddLocal(ctx, presealDir) if err != nil { @@ -417,7 +436,7 @@ func startStorageMinerAPIServer(t *TestEnvironment, repo *repo.MemRepo, minerApi mux := mux.NewRouter() rpcServer := jsonrpc.NewServer() - rpcServer.Register("Filecoin", apistruct.PermissionedStorMinerAPI(minerApi)) + rpcServer.Register("Filecoin", minerApi) mux.Handle("/rpc/v0", rpcServer) mux.PathPrefix("/remote").HandlerFunc(minerApi.(*impl.StorageMinerAPI).ServeRemote) @@ -433,8 +452,10 @@ func startStorageMinerAPIServer(t *TestEnvironment, repo *repo.MemRepo, minerApi mux.Handle("/debug/metrics", exporter) ah := &auth.Handler{ - Verify: minerApi.AuthVerify, - Next: mux.ServeHTTP, + Verify: func(ctx context.Context, token string) ([]auth.Permission, error) { + return apistruct.AllPermissions, nil + }, + Next: mux.ServeHTTP, } endpoint, err := repo.APIEndpoint()