diff --git a/build/params.go b/build/params.go index b969975a6..1c6146af0 100644 --- a/build/params.go +++ b/build/params.go @@ -5,7 +5,7 @@ package build const UnixfsChunkSize uint64 = 1 << 20 const UnixfsLinksPerLevel = 1024 -const SectorSize = 1024 +const SectorSize = 16 << 20 // Blocks const PaymentChannelClosingDelay = 6 * 60 * 2 // six hours diff --git a/chain/gen/utils.go b/chain/gen/utils.go index 30308d0b2..9362a4083 100644 --- a/chain/gen/utils.go +++ b/chain/gen/utils.go @@ -202,7 +202,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid // TODO: hardcoding 7000000 here is a little fragile, it changes any // time anyone changes the initial account allocations - rval, err := doExecValue(ctx, vm, actors.StorageMarketAddress, owner, types.NewInt(7000000), actors.SMAMethods.CreateStorageMiner, params) + rval, err := doExecValue(ctx, vm, actors.StorageMarketAddress, owner, types.NewInt(700000000), actors.SMAMethods.CreateStorageMiner, params) if err != nil { return cid.Undef, xerrors.Errorf("failed to create genesis miner: %w", err) } diff --git a/lotuspond/front/src/Address.js b/lotuspond/front/src/Address.js index 64984716d..47c17be34 100644 --- a/lotuspond/front/src/Address.js +++ b/lotuspond/front/src/Address.js @@ -84,16 +84,13 @@ class Address extends React.Component { return info } - add200k = async () => { - [...Array(10).keys()].map(() => async () => await this.props.add20k(this.props.addr)).reduce(async (p, c) => [await p, await c()], Promise.resolve(null)) - } - render() { let add20k = - if(this.props.add20k) { - add20k =   this.props.add20k(this.props.addr)}>[+20k] + if(this.props.addN) { + add20k =   this.props.addN(this.props.addr, 200000)}>[+200k] if (this.props.add10k) { - add20k = {add20k} [+200k] + add20k = {add20k}  this.props.addN(this.props.addr, 2000000)}>[+2M] + add20k = {add20k}  this.props.addN(this.props.addr, 20000000)}>[+20M] } } let addr = truncAddr(this.props.addr, this.props.short ? 12 : 17) diff --git a/lotuspond/front/src/FullNode.js b/lotuspond/front/src/FullNode.js index 29a805273..874288261 100644 --- a/lotuspond/front/src/FullNode.js +++ b/lotuspond/front/src/FullNode.js @@ -15,7 +15,6 @@ class FullNode extends React.Component { this.newSecpAddr = this.newSecpAddr.bind(this) this.newBLSAddr = this.newBLSAddr.bind(this) this.startStorageMiner = this.startStorageMiner.bind(this) - this.add20k = this.add20k.bind(this) this.explorer = this.explorer.bind(this) this.client = this.client.bind(this) this.stop = this.stop.bind(this) @@ -84,10 +83,6 @@ class FullNode extends React.Component { this.props.spawnStorageNode(this.props.node.Repo, this.props.client) } - async add20k(to) { - await this.props.give20k(to) - } - explorer() { this.props.mountWindow((onClose) => ) } @@ -123,14 +118,14 @@ class FullNode extends React.Component { let storageMine = let addresses = this.state.addrs.map((addr) => { - let line =
+ let line =
if (this.state.defaultAddr === addr) { line = {line} } return
{line}
}) let paychannels = this.state.paychs.map((addr, ak) => { - const line =
+ const line =
const vouchers = this.state.vouchers[ak].map(voucher => { let extra = if(voucher.Extra) { diff --git a/lotuspond/front/src/NodeList.js b/lotuspond/front/src/NodeList.js index 0466a5eb9..78203929b 100644 --- a/lotuspond/front/src/NodeList.js +++ b/lotuspond/front/src/NodeList.js @@ -27,7 +27,7 @@ class NodeList extends React.Component { this.spawnStorageNode = this.spawnStorageNode.bind(this) this.connMgr = this.connMgr.bind(this) this.consensus = this.consensus.bind(this) - this.transfer20kFrom1 = this.transfer20kFrom1.bind(this) + this.transferNFrom1 = this.transferNFrom1.bind(this) this.getNodes() } @@ -52,7 +52,7 @@ class NodeList extends React.Component { node={{...node}} client={client} pondClient={this.props.client} - give20k={this.transfer20kFrom1} + giveN={this.transferNFrom1} mountWindow={this.props.mountWindow} spawnStorageNode={this.spawnStorageNode} stop={this.stopNode(node.ID, onClose)} @@ -81,7 +81,7 @@ class NodeList extends React.Component { this.setState({existingLoaded: true, nodes: nodes}) } - async transfer20kFrom1(to) { + async transferNFrom1(to, n) { const addrss = await this.state.nodes[1].conn.call('Filecoin.WalletList', []) const [bestaddr, bal] = await addrss.map(async addr => { let balance = 0 @@ -96,7 +96,7 @@ class NodeList extends React.Component { await pushMessage(this.state.nodes[1].conn, bestaddr, { To: to, From: bestaddr, - Value: "20000", + Value: String(n), }) } diff --git a/lotuspond/front/src/StorageNode.js b/lotuspond/front/src/StorageNode.js index ed7dcc66b..ea3be7cd9 100644 --- a/lotuspond/front/src/StorageNode.js +++ b/lotuspond/front/src/StorageNode.js @@ -8,10 +8,11 @@ const stateConnecting = 'connecting' const stateGettingToken = 'getting-token' let sealCodes = [ - 'Sealed', - 'Pending', - 'Failed', - 'Sealing' + "Unknown", + "Pending", + "Failed", + "Sealing", + "Sealed", ] class StorageNode extends React.Component { @@ -116,7 +117,7 @@ class StorageNode extends React.Component {
{this.state.statusCounts.map((c, i) => {sealCodes[i]}: {c} | )}
{this.state.staged ? this.state.staged.map((s, i) => ( -
{s.SectorID} {sealCodes[s.SealStatusCode]}
+
{s.SectorID} {sealCodes[s.State]}
)) :
}
diff --git a/node/impl/storminer.go b/node/impl/storminer.go index 8a58f7fd1..92c7162c2 100644 --- a/node/impl/storminer.go +++ b/node/impl/storminer.go @@ -34,7 +34,7 @@ func (sm *StorageMinerAPI) StoreGarbageData(ctx context.Context) (uint64, error) size := sectorbuilder.UserBytesForSectorSize(build.SectorSize) name := fmt.Sprintf("fake-file-%d", rand.Intn(100000000)) - sectorId, err := sm.Sectors.AddPiece(name, size, io.LimitReader(rand.New(rand.NewSource(42)), 1016)) + sectorId, err := sm.Sectors.AddPiece(name, size, io.LimitReader(rand.New(rand.NewSource(42)), int64(size))) if err != nil { return 0, err } diff --git a/node/modules/testing/genesis.go b/node/modules/testing/genesis.go index 23de19ea3..5085ac4fc 100644 --- a/node/modules/testing/genesis.go +++ b/node/modules/testing/genesis.go @@ -40,7 +40,7 @@ func MakeGenesisMem(out io.Writer) func(bs dtypes.ChainBlockstore, w *wallet.Wal PeerIDs: []peer.ID{"peerID 1"}, } alloc := map[address.Address]types.BigInt{ - w: types.NewInt(10000000), + w: types.NewInt(1000000000), } b, err := gen.MakeGenesisBlock(bs, alloc, gmc, 100000) @@ -76,7 +76,7 @@ func MakeGenesis(outFile string) func(bs dtypes.ChainBlockstore, w *wallet.Walle } addrs := map[address.Address]types.BigInt{ - minerAddr: types.NewInt(50000000), + minerAddr: types.NewInt(5000000000), } b, err := gen.MakeGenesisBlock(bs, addrs, gmc, 100000)