From f620ecea5e0a3bb11a80521aec93cfc371652d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 17 Oct 2019 02:43:38 +0200 Subject: [PATCH] Devnet 6 --- build/bootstrap/bootstrappers.pi | 2 +- build/bootstrap/root.pi | 2 +- build/genesis/devnet.car | Bin 1844 -> 1844 bytes build/params.go | 8 ++++---- cmd/lotus-fountain/main.go | 33 ++++--------------------------- cmd/lotus-storage-miner/init.go | 4 ++-- cmd/lotus-townhall/main.go | 4 ++-- scripts/deploy-miner.sh | 2 ++ 8 files changed, 16 insertions(+), 39 deletions(-) diff --git a/build/bootstrap/bootstrappers.pi b/build/bootstrap/bootstrappers.pi index 6cc357957..031804bbd 100644 --- a/build/bootstrap/bootstrappers.pi +++ b/build/bootstrap/bootstrappers.pi @@ -1 +1 @@ -/ip4/147.75.80.17/tcp/1347/p2p/12D3KooWB54edC5VTSaQpvcYbqG8XKAziP77Natf75CieA5xKDJx +/ip4/147.75.80.17/tcp/1347/p2p/12D3KooWQ3NBPgTbXFRGnmpZUpYBSPJtwJfxuAFHBuWJ8LumCYf2 diff --git a/build/bootstrap/root.pi b/build/bootstrap/root.pi index ab958ca34..f1f0ea3a5 100644 --- a/build/bootstrap/root.pi +++ b/build/bootstrap/root.pi @@ -1 +1 @@ -/ip4/147.75.80.29/tcp/1347/p2p/12D3KooWGdsbvHwscFKT1kqBeeooPe6EneJvjXzTrWSzwKhc1ssn +/ip4/147.75.80.29/tcp/1347/p2p/12D3KooWGU8C1mFsEtz4bXmHUH3kQTnQnxVy8cigwGV94qCpYJw7 \ No newline at end of file diff --git a/build/genesis/devnet.car b/build/genesis/devnet.car index fd41976c883498b379801322c2c791cecf28532b..a629514c1731cf1f4fc4e0cc8a08ffd15bd0b995 100644 GIT binary patch delta 688 zcmdnOw}o$lNTB_nyGyG7XF0J|)fYxbY@Kn?sF2I2_pmgm8^9UPbV|7 zYEOJ%&Afb%&}2DA8N%wL7@ZWR=U@MvX?$<{T(!n>Ir)bRW8@~Ds=N5cXyV#RH-4k! zz{z_UcPs4gJu7wp+zidz(c7y|?!31_=;4{T%YM~|cIn)=%U1MNnLM3oTRkC@nr>)C zs53ykd-W~nr5E>BynNhX(9HCE`Mf7*JH;yFr-(mGyColUkGn!5Z8|hy2&rrecVGYm zPY4Ah1t6@Zg^7lZO%;aBQ}+2qbKI?pVB_e^GF z)t>mkntAET^^@foWeBT}Vsuid_Yhbvs&rQ`ZklP&ja{r6<)5BNPv=Zz{^3~sQOV-v zg~@vucPnr$K6k#fWPjnEphIQ9R{0q$kKLGeUA^Mv$6)^E`#)!uO`guQt)7rcO*gb6 z)EOY&-L=EohgU{bEMvz}*WJCk{7q_Qd8fdLFW z85jg0EGXHuFwwBFslt$XXZkb0g4RQ+tFCfxRSn%#eos;RuW4=BT06I;iPs7${;l$R zDVCMgkj};a>A1=oudKj|lDi6Gs{BxvD)d2{m#)*MCvTP!#m diff --git a/build/params.go b/build/params.go index 9f8b40803..4f27abe60 100644 --- a/build/params.go +++ b/build/params.go @@ -30,7 +30,7 @@ const MaxVouchersPerDeal = 768 // roughly one voucher per 10h over a year // Consensus / Network // Seconds -const BlockDelay = 6 +const BlockDelay = 30 // Seconds const AllowableClockDrift = BlockDelay * 2 @@ -53,9 +53,9 @@ const ProvingPeriodDuration = 40 // Blocks const PoSTChallangeTime = 20 -const PowerCollateralProportion = 20 -const PerCapitaCollateralProportion = 5 -const CollateralPrecision = 100 +const PowerCollateralProportion = 5 +const PerCapitaCollateralProportion = 1 +const CollateralPrecision = 1000 // ///// // Devnet settings diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index 40848dd5c..7f648145d 100644 --- a/cmd/lotus-fountain/main.go +++ b/cmd/lotus-fountain/main.go @@ -92,7 +92,7 @@ var runCmd = &cli.Command{ http.Handle("/", http.FileServer(rice.MustFindBox("site").HTTPBox())) http.HandleFunc("/send", h.send) - http.HandleFunc("/sendcoll", h.sendColl) + http.HandleFunc("/mkminer", h.mkminer) fmt.Printf("Open http://%s\n", cctx.String("front")) @@ -137,32 +137,7 @@ func (h *handler) send(w http.ResponseWriter, r *http.Request) { w.Write([]byte(smsg.Cid().String())) } -func (h *handler) sendColl(w http.ResponseWriter, r *http.Request) { - to, err := address.NewFromString(r.FormValue("address")) - if err != nil { - w.WriteHeader(400) - w.Write([]byte(err.Error())) - return - } - - coll, err := h.api.StatePledgeCollateral(h.ctx, nil) - if err != nil { - return - } - - smsg, err := h.api.MpoolPushMessage(h.ctx, &types.Message{ - Value: coll, - From: h.from, - To: to, - - GasPrice: types.NewInt(0), - GasLimit: types.NewInt(1000), - }) - if err != nil { - w.WriteHeader(400) - w.Write([]byte(err.Error())) - return - } - - w.Write([]byte(smsg.Cid().String())) +func (h *handler) mkminer(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(400) + // todo } diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 2ece8004d..59ff2e91a 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -224,7 +224,7 @@ func configureStorageMiner(ctx context.Context, api api.FullNode, addr address.A Params: enc, Value: types.NewInt(0), GasPrice: types.NewInt(0), - GasLimit: types.NewInt(1000000), + GasLimit: types.NewInt(100000000), } smsg, err := api.MpoolPushMessage(ctx, msg) @@ -292,7 +292,7 @@ func createStorageMiner(ctx context.Context, api api.FullNode, peerid peer.ID, c Method: actors.SPAMethods.CreateStorageMiner, Params: params, - GasLimit: types.NewInt(10000), + GasLimit: types.NewInt(10000000), GasPrice: types.NewInt(0), } diff --git a/cmd/lotus-townhall/main.go b/cmd/lotus-townhall/main.go index 0f7c058f0..54f5e91c5 100644 --- a/cmd/lotus-townhall/main.go +++ b/cmd/lotus-townhall/main.go @@ -18,7 +18,7 @@ import ( "github.com/filecoin-project/go-lotus/node/modules/lp2p" ) -const topic = "/fil/headnotifs/bafy2bzacecyfz2wfi5a6d4epch6nmedrlan3mdfswgv3y74an5aeqxaq5gqlu" +const topic = "/fil/headnotifs/bafy2bzacea77zxnepp7wuqqgpj7xcw2ywwmmcmtrbjghhv4g2dildogpv6roi" var upgrader = websocket.Upgrader{ WriteBufferSize: 1024, @@ -49,7 +49,7 @@ func main() { } pi, err := addrutil.ParseAddresses(ctx, []string{ - "/ip4/147.75.80.29/tcp/1347/p2p/12D3KooWGdsbvHwscFKT1kqBeeooPe6EneJvjXzTrWSzwKhc1ssn", + "/ip4/147.75.80.29/tcp/1347/p2p/12D3KooWGU8C1mFsEtz4bXmHUH3kQTnQnxVy8cigwGV94qCpYJw7", }) if err != nil { panic(err) diff --git a/scripts/deploy-miner.sh b/scripts/deploy-miner.sh index 984f3d9b3..b1603aca6 100755 --- a/scripts/deploy-miner.sh +++ b/scripts/deploy-miner.sh @@ -2,6 +2,8 @@ HOST=$1 +ssh "$HOST" '[ -e ~/.lotusstorage/token ]' && exit 0 + ssh "$HOST" 'lotus wallet new bls > addr' ssh "$HOST" 'curl http://147.75.80.29:777/sendcoll?address=$(cat addr)' & ssh "$HOST" 'curl http://147.75.80.29:777/sendcoll?address=$(cat addr)' &