commit
e40f1b1c7e
@ -1 +1 @@
|
||||
/ip4/147.75.80.17/tcp/1347/p2p/12D3KooWB54edC5VTSaQpvcYbqG8XKAziP77Natf75CieA5xKDJx
|
||||
/ip4/147.75.80.17/tcp/1347/p2p/12D3KooWQ3NBPgTbXFRGnmpZUpYBSPJtwJfxuAFHBuWJ8LumCYf2
|
||||
|
@ -1 +1 @@
|
||||
/ip4/147.75.80.29/tcp/1347/p2p/12D3KooWGdsbvHwscFKT1kqBeeooPe6EneJvjXzTrWSzwKhc1ssn
|
||||
/ip4/147.75.80.29/tcp/1347/p2p/12D3KooWGU8C1mFsEtz4bXmHUH3kQTnQnxVy8cigwGV94qCpYJw7
|
Binary file not shown.
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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),
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)' &
|
||||
|
Loading…
Reference in New Issue
Block a user