Merge pull request #180 from filecoin-project/feat/better-paramfetch
Simpler paramfetch
This commit is contained in:
commit
56bf0d4114
@ -8,7 +8,6 @@ commands:
|
||||
steps:
|
||||
- go/install-ssh
|
||||
- go/install: {package: git}
|
||||
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
prepare:
|
||||
steps:
|
||||
- checkout
|
||||
@ -63,6 +62,9 @@ jobs:
|
||||
- install-deps
|
||||
- prepare
|
||||
- go/mod-download
|
||||
- run:
|
||||
command: GO111MODULE=on go get github.com/ipfs/ipget@c0cbd7d9d1925965a5aa0895d5ff32dbdb4a009e
|
||||
working_directory: "~"
|
||||
- run: echo 'export PATH=$HOME/.cargo/bin:$PATH' >> $BASH_ENV
|
||||
- run:
|
||||
command: make deps
|
||||
@ -118,6 +120,9 @@ jobs:
|
||||
- install-deps
|
||||
- prepare
|
||||
- go/mod-download
|
||||
- run:
|
||||
command: GO111MODULE=on go get github.com/ipfs/ipget@c0cbd7d9d1925965a5aa0895d5ff32dbdb4a009e
|
||||
working_directory: "~"
|
||||
- run:
|
||||
command: make deps
|
||||
no_output_timeout: 30m
|
||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,6 +4,3 @@
|
||||
[submodule "extern/go-sectorbuilder"]
|
||||
path = extern/go-sectorbuilder
|
||||
url = https://github.com/filecoin-project/go-sectorbuilder
|
||||
[submodule "extern/go-fil-proofs"]
|
||||
path = extern/go-fil-proofs
|
||||
url = git@github.com:filecoin-project/go-fil-proofs.git
|
||||
|
44
Makefile
44
Makefile
@ -39,36 +39,6 @@ MODULES+=$(SECTOR_BUILDER_PATH)
|
||||
BUILD_DEPS+=build/.sector-builder-install
|
||||
CLEAN+=build/.sector-builder-install
|
||||
|
||||
## PROOFS
|
||||
|
||||
PROOFS_PATH:=extern/go-fil-proofs/
|
||||
PROOFS_DEPS:=bin/paramcache bin/paramfetch misc/parameters.json
|
||||
PROOFS_DEPS:=$(addprefix $(PROOFS_PATH),$(PROOFS_DEPS))
|
||||
|
||||
$(PROOFS_DEPS): build/.proofs-install ;
|
||||
|
||||
build/.proofs-install: $(PROOFS_PATH)
|
||||
$(MAKE) -C $(PROOFS_PATH) $(PROOFS_DEPS:$(PROOFS_PATH)%=%)
|
||||
@touch $@
|
||||
|
||||
MODULES+=$(PROOFS_PATH)
|
||||
BUILD_DEPS+=build/.proofs-install
|
||||
CLEAN+=build/.proofs-install
|
||||
|
||||
PARAM_SECTOR_SIZES:=1024 268435456
|
||||
PARAM_SECTOR_SIZES:=$(addprefix params-,$(PARAM_SECTOR_SIZES))
|
||||
|
||||
$(PARAM_SECTOR_SIZES): extern/go-fil-proofs/bin/paramfetch extern/go-fil-proofs/misc/parameters.json
|
||||
IPFS_LOGGING=info ./extern/go-fil-proofs/bin/paramfetch -z $(subst params-,,$@) --verbose --json=./extern/go-fil-proofs/misc/parameters.json --ipget-args="--node spawn -p /ip4/138.201.67.219/tcp/4002/ws/ipfs/QmUd6zHcbkbcs7SMxwLs48qZVX3vpcM8errYS7xEczwRMA -p /ip4/138.201.67.218/tcp/4002/ws/ipfs/QmbVWZQhCGrS7DhgLqWbgvdmKN7JueKCREVanfnVpgyq8x -p /ip4/94.130.135.167/tcp/4002/ws/ipfs/QmUEMvxS2e7iDrereVYc5SWPauXPyNwxcy9BXZrC1QTcHE -p /ip4/138.201.68.74/tcp/4001/ipfs/QmdnXwLrC8p1ueiq2Qya8joNvk3TVVDAut7PrikmZwubtR -p /ip4/138.201.67.220/tcp/4001/ipfs/QmNSYxZAiJHeLdkBg38roksAR9So7Y5eojks1yjEcUtZ7i" --ipget-version=v0.4.0
|
||||
.PHONY: $(PARAM_SECTOR_SIZES)
|
||||
|
||||
BUILD_DEPS+=params-1024
|
||||
|
||||
paramcache: extern/go-fil-proofs/bin/paramcache
|
||||
RUST_LOG=info ./extern/go-fil-proofs/bin/paramcache
|
||||
|
||||
# end git modules
|
||||
|
||||
$(MODULES): build/.update-modules ;
|
||||
|
||||
# dummy file that marks the last time modules were updated
|
||||
@ -76,6 +46,20 @@ build/.update-modules:
|
||||
git submodule update --init --recursive
|
||||
touch $@
|
||||
|
||||
# end git modules
|
||||
|
||||
## PROOFS
|
||||
|
||||
PARAM_SECTOR_SIZES:=1024 268435456
|
||||
PARAM_SECTOR_SIZES:=$(addprefix build/.params-,$(PARAM_SECTOR_SIZES))
|
||||
|
||||
$(PARAM_SECTOR_SIZES): build/proof-params/parameters.json
|
||||
./build/proof-params/paramfetch.sh
|
||||
touch $@
|
||||
|
||||
BUILD_DEPS+=build/.params-1024
|
||||
CLEAN+=build/.params-1024
|
||||
|
||||
CLEAN+=build/.update-modules
|
||||
|
||||
deps: $(BUILD_DEPS)
|
||||
|
42
build/proof-params/parameters.json
Normal file
42
build/proof-params/parameters.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"v11-vdf-post-6142c5095dcab8adf8698aaea24eac78035e3fefe6503b3e2f80758e4c948639.params": {
|
||||
"cid": "QmYS9NmkfVtZCtQPF18uQBeWfajF5YRKKkDPXpVR6pzzP4",
|
||||
"digest": "43008a8c945076a08aa2e7c4785241de",
|
||||
"sector_size": 1024
|
||||
},
|
||||
"v11-vdf-post-6142c5095dcab8adf8698aaea24eac78035e3fefe6503b3e2f80758e4c948639.vk": {
|
||||
"cid": "QmTXenYSVvEz2yEJ1deCobfQBVgykkigBuvWJCzTM5tmC2",
|
||||
"digest": "73b49d9cf0ba983b3e861da0e0ee2e2a",
|
||||
"sector_size": 1024
|
||||
},
|
||||
"v11-vdf-post-71ca99ebb6212e45b2affa16eb6e1f671c37986e84ee8b9edbf924ab45b5fdfe.params": {
|
||||
"cid": "Qmc3R5xmapcSGKGR9zRC2fyPo3QuAuChtsKwswE6NZ6QMQ",
|
||||
"digest": "8091b735d254982b0b62e712bab82139",
|
||||
"sector_size": 268435456
|
||||
},
|
||||
"v11-vdf-post-71ca99ebb6212e45b2affa16eb6e1f671c37986e84ee8b9edbf924ab45b5fdfe.vk": {
|
||||
"cid": "QmeD4mdJFPjsWouBPPwvm6iVFYG8bpqNYetd2Ux7PoZawz",
|
||||
"digest": "32784464acc85a662ea16ecf5aba931d",
|
||||
"sector_size": 268435456
|
||||
},
|
||||
"v11-zigzag-proof-of-replication-5efcf852a15bd74808bc65d6f2df146de817baea96c96e3b752e6a3349957644.params": {
|
||||
"cid": "QmNSuxq15JPFCTehxVpgJydNZ79rpLoNwnLzQMGA9EziXg",
|
||||
"digest": "818cd9cc2e0e47210a05bd073847ab5a",
|
||||
"sector_size": 268435456
|
||||
},
|
||||
"v11-zigzag-proof-of-replication-5efcf852a15bd74808bc65d6f2df146de817baea96c96e3b752e6a3349957644.vk": {
|
||||
"cid": "Qmbc8LcydZXsVqQrkNMeLEu31Vxi1VigQGJ2ehytxWPALH",
|
||||
"digest": "a6636e2ee1a176161e022296bc045e79",
|
||||
"sector_size": 268435456
|
||||
},
|
||||
"v11-zigzag-proof-of-replication-a09b5cf44f640589b1b02cf823fa28269850342bcefa4878189b9b5c9ec4d2bb.params": {
|
||||
"cid": "QmTfhTnkFvbpFfw8UydFdnPCDfxgAxEcw4fRdGsELpcFnh",
|
||||
"digest": "906b6c0c9dc5bb581d9641c11b54e197",
|
||||
"sector_size": 1024
|
||||
},
|
||||
"v11-zigzag-proof-of-replication-a09b5cf44f640589b1b02cf823fa28269850342bcefa4878189b9b5c9ec4d2bb.vk": {
|
||||
"cid": "QmRDcUxfpPY9a1vR3T4vRgxHtWHyy9m3xuMQtj8P749r4e",
|
||||
"digest": "3632776cd23e376694c625390b9a73ea",
|
||||
"sector_size": 1024
|
||||
}
|
||||
}
|
8
build/proof-params/paramfetch.sh
Executable file
8
build/proof-params/paramfetch.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IPGET_PARAMS="--node=spawn -p=/ip4/138.201.67.219/tcp/4002/ws/ipfs/QmUd6zHcbkbcs7SMxwLs48qZVX3vpcM8errYS7xEczwRMA -p=/ip4/138.201.67.218/tcp/4002/ws/ipfs/QmbVWZQhCGrS7DhgLqWbgvdmKN7JueKCREVanfnVpgyq8x -p=/ip4/94.130.135.167/tcp/4002/ws/ipfs/QmUEMvxS2e7iDrereVYc5SWPauXPyNwxcy9BXZrC1QTcHE -p=/ip4/138.201.68.74/tcp/4001/ipfs/QmdnXwLrC8p1ueiq2Qya8joNvk3TVVDAut7PrikmZwubtR -p=/ip4/138.201.67.220/tcp/4001/ipfs/QmNSYxZAiJHeLdkBg38roksAR9So7Y5eojks1yjEcUtZ7i"
|
||||
OUT_DIR="/var/tmp/filecoin-proof-parameters"
|
||||
PARAMS="build/proof-params/parameters.json"
|
||||
|
||||
mkdir -p $OUT_DIR
|
||||
jq '. | to_entries | map("-o '$OUT_DIR'/\(.key) \(.value.cid)") | .[]' --raw-output $PARAMS | xargs -t -L1 ipget --progress $IPGET_PARAMS
|
1
extern/go-fil-proofs
vendored
1
extern/go-fil-proofs
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 5201fa9a47494a673da4322dffdf20b7bc335acb
|
Loading…
Reference in New Issue
Block a user