Merge branch 'master' into master
This commit is contained in:
commit
660e096a4f
1
.gitignore
vendored
1
.gitignore
vendored
@ -18,3 +18,4 @@ build/paramfetch.sh
|
|||||||
/chain/types/work_msg/
|
/chain/types/work_msg/
|
||||||
bin/ipget
|
bin/ipget
|
||||||
bin/tmp/*
|
bin/tmp/*
|
||||||
|
.idea
|
||||||
|
2
Makefile
2
Makefile
@ -78,7 +78,7 @@ build: lotus lotus-storage-miner
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
install -C ./lotus /usr/local/bin/lotus
|
install -C ./lotus /usr/local/bin/lotus
|
||||||
install -C ./lotus /usr/local/bin/lotus-storage-miner
|
install -C ./lotus-storage-miner /usr/local/bin/lotus-storage-miner
|
||||||
|
|
||||||
benchmarks:
|
benchmarks:
|
||||||
go run github.com/whyrusleeping/bencher ./... > bench.json
|
go run github.com/whyrusleeping/bencher ./... > bench.json
|
||||||
|
@ -80,7 +80,7 @@ $ lotus wallet new bls
|
|||||||
t3...
|
t3...
|
||||||
```
|
```
|
||||||
|
|
||||||
Grab some funds from the faucet - go to https://lotus-faucet.kittyhawk.wtf, paste the address
|
Grab some funds from faucet - go to https://lotus-faucet.kittyhawk.wtf/, paste the address
|
||||||
you just created, and press Send.
|
you just created, and press Send.
|
||||||
|
|
||||||
Check the wallet balance (balance is listed in attoFIL, where 1 attoFIL = 10^-18 FIL):
|
Check the wallet balance (balance is listed in attoFIL, where 1 attoFIL = 10^-18 FIL):
|
||||||
@ -192,7 +192,9 @@ $ lotus client retrieve <Data CID> <outfile>
|
|||||||
|
|
||||||
This will initiate a retrieval deal and write the data to the outfile. (This process may take some time.)
|
This will initiate a retrieval deal and write the data to the outfile. (This process may take some time.)
|
||||||
|
|
||||||
|
### Monitoring Dashboard
|
||||||
|
|
||||||
|
To see the latest network activity, including chain block height, blocktime, total network power, largest miners, and more, check out the monitoring dashboard at https://lotus-metrics.kittyhawk.wtf.
|
||||||
|
|
||||||
### Pond UI
|
### Pond UI
|
||||||
|
|
||||||
|
@ -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
|
// Consensus / Network
|
||||||
|
|
||||||
// Seconds
|
// Seconds
|
||||||
const BlockDelay = 6
|
const BlockDelay = 30
|
||||||
|
|
||||||
// Seconds
|
// Seconds
|
||||||
const AllowableClockDrift = BlockDelay * 2
|
const AllowableClockDrift = BlockDelay * 2
|
||||||
@ -53,9 +53,9 @@ const ProvingPeriodDuration = 40
|
|||||||
// Blocks
|
// Blocks
|
||||||
const PoSTChallangeTime = 20
|
const PoSTChallangeTime = 20
|
||||||
|
|
||||||
const PowerCollateralProportion = 20
|
const PowerCollateralProportion = 5
|
||||||
const PerCapitaCollateralProportion = 5
|
const PerCapitaCollateralProportion = 1
|
||||||
const CollateralPrecision = 100
|
const CollateralPrecision = 1000
|
||||||
|
|
||||||
// /////
|
// /////
|
||||||
// Devnet settings
|
// Devnet settings
|
||||||
|
@ -92,7 +92,7 @@ var runCmd = &cli.Command{
|
|||||||
|
|
||||||
http.Handle("/", http.FileServer(rice.MustFindBox("site").HTTPBox()))
|
http.Handle("/", http.FileServer(rice.MustFindBox("site").HTTPBox()))
|
||||||
http.HandleFunc("/send", h.send)
|
http.HandleFunc("/send", h.send)
|
||||||
http.HandleFunc("/sendcoll", h.sendColl)
|
http.HandleFunc("/mkminer", h.mkminer)
|
||||||
|
|
||||||
fmt.Printf("Open http://%s\n", cctx.String("front"))
|
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()))
|
w.Write([]byte(smsg.Cid().String()))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *handler) sendColl(w http.ResponseWriter, r *http.Request) {
|
func (h *handler) mkminer(w http.ResponseWriter, r *http.Request) {
|
||||||
to, err := address.NewFromString(r.FormValue("address"))
|
|
||||||
if err != nil {
|
|
||||||
w.WriteHeader(400)
|
w.WriteHeader(400)
|
||||||
w.Write([]byte(err.Error()))
|
// todo
|
||||||
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()))
|
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ func configureStorageMiner(ctx context.Context, api api.FullNode, addr address.A
|
|||||||
Params: enc,
|
Params: enc,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
GasPrice: types.NewInt(0),
|
GasPrice: types.NewInt(0),
|
||||||
GasLimit: types.NewInt(1000000),
|
GasLimit: types.NewInt(100000000),
|
||||||
}
|
}
|
||||||
|
|
||||||
smsg, err := api.MpoolPushMessage(ctx, msg)
|
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,
|
Method: actors.SPAMethods.CreateStorageMiner,
|
||||||
Params: params,
|
Params: params,
|
||||||
|
|
||||||
GasLimit: types.NewInt(10000),
|
GasLimit: types.NewInt(10000000),
|
||||||
GasPrice: types.NewInt(0),
|
GasPrice: types.NewInt(0),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-lotus/node/modules/lp2p"
|
"github.com/filecoin-project/go-lotus/node/modules/lp2p"
|
||||||
)
|
)
|
||||||
|
|
||||||
const topic = "/fil/headnotifs/bafy2bzacecyfz2wfi5a6d4epch6nmedrlan3mdfswgv3y74an5aeqxaq5gqlu"
|
const topic = "/fil/headnotifs/bafy2bzacea77zxnepp7wuqqgpj7xcw2ywwmmcmtrbjghhv4g2dildogpv6roi"
|
||||||
|
|
||||||
var upgrader = websocket.Upgrader{
|
var upgrader = websocket.Upgrader{
|
||||||
WriteBufferSize: 1024,
|
WriteBufferSize: 1024,
|
||||||
@ -49,7 +49,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pi, err := addrutil.ParseAddresses(ctx, []string{
|
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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -94,7 +94,7 @@ func Bootstrap(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, pinfos
|
|||||||
OnStart: func(_ context.Context) error {
|
OnStart: func(_ context.Context) error {
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
sctx, cancel := context.WithTimeout(ctx, build.BlockDelay*time.Second/2)
|
sctx, cancel := context.WithTimeout(ctx, 2*time.Second)
|
||||||
<-sctx.Done()
|
<-sctx.Done()
|
||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
HOST=$1
|
HOST=$1
|
||||||
|
|
||||||
|
ssh "$HOST" '[ -e ~/.lotusstorage/token ]' && exit 0
|
||||||
|
|
||||||
ssh "$HOST" 'lotus wallet new bls > addr'
|
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)' &
|
||||||
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