From 62a9982b76e2c5cd2855a348f2c9c44d9ef24099 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 30 Jul 2020 16:22:43 +0200 Subject: [PATCH] fix lotus-soup deals baseline test (#172) * fix lotus-soup deals baseline test * remove comment * go mod tidy --- Makefile | 6 ++-- README.md | 1 + docker-images/Dockerfile.oni-runtime-debug | 4 +-- lotus-soup/go.mod | 12 +++---- lotus-soup/go.sum | 42 +++++++++++----------- lotus-soup/manifest.toml | 2 +- lotus-soup/rfwp/chain_state.go | 4 +-- lotus-soup/testkit/deals.go | 9 +++-- lotus-soup/testkit/node.go | 7 ++-- lotus-soup/testkit/role_bootstrapper.go | 8 +++-- lotus-soup/testkit/role_miner.go | 13 ++++--- 11 files changed, 61 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index 06184d2d7..f6f46427c 100644 --- a/Makefile +++ b/Makefile @@ -8,16 +8,16 @@ download-proofs: build-images: docker build -t "iptestground/oni-buildbase:v5" -f "docker-images/Dockerfile.oni-buildbase" "docker-images" docker build -t "iptestground/oni-runtime:v2" -f "docker-images/Dockerfile.oni-runtime" "docker-images" - docker build -t "iptestground/oni-runtime:v2-debug" -f "docker-images/Dockerfile.oni-runtime-debug" "docker-images" + docker build -t "iptestground/oni-runtime:v3-debug" -f "docker-images/Dockerfile.oni-runtime-debug" "docker-images" push-images: docker push iptestground/oni-buildbase:v5 docker push iptestground/oni-runtime:v2 - docker push iptestground/oni-runtime:v2-debug + docker push iptestground/oni-runtime:v3-debug pull-images: docker pull iptestground/oni-buildbase:v5 docker pull iptestground/oni-runtime:v2 - docker pull iptestground/oni-runtime:v2-debug + docker pull iptestground/oni-runtime:v3-debug .PHONY: download-proofs build-images push-images pull-images diff --git a/README.md b/README.md index 4bd662e24..da8d35c95 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ Additional to the Filecoin FFI Git submodules, we are also bundling `proof param * `v1` => initial image * `v2` => locking in Lotus commit e21ea53 +* `v3` => locking in Lotus commit d557c40 ## Team diff --git a/docker-images/Dockerfile.oni-runtime-debug b/docker-images/Dockerfile.oni-runtime-debug index e77416fad..ff6666834 100644 --- a/docker-images/Dockerfile.oni-runtime-debug +++ b/docker-images/Dockerfile.oni-runtime-debug @@ -12,7 +12,7 @@ RUN go get github.com/filecoin-project/go-paramfetch/paramfetch COPY /proof-parameters.json / RUN paramfetch 2048 /proof-parameters.json -ARG LOTUS_COMMIT=e21ea53 +ARG LOTUS_COMMIT=d557c40 ## 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 ${LOTUS_COMMIT} && make clean && make all && make install @@ -27,4 +27,4 @@ COPY --from=downloader /usr/local/bin/lotus /usr/local/bin/lll COPY --from=downloader /usr/local/bin/lotus-miner /usr/local/bin/lm 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" +ENV MINER_API_INFO="dummytoken:/ip4/127.0.0.1/tcp/2345/http" diff --git a/lotus-soup/go.mod b/lotus-soup/go.mod index 8bc00d463..53bd5f043 100644 --- a/lotus-soup/go.mod +++ b/lotus-soup/go.mod @@ -8,18 +8,18 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef - github.com/filecoin-project/go-fil-markets v0.5.1 + github.com/filecoin-project/go-fil-markets v0.5.2 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.20200724113535-7410c057c6b2 - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df - github.com/filecoin-project/specs-actors v0.8.1-0.20200724015154-3c690d9b7e1d - github.com/filecoin-project/storage-fsm v0.0.0-20200720190000-2cfe2fe3c334 + github.com/filecoin-project/lotus v0.4.3-0.20200729013254-5df0ee7935e0 + github.com/filecoin-project/sector-storage v0.0.0-20200727112136-9377cb376d25 + github.com/filecoin-project/specs-actors v0.8.1-0.20200728182452-1476088f645b + github.com/filecoin-project/storage-fsm v0.0.0-20200728185042-33f96f051f20 github.com/google/uuid v1.1.1 github.com/gorilla/mux v1.7.4 github.com/hashicorp/go-multierror v1.1.0 github.com/influxdata/influxdb v1.8.0 // indirect - github.com/ipfs/go-cid v0.0.6 + github.com/ipfs/go-cid v0.0.7 github.com/ipfs/go-datastore v0.4.4 github.com/ipfs/go-ipfs-files v0.0.8 github.com/ipfs/go-ipld-format v0.2.0 diff --git a/lotus-soup/go.sum b/lotus-soup/go.sum index aeece7429..f54dfaa00 100644 --- a/lotus-soup/go.sum +++ b/lotus-soup/go.sum @@ -226,8 +226,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.20200723211224-ffdcb7a20fe8 h1:WA2KU3u/FELAMVElQgiwEKTQe/QLUUsT52AnW4YjPjs= -github.com/filecoin-project/chain-validation v0.0.6-0.20200723211224-ffdcb7a20fe8/go.mod h1:P4FhsyLtySqsVFbOPpPVFeEShVQ4j/iA5Dzo8D2p978= +github.com/filecoin-project/chain-validation v0.0.6-0.20200728204507-037308fa7af2 h1:N2mMgz9JdEMMZfNu+5jTV0KqnqKDDw+rWiAS+K6mbiU= +github.com/filecoin-project/chain-validation v0.0.6-0.20200728204507-037308fa7af2/go.mod h1:bcpE1fm7OlH1gak8hfSy7+IM/OaT3GW/XFsbDVp4Dfo= 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= @@ -243,21 +243,23 @@ github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go. github.com/filecoin-project/go-bitfield v0.0.3/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-bitfield v0.1.0 h1:ZDAQjvXuLzbrLnwfFruQFJP7IhImmXLuO+8i2qeAczM= -github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.1.1 h1:ioLGippGXLS93uBMbpSwVPD7h2Oz1FYq/WPYDfT7W/A= +github.com/filecoin-project/go-bitfield v0.1.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= 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.5.0 h1:pvWlab69BD5dwheRHjjBjFB6m7CEqEZeI+aChtVqKVk= -github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= +github.com/filecoin-project/go-data-transfer v0.5.1 h1:tDPmVVSgkit3cEG+9TFr6nwhKHdUipt9f0dEZSmvjbg= +github.com/filecoin-project/go-data-transfer v0.5.1/go.mod h1:PRs78hp9u8T4G2Jce5NOkHB1bAqecPkvSLsMPuJckGU= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.5.1 h1:Y69glslNCuXnygfesCmyilTVhEEjcLK7CtAohKP9SL8= -github.com/filecoin-project/go-fil-markets v0.5.1/go.mod h1:GKGigsFNMvKmx/+Mcn7093TdZTiCDLc7YGxQ7d6fq2s= +github.com/filecoin-project/go-fil-markets v0.5.2 h1:4xW3JoPnPDKP+f4s/tWLmuYaReGdjetHZT7qgXivdiw= +github.com/filecoin-project/go-fil-markets v0.5.2/go.mod h1:zDhwmUy/AS/xCJOayW7Cedff9SDuSdGIWRnGXBDjcOk= 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-multistore v0.0.2 h1:JZEddnXXt3mMzHi7bi9IH7Yi1NpGLy19J5Lk/xbxBMs= +github.com/filecoin-project/go-multistore v0.0.2/go.mod h1:edte5g7DHqJasFNOvdm9ZS6CjdfFTPoQ6xeKs1eOBIA= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= @@ -271,26 +273,25 @@ github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIi 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.20200724113535-7410c057c6b2 h1:pX+EePSHTjehobovJ1r/yLZYp15xxMBUvTHBazWtAkk= -github.com/filecoin-project/lotus v0.4.2-0.20200724113535-7410c057c6b2/go.mod h1:IQkgDgoVi+9NZEhNvYbYXW2ZCsC8fU0oB3kng1ZDdts= +github.com/filecoin-project/lotus v0.4.3-0.20200729013254-5df0ee7935e0 h1:PK70stRz+Qa71+IMPN9fdlvGmDN+CE3LqyR7MxKezuU= +github.com/filecoin-project/lotus v0.4.3-0.20200729013254-5df0ee7935e0/go.mod h1:U6qR9nyBbt4X/+LDPul+JQfUoDz2lPebMeho3gNksvM= 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-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= +github.com/filecoin-project/sector-storage v0.0.0-20200727112136-9377cb376d25 h1:sTonFkDw3KrIFIJTfIevYXyk+Mu9LbjbOHn/fWoMOMc= +github.com/filecoin-project/sector-storage v0.0.0-20200727112136-9377cb376d25/go.mod h1:f9W29dKqNFm8Su4OddGwkAQOYMKYUR5Fk2oC/JZDjCI= 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.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= github.com/filecoin-project/specs-actors v0.8.1-0.20200720115956-cd051eabf328/go.mod h1:0+CxQ5Jeii3522irTvhKRDpr4GG1bj5Erq3p/d38DzY= -github.com/filecoin-project/specs-actors v0.8.1-0.20200723200253-a3c01bc62f99/go.mod h1:TLvIheTVl0EIuyncuKSTVXPULaj7gzhLup5CLZ/S+uM= -github.com/filecoin-project/specs-actors v0.8.1-0.20200724015154-3c690d9b7e1d h1:dti6ssgSFG7Tk851S3RdiDr1TNbOJ26ylc6DJ9Y2Le0= -github.com/filecoin-project/specs-actors v0.8.1-0.20200724015154-3c690d9b7e1d/go.mod h1:TLvIheTVl0EIuyncuKSTVXPULaj7gzhLup5CLZ/S+uM= +github.com/filecoin-project/specs-actors v0.8.1-0.20200728182452-1476088f645b h1:Tr34QNdGYMT2ghM6o1H1bMziTw/nWd/B2Um2A3vWp2c= +github.com/filecoin-project/specs-actors v0.8.1-0.20200728182452-1476088f645b/go.mod h1:U1qnlL3MjJnE6n3MTUUVhlmpJodx+fo26cC0aiL1jeo= 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-20200720190000-2cfe2fe3c334 h1:gRp8IlJ3XDYuOUFvncmlCI6HtuK61W2wE1aEqgj4opA= -github.com/filecoin-project/storage-fsm v0.0.0-20200720190000-2cfe2fe3c334/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= +github.com/filecoin-project/storage-fsm v0.0.0-20200728185042-33f96f051f20 h1:VK2DdNGNQ1A1QwS4aCqAUeWKrJototfTv7p6qIHvU7o= +github.com/filecoin-project/storage-fsm v0.0.0-20200728185042-33f96f051f20/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= @@ -518,6 +519,8 @@ 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-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/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= @@ -552,8 +555,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.20200715204712-ef06b3d32e83 h1:tkGDAwcZfzDFeBNyBWYOM02Qw0rGpA2UuCvq49T3K5o= -github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.0.6-0.20200721211002-c376cbe14c0a h1:QViYKbSYNKtfivrYx69UFJiH7HfdE5APQBbIu5fCK3k= +github.com/ipfs/go-graphsync v0.0.6-0.20200721211002-c376cbe14c0a/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 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= @@ -658,7 +661,6 @@ github.com/ipfs/iptb v1.4.0 h1:YFYTrCkLMRwk/35IMyC6+yjoQSHTEcNcefBStLJzgvo= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1 h1:au4HWn9/pRPbkxA08pDx2oRAs4cnbgQWgV0teYXuuGA= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200429200904-c222d793c339/go.mod h1:eajxljm6I8o3LitnFeVEmucwZmz7+yLSiKce9yYMefg= github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae h1:OV9dxl8iPMCOD8Vi/hvFwRh3JWPXqmkYSVxWr9JnEzM= github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e h1:ZISbJlM0urTANR9KRfRaqlBmyOj5uUtxs2r4Up9IXsA= diff --git a/lotus-soup/manifest.toml b/lotus-soup/manifest.toml index df06bff51..b7d49eaf3 100644 --- a/lotus-soup/manifest.toml +++ b/lotus-soup/manifest.toml @@ -11,7 +11,7 @@ enabled = true [builders."docker:go"] enabled = true build_base_image = "iptestground/oni-buildbase:v5" -runtime_image = "iptestground/oni-runtime:v2-debug" +runtime_image = "iptestground/oni-runtime:v3-debug" [runners."local:exec"] enabled = true diff --git a/lotus-soup/rfwp/chain_state.go b/lotus-soup/rfwp/chain_state.go index 3e91a25b3..dea2ad245 100644 --- a/lotus-soup/rfwp/chain_state.go +++ b/lotus-soup/rfwp/chain_state.go @@ -560,7 +560,7 @@ func sectorsList(t *testkit.TestEnvironment, m *testkit.LotusMiner, maddr addres i := SectorInfo{Sectors: list, SectorStates: make(map[abi.SectorNumber]api.SectorInfo, len(list))} for _, s := range list { - st, err := m.MinerApi.SectorsStatus(ctx, s) + st, err := m.MinerApi.SectorsStatus(ctx, s, true) if err != nil { fmt.Fprintf(w, "%d:\tError: %s\n", s, err) continue @@ -756,7 +756,7 @@ func info(t *testkit.TestEnvironment, m *testkit.LotusMiner, maddr address.Addre "Total": len(sectors), } for _, s := range sectors { - st, err := m.MinerApi.SectorsStatus(ctx, s) + st, err := m.MinerApi.SectorsStatus(ctx, s, true) if err != nil { return nil, err } diff --git a/lotus-soup/testkit/deals.go b/lotus-soup/testkit/deals.go index a3ff85978..a96596ec1 100644 --- a/lotus-soup/testkit/deals.go +++ b/lotus-soup/testkit/deals.go @@ -21,11 +21,14 @@ func StartDeal(ctx context.Context, minerActorAddr address.Address, client api.F } deal, err := client.ClientStartDeal(ctx, &api.StartDealParams{ - Data: &storagemarket.DataRef{Root: fcid}, + Data: &storagemarket.DataRef{ + TransferType: storagemarket.TTGraphsync, + Root: fcid, + }, Wallet: addr, Miner: minerActorAddr, - EpochPrice: types.NewInt(1000000), - MinBlocksDuration: 1000, + EpochPrice: types.NewInt(1000), + MinBlocksDuration: 640000, FastRetrieval: fastRetrieval, }) if err != nil { diff --git a/lotus-soup/testkit/node.go b/lotus-soup/testkit/node.go index 4ce4d45a7..38f89541d 100644 --- a/lotus-soup/testkit/node.go +++ b/lotus-soup/testkit/node.go @@ -12,14 +12,15 @@ import ( "github.com/filecoin-project/lotus/chain/beacon" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/metrics" + "github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/node" "github.com/filecoin-project/lotus/node/modules/dtypes" modtest "github.com/filecoin-project/lotus/node/modules/testing" tstats "github.com/filecoin-project/lotus/tools/stats" - "github.com/kpacha/opencensus-influxdb" + influxdb "github.com/kpacha/opencensus-influxdb" ma "github.com/multiformats/go-multiaddr" - "github.com/multiformats/go-multiaddr-net" + manet "github.com/multiformats/go-multiaddr-net" "go.opencensus.io/stats" "go.opencensus.io/stats/view" ) @@ -31,7 +32,7 @@ type LotusNode struct { MinerApi api.StorageMiner StopFn node.StopFunc Wallet *wallet.Key - MineOne func(context.Context, func(bool, error)) error + MineOne func(context.Context, miner.MineReq) error } func (n *LotusNode) setWallet(ctx context.Context, walletKey *wallet.Key) error { diff --git a/lotus-soup/testkit/role_bootstrapper.go b/lotus-soup/testkit/role_bootstrapper.go index 39d5dba58..b647dee3a 100644 --- a/lotus-soup/testkit/role_bootstrapper.go +++ b/lotus-soup/testkit/role_bootstrapper.go @@ -8,6 +8,7 @@ import ( "time" "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/node" @@ -93,9 +94,10 @@ func PrepareBootstrapper(t *TestEnvironment) (*Bootstrapper, error) { } genesisTemplate := genesis.Template{ - Accounts: genesisActors, - Miners: genesisMiners, - Timestamp: uint64(time.Now().Unix()) - uint64(t.IntParam("genesis_timestamp_offset")), // this needs to be in the past + Accounts: genesisActors, + Miners: genesisMiners, + Timestamp: uint64(time.Now().Unix()) - uint64(t.IntParam("genesis_timestamp_offset")), + VerifregRootKey: gen.DefaultVerifregRootkeyActor, } // dump the genesis block diff --git a/lotus-soup/testkit/role_miner.go b/lotus-soup/testkit/role_miner.go index 8ef615b29..f8e28dff0 100644 --- a/lotus-soup/testkit/role_miner.go +++ b/lotus-soup/testkit/role_miner.go @@ -270,11 +270,12 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) { } if t.StringParam("mining_mode") != "natural" { - mineBlock := make(chan func(bool, error)) + mineBlock := make(chan miner.MineReq) + minerOpts = append(minerOpts, node.Override(new(*miner.Miner), miner.NewTestMiner(mineBlock, minerAddr))) - n.MineOne = func(ctx context.Context, cb func(bool, error)) error { + n.MineOne = func(ctx context.Context, cb miner.MineReq) error { select { case mineBlock <- cb: return nil @@ -543,12 +544,16 @@ func (m *LotusMiner) RunDefault() error { const maxRetries = 100 success := false for retries := 0; retries < maxRetries; retries++ { - err := m.MineOne(ctx, func(mined bool, err error) { + f := func(mined bool, err error) { if mined { t.D().Counter(fmt.Sprintf("block.mine,miner=%s", myActorAddr)).Inc(1) } ch <- err - }) + } + req := miner.MineReq{ + Done: f, + } + err := m.MineOne(ctx, req) if err != nil { panic(err) }