Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move testground/lotus-soup testplan from oni to lotus #4727

Merged
merged 381 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
381 commits
Select commit Hold shift + click to select a range
b3b89b2
Merge pull request #77 from filecoin-project/seq-num-for-all-miners
nonsense Jun 29, 2020
6c8abeb
Merge pull request #78 from filecoin-project/fix-compositions
nonsense Jun 29, 2020
da85855
option to turn on natural time mining
vyzo Jun 29, 2020
cced69e
add composition for natural time test
vyzo Jun 29, 2020
79246e6
record shutting down message in a more pertinent place
vyzo Jun 29, 2020
6b44e6d
update composition-natural.toml
vyzo Jun 29, 2020
24730e1
Merge pull request #76 from filecoin-project/feat/mine-natural-time
vyzo Jun 29, 2020
62f63a2
remove useless error argument from retrieveData
vyzo Jun 30, 2020
36f82ab
deal stress test
vyzo Jun 30, 2020
4595ded
manifest and composition for deal stress test
vyzo Jun 30, 2020
eec5c23
working client rpc
nonsense Jun 30, 2020
204714a
wip
nonsense Jun 30, 2020
33e60df
resolved merge conflicts
nonsense Jun 30, 2020
954ad1f
fixup
nonsense Jun 30, 2020
63bce1a
extract starting of rpc servers
nonsense Jun 30, 2020
b62878c
upgrade go-sdk
nonsense Jun 30, 2020
903b1ea
more logging for serial execution
vyzo Jun 30, 2020
e3d2d2e
extract withApiEndpoint
nonsense Jun 30, 2020
0a9af6a
extract startServer
nonsense Jun 30, 2020
46beab3
fixup
nonsense Jun 30, 2020
af582af
register and export lotus metrics (#84)
nonsense Jun 30, 2020
035bf8b
Merge pull request #82 from filecoin-project/sector-analysis-tools
nonsense Jun 30, 2020
7f37165
refactor lotus recipes to make them more manageable. (#86)
raulk Jun 30, 2020
436fe15
form testkit; separate test case logic from node templates.
raulk Jul 1, 2020
81f8451
iterate on testkit library.
raulk Jul 1, 2020
e5d6751
rename testkit.{Run=>Handle}DefaultRole.
raulk Jul 1, 2020
de6d927
go mod tidy.
raulk Jul 1, 2020
e01b887
wip
nonsense Jun 25, 2020
8469f67
set drand_period=1s
yusefnapora Jun 25, 2020
0b386f2
refactor drand node and implement halting
yusefnapora Jun 25, 2020
406bd5d
define new test case for drand-halting
yusefnapora Jun 26, 2020
45068f6
use testground selector
yusefnapora Jun 26, 2020
8ec4eb8
fix log level in drand-halting
yusefnapora Jun 26, 2020
818bdd4
fix default log level
yusefnapora Jun 26, 2020
79b0472
set gossipRelay field
yusefnapora Jun 26, 2020
9cb809a
add DebugSpew helper
yusefnapora Jun 29, 2020
04311d6
fix rebase cruft
yusefnapora Jun 29, 2020
6c4e83f
use global params in drand compositions
yusefnapora Jun 29, 2020
8aef427
implement halting as state machine
yusefnapora Jun 29, 2020
f0c636f
enable go build cache
yusefnapora Jun 29, 2020
e14b716
add suspend_events param to manifest
yusefnapora Jun 30, 2020
4ac2de1
add genesis_timestamp_offset to drand-halting testcase
yusefnapora Jun 30, 2020
72426d2
use latest sdk-go
yusefnapora Jun 30, 2020
4cd197c
wait for drand chain to catchup in Resume
yusefnapora Jun 30, 2020
cecdb0c
halt drand during lotus chain sync
yusefnapora Jun 30, 2020
11bde71
fix log message
yusefnapora Jun 30, 2020
e748820
refactor soup: assemble testkit; separate test case logic from node t…
raulk Jul 1, 2020
274b07f
Merge branch 'master' into plan/deal-stress-test
raulk Jul 1, 2020
167a30f
export both apis for miners
nonsense Jul 1, 2020
a8841a8
merge testkit into plan/drand-halting
yusefnapora Jul 1, 2020
ea6dbc9
merge origin/master into plan/drand-halting
yusefnapora Jul 1, 2020
459cd65
Merge pull request #70 from filecoin-project/plan/drand-halting
yusefnapora Jul 1, 2020
c7f9528
update params for ports
nonsense Jul 1, 2020
e6bc6aa
resolve merge conflicts
nonsense Jul 1, 2020
83313ea
fix drand merge mess
yusefnapora Jul 1, 2020
e66d439
Merge pull request #91 from filecoin-project/fix/drand-suspend
yusefnapora Jul 1, 2020
561b10a
remove deprecated lotus-testground.
raulk Jul 1, 2020
45f20b8
remove lotus-testground from CircleCI.
raulk Jul 1, 2020
4eb2218
Update FFI and Lotus versions (#89)
raulk Jul 1, 2020
619f3fd
update runtime image to v2.
raulk Jul 1, 2020
fee13a6
rename test case to deals-stress-test
vyzo Jul 2, 2020
bcd3e79
Merge branch 'master' into plan/deal-stress-test
vyzo Jul 2, 2020
9c6b6e6
remove duplicate miner addrs collection
vyzo Jul 2, 2020
1623917
Merge branch 'master' into hook-up-miner-rpc-apis
nonsense Jul 2, 2020
6d0c0b4
Merge pull request #92 from filecoin-project/rm-lotus-testground
nonsense Jul 2, 2020
740741b
add mining_mode to deals-e2e test case
nonsense Jul 2, 2020
b601fd1
Merge pull request #90 from filecoin-project/hook-up-miner-rpc-apis
nonsense Jul 2, 2020
22005d6
listen to all ifaces when exposing internal apis
nonsense Jul 2, 2020
01d6554
Merge pull request #94 from filecoin-project/listen-to-all-ifaces
nonsense Jul 2, 2020
122926a
add testground build selector to compositions
vyzo Jul 2, 2020
19ce23e
initialize block delay to its minimum value of 1
vyzo Jul 2, 2020
b6c830c
Merge branch 'master' into plan/deal-stress-test
vyzo Jul 2, 2020
65cc1a4
add testground build tag to circle ci
vyzo Jul 2, 2020
7e63197
connect miners in a full mesh.
raulk Jul 2, 2020
faeee03
gomod: update lotus@master
vyzo Jul 3, 2020
2b6c1e0
add delay before starting deals
vyzo Jul 3, 2020
62f1e47
expose rpc ports
vyzo Jul 3, 2020
91d3893
compositions for natural time mining in deal stress tests
vyzo Jul 3, 2020
6c14fda
Merge pull request #97 from filecoin-project/fix/connect-miners
vyzo Jul 3, 2020
26ad4da
Merge branch 'master' into plan/deal-stress-test
vyzo Jul 3, 2020
2ed7540
initial DELVING.md document.
raulk Jul 3, 2020
06e5c42
add instruction on submitting issues upstream.
raulk Jul 3, 2020
a223f80
commands for cluster:k8s ; automating setting up of envs
nonsense Jul 3, 2020
c3a1324
add lsm commands
nonsense Jul 3, 2020
483a98f
Update test-scenario-request.md
raulk Jul 3, 2020
7258ad0
Merge pull request #99 from filecoin-project/docs/delving
nonsense Jul 3, 2020
84bc071
wip
nonsense Jul 3, 2020
d867f0c
set the PropagationDelay to 2
vyzo Jul 3, 2020
8708f31
wip
nonsense Jul 3, 2020
1beb8fa
upgrade buildbase to v4
nonsense Jul 3, 2020
3aacb7c
remove stats
nonsense Jul 3, 2020
9148b0f
lotus at 3db96653
nonsense Jul 3, 2020
eadb49c
works
nonsense Jul 3, 2020
aa90a8a
upgrade lotus
nonsense Jul 3, 2020
20b4375
upgrade lotus to master
nonsense Jul 3, 2020
9027161
remove composition
nonsense Jul 3, 2020
89e413d
revert composition
nonsense Jul 3, 2020
027b80f
revert soup main.go
nonsense Jul 3, 2020
7a5f139
revert build flags
nonsense Jul 3, 2020
cd3dbf6
remove sleep
nonsense Jul 3, 2020
84cf7d8
revert specs-actors
nonsense Jul 3, 2020
f7715ab
bump filecoin-ffi to 6a143
nonsense Jul 3, 2020
f062b55
gomod: update go-fil-markets for panic fix cherry-pick
vyzo Jul 6, 2020
f4568fc
Merge pull request #102 from filecoin-project/upgrade-ffi
nonsense Jul 6, 2020
e7271cf
Merge pull request #103 from filecoin-project/upgrade-lotus
nonsense Jul 6, 2020
1289bca
merged master
nonsense Jul 6, 2020
75b842b
upgrade lotus
nonsense Jul 6, 2020
f529f3b
move ffi forward
nonsense Jul 6, 2020
887bf05
fix signature for NewTestMiner
nonsense Jul 6, 2020
8d5a8b0
make the testkit friends with local:exec. (#105)
raulk Jul 6, 2020
b906c49
Merge pull request #85 from filecoin-project/dashboard-panels-lotus-m…
nonsense Jul 6, 2020
db383b6
Merged with master (so that we get blockchain stats)
nonsense Jul 6, 2020
4ce21af
go mod tidy
nonsense Jul 6, 2020
dd3d04f
add basic timers
nonsense Jul 6, 2020
2ca9e9f
loop and retry if mining a block fails
yusefnapora Jul 3, 2020
733f2aa
fixes
nonsense Jul 6, 2020
00d837d
add 2 panels for counters
nonsense Jul 6, 2020
920e6f5
add missing %s
nonsense Jul 6, 2020
1c9b867
ERROR -> WARN ; bump up block delay and propagation delay
nonsense Jul 6, 2020
4dea3f4
use lotus master
nonsense Jul 6, 2020
00cc982
panic if we fail to mine 100x in a row
yusefnapora Jul 6, 2020
8a4b647
fix exposed port syntax
yusefnapora Jul 6, 2020
300d401
Merge pull request #104 from filecoin-project/fix/sync-mining
yusefnapora Jul 6, 2020
c77cd13
improved dashboards
nonsense Jul 7, 2020
e244f8d
delete original dashboard
nonsense Jul 7, 2020
0df9b57
revert runtime image to v2
nonsense Jul 7, 2020
e899da0
Merge pull request #81 from filecoin-project/plan/deal-stress-test
nonsense Jul 7, 2020
5d1d733
WIP payments channels stress test (blocked).
raulk Jul 7, 2020
99b6bb3
fix exposed_ports in composition.
raulk Jul 7, 2020
5aac474
Update DELVING.md
raulk Jul 7, 2020
cb3697c
make composition.toml use local:exec; mine in present.
raulk Jul 7, 2020
6eb5e24
move global var setting to init.go.
raulk Jul 7, 2020
69332e1
sanity check: make sure proof parameters are present; add Makefile fo…
raulk Jul 7, 2020
f46375a
rename ClientAddressesMsg#Peer{=>Net}Addr.
raulk Jul 7, 2020
6a45211
Merge pull request #109 from filecoin-project/plan/payments
raulk Jul 7, 2020
8a2a5e7
allow fractional balance parameters
yusefnapora Jul 7, 2020
735c1ec
update param type in manifest
yusefnapora Jul 7, 2020
4926a78
fix max fil check
yusefnapora Jul 7, 2020
645da2b
readme: add testing topics covered by Oni.
raulk Jul 8, 2020
daee5ab
update labels with topics.
raulk Jul 8, 2020
97a17bd
fix labels.
raulk Jul 8, 2020
ac5fc72
add some of @raulk's notes.
raulk Jul 8, 2020
a1166d6
consistent compositions
nonsense Jul 8, 2020
0efcf1b
add topic/deals label.
raulk Jul 8, 2020
31af541
Delete system-process.md
raulk Jul 8, 2020
3dbea4b
Update test-scenario-request.md
raulk Jul 8, 2020
4227f2d
rename attoFil -> filToAttoFil
yusefnapora Jul 8, 2020
b6994b9
add hint/needs-scoring label.
raulk Jul 8, 2020
3e06729
readme: add links to testing topics labels.
raulk Jul 8, 2020
6e45d6b
Merge pull request #117 from filecoin-project/consistent-compositions
nonsense Jul 8, 2020
f19148d
Merge pull request #114 from filecoin-project/attofil
yusefnapora Jul 8, 2020
f20b25a
improve readme with instructions on how to run test cases (#129)
nonsense Jul 9, 2020
4caecf3
print auth token ; set seal delay ; disable permissioned api proxies …
nonsense Jul 9, 2020
5d40607
move compositions to _compositions (#132)
nonsense Jul 9, 2020
1cf77d2
baseline composition 5 clients 1 miner local:docker (#137)
nonsense Jul 9, 2020
36c7227
fix balance (#138)
nonsense Jul 9, 2020
58558f2
one more zero (#139)
nonsense Jul 9, 2020
a50cdda
improved readme - lotus-soup (#136)
nonsense Jul 9, 2020
2c3d473
descriptive composition file names (#133)
nonsense Jul 10, 2020
48a2161
readme: update submodule command (#141)
schomatis Jul 10, 2020
e0e4432
upgrade to next and retrieval signature (#151)
nonsense Jul 17, 2020
510f6bb
upgrading to current version of next (#156)
nonsense Jul 21, 2020
7af5ab5
slashing/termination from failed windowed post + fast retrieval bench…
nonsense Jul 27, 2020
0d0fc2d
randomized network params & batch runner (#142)
yusefnapora Jul 27, 2020
0dc4909
readme: explain batch-run of randomized test cases. (#159)
raulk Jul 27, 2020
700a121
add workstream labels. (#161)
raulk Jul 27, 2020
42ef5d3
fix deps (#171)
nonsense Jul 29, 2020
62a9982
fix lotus-soup deals baseline test (#172)
nonsense Jul 30, 2020
b7e3b4f
unified `tvx` tool; end-to-end MVP for extracting+running msg-class v…
raulk Aug 5, 2020
1637216
dedup state tree CARs from test vectors. (#187)
raulk Aug 5, 2020
17f0b4a
support multiple messages /1 (#185)
nonsense Aug 5, 2020
5353210
generate test-vectors based on tests from chain-validation project (#…
nonsense Aug 5, 2020
8a59bf7
build tvx as part of ci (#192)
nonsense Aug 5, 2020
f97c9e0
upgrade lotus-soup to use latest commit from next branch (#193)
nonsense Aug 5, 2020
9c8ced1
input from stdin functionality for `exec-lotus` ; initial test suites…
nonsense Aug 5, 2020
8203a5d
various fixes: warn on predicted nonce mismatch, randomness length, a…
raulk Aug 6, 2020
fd35438
schema: add message receipts + `description` and `comments` informati…
raulk Aug 6, 2020
7d118e1
fix two disabled tests (#207)
nonsense Aug 6, 2020
81ea0ec
refactor: add default TestVector to TestDriver (#208)
Aug 7, 2020
52cf367
feat: add MustMarshalJSON for more DRY outputting (#211)
Aug 7, 2020
a793824
feat: test driver automatically records applied messages in test vect…
Aug 7, 2020
de62012
add messages/transfer suite (#213)
nonsense Aug 7, 2020
be5bd41
feat: add test name to test vector meta (#214)
Aug 7, 2020
47f0ef0
test: port chain validation multisig test suite (#216)
Aug 7, 2020
ffe3019
messages/nested suite (#215)
nonsense Aug 10, 2020
99f466e
test vector builder API + partial migration of suites (#229)
raulk Aug 14, 2020
9ba87d4
refactor: switch to base64 encoding for binary data (#233)
Aug 14, 2020
acbb809
generator; single main() entrypoint for each suite. (#232)
raulk Aug 14, 2020
b2c2a7b
nested test suite (#231)
nonsense Aug 14, 2020
0afeed6
nested and paych suites in generator format (#235)
nonsense Aug 14, 2020
b2adc12
rm suite_messages_nested.go. (#236)
raulk Aug 14, 2020
955b445
generator: stamp vectors with generation data; omitempty. (#237)
raulk Aug 14, 2020
ad17dc2
upgrade test vectors to latest lotus (#238)
raulk Aug 15, 2020
6954e6c
migrate actor creation suite. (#239)
raulk Aug 16, 2020
328cd14
migrate transfer suite. (#240)
raulk Aug 16, 2020
6164d16
migrate multisig suite. (#241)
raulk Aug 16, 2020
497bda2
transfer builders and scripts to filecoin-project/test-vectors. (#242)
raulk Aug 16, 2020
f6f3ffc
docs: remove reference to testground oni branch in README (#243)
dirkmc Aug 26, 2020
9cebb09
docs: add @willscott and @alanshaw to the team (#244)
Aug 26, 2020
6be293e
payment channels tests improvements (#245)
dirkmc Aug 28, 2020
ed12b83
Expand extraction / replay to
willscott Aug 28, 2020
d3f6657
Update README.md (#250)
nonsense Sep 10, 2020
d9bcdfe
Update README.md (#251)
nonsense Sep 10, 2020
6563a68
wip graphsync stress test.
raulk Sep 10, 2020
77000db
wip; add concurrency; make it work.
raulk Sep 11, 2020
172204c
increase chunk size; change composition.
raulk Sep 11, 2020
6cff57a
Merge branch 'master' of github.com:filecoin-project/oni into general…
willscott Sep 14, 2020
20a0f7a
flip to test-vectors schema
willscott Sep 14, 2020
097d825
upgrade lotus-soup (drand, lotus, stop/resume drand) (#249)
nonsense Sep 16, 2020
8b7e7d4
upgrade lotus to master, and sync filecoin-ffi versions (#254)
nonsense Sep 16, 2020
f702ce3
enable paych tests (#255)
nonsense Sep 16, 2020
63f903a
clone fil-blst in extra for the local:docker runner (#256)
nonsense Sep 16, 2020
a925383
checkpoint
willscott Sep 16, 2020
77a956c
Merge branch 'master' of github.com:filecoin-project/oni into general…
willscott Sep 16, 2020
ed7423b
don't include not-yet-accessed blocks in car generation
willscott Sep 16, 2020
ea56e56
fix routing policy (#257)
nonsense Sep 17, 2020
1c9257d
nightly/hourly job to run testground testplans (#253)
nonsense Sep 17, 2020
36b8a01
chore: update deps
Sep 22, 2020
9a0d5cd
update for lotus/actors network upgrade changes
Stebalien Sep 23, 2020
80619fa
Merge pull request #259 from filecoin-project/generalextraction-updat…
willscott Sep 23, 2020
f21ca85
trigger more test plans on CI (#258)
nonsense Sep 23, 2020
c839c57
combine #260 and #246.
raulk Sep 24, 2020
72537b6
Merge branch 'master' into refactor-tvx
raulk Sep 24, 2020
c507f40
remove driver from tvx; use lotus driver.
raulk Sep 24, 2020
48b7945
add circleci job for building tvx.
raulk Sep 24, 2020
08fc0b7
feat(graphsync): add comptability check between versions
hannahhoward Sep 24, 2020
41ab87e
wip
raulk Sep 27, 2020
400af0d
wip accessed-cids retention.
raulk Sep 27, 2020
bc7f20e
Merge pull request #261 from filecoin-project/refactor-tvx
raulk Sep 28, 2020
a5b5706
Merge pull request #252 from filecoin-project/graphsync
raulk Oct 5, 2020
0017ea8
update oni for specs-actors v2 upgrade (#263)
Stebalien Oct 6, 2020
6b3ffdb
fix lotus-soup/deals-e2e test case (#262)
nonsense Oct 6, 2020
fe1ef15
chore: update lotus to latest next (#266)
Stebalien Oct 6, 2020
2a6e05b
fix type on subscription channel (#264)
nonsense Oct 6, 2020
44af7e4
remove tvx and corpus from this repo; spun off elsewhere. (#268)
raulk Oct 7, 2020
4cc1fcb
graphsync - add composition for k8s (#267)
nonsense Oct 7, 2020
1a64caa
record point for every fetch (#269)
nonsense Oct 8, 2020
cc8a0f8
fix deals stress tests (#265)
nonsense Oct 11, 2020
fbe76d0
Update lotus with wallet changes (#271)
magik6k Oct 13, 2020
194c9d6
upgrade go-sdk (#273)
nonsense Oct 14, 2020
881e37e
upgrade go-sdk (#274)
nonsense Oct 14, 2020
a843008
`--metadata` cmd options for testground (#275)
nonsense Oct 16, 2020
1f678c1
merge filecoin-project/oni subtree in testplans/
nonsense Nov 6, 2020
f7f5a27
remove oni submodule
nonsense Nov 6, 2020
bf50071
update Dockerfiles; integrate lotus-soup and graphsync in Lotus CI; u…
nonsense Nov 6, 2020
f0eac01
Merge remote-tracking branch 'origin/master' into nonsense/integrate-…
magik6k Nov 20, 2020
844c0a3
bump docker golang version to 1.15:buster
nonsense Nov 23, 2020
3f15135
trigger testplans only on merge to master
nonsense Nov 23, 2020
fd64086
Merge branch 'master' into nonsense/integrate-testplans-to-lotus
nonsense Nov 23, 2020
52da5ac
go mod replace lotus with ../../
nonsense Nov 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,22 +264,44 @@ jobs:
path: /tmp/test-artifacts/conformance-coverage.html
build-lotus-soup:
description: |
Compile `lotus-soup` Testground test plan using the current version of Lotus.
Compile `lotus-soup` Testground test plan
parameters:
<<: *test-params
executor: << parameters.executor >>
steps:
- install-deps
- prepare
- run: cd extern/oni && git submodule sync
- run: cd extern/oni && git submodule update --init
- run: cd extern/filecoin-ffi && make
- run:
name: "replace lotus, filecoin-ffi, blst and fil-blst deps"
command: cd extern/oni/lotus-soup && go mod edit -replace github.com/filecoin-project/lotus=../../../ && go mod edit -replace github.com/filecoin-project/filecoin-ffi=../../filecoin-ffi && go mod edit -replace github.com/supranational/blst=../../blst
- run:
name: "build lotus-soup testplan"
command: pushd extern/oni/lotus-soup && go build -tags=testground .
command: pushd testplans/lotus-soup && go build -tags=testground .
trigger-testplans:
description: |
Trigger `lotus-soup` test cases on TaaS
parameters:
<<: *test-params
executor: << parameters.executor >>
steps:
- install-deps
- prepare
- run:
name: "download testground"
command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli
- run:
name: "prepare .env.toml"
command: pushd testplans/lotus-soup && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
- run:
name: "prepare testground home dir"
command: mkdir -p $HOME/testground/plans && mv testplans/lotus-soup testplans/graphsync $HOME/testground/plans/
- run:
name: "trigger deals baseline testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/baseline-k8s-3-1.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
- run:
name: "trigger payment channel stress testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/paych-stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
- run:
name: "trigger graphsync testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH


build-macos:
Expand Down Expand Up @@ -473,6 +495,11 @@ workflows:
packages: "./conformance"
vectors-branch: master
- build-lotus-soup
- trigger-testplans:
filters:
branches:
only:
- master
- build-debug
- build-all:
requires:
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "extern/test-vectors"]
path = extern/test-vectors
url = https://github.com/filecoin-project/test-vectors.git
[submodule "extern/oni"]
path = extern/oni
url = https://github.com/filecoin-project/oni.git
[submodule "extern/blst"]
path = extern/blst
url = https://github.com/supranational/blst.git
1 change: 0 additions & 1 deletion extern/oni
Submodule oni deleted from 10ed9e
193 changes: 193 additions & 0 deletions testplans/DELVING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# Delving into the unknown

This write-up summarises how to debug what appears to be a mischievous Lotus
instance during our Testground tests. It also goes enumerates which assets are
useful to report suspicious behaviours upstream, in a way that they are
actionable.

## Querying the Lotus RPC API

The `local:docker` and `cluster:k8s` map ports that you specify in the
composition.toml, so you can access them externally.

All our compositions should carry this fragment:

```toml
[global.run_config]
exposed_ports = { pprof = "6060", node_rpc = "1234", miner_rpc = "2345" }
```

This tells Testground to expose the following ports:

* `6060` => Go pprof.
* `1234` => Lotus full node RPC.
* `2345` => Lotus storage miner RPC.

### `local:docker`

1. Install the `lotus` binary on your host.
2. Find the container that you want to connect to in `docker ps`.
* Note that our _container names_ are slightly long, and they're the last
field on every line, so if your terminal is wrapping text, the port
numbers will end up ABOVE the friendly/recognizable container name (e.g. `tg-lotus-soup-deals-e2e-acfc60bc1727-miners-1`).
* The testground output displays the _container ID_ inside coloured angle
brackets, so if you spot something spurious in a particular node, you can
hone in on that one, e.g. `<< 54dd5ad916b2 >>`.

```
⟩ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
54dd5ad916b2 be3c18d7f0d4 "/testplan" 10 seconds ago Up 8 seconds 0.0.0.0:32788->1234/tcp, 0.0.0.0:32783->2345/tcp, 0.0.0.0:32773->6060/tcp, 0.0.0.0:32777->6060/tcp tg-lotus-soup-deals-e2e-acfc60bc1727-clients-2
53757489ce71 be3c18d7f0d4 "/testplan" 10 seconds ago Up 8 seconds 0.0.0.0:32792->1234/tcp, 0.0.0.0:32790->2345/tcp, 0.0.0.0:32781->6060/tcp, 0.0.0.0:32786->6060/tcp tg-lotus-soup-deals-e2e-acfc60bc1727-clients-1
9d3e83b71087 be3c18d7f0d4 "/testplan" 10 seconds ago Up 8 seconds 0.0.0.0:32791->1234/tcp, 0.0.0.0:32789->2345/tcp, 0.0.0.0:32779->6060/tcp, 0.0.0.0:32784->6060/tcp tg-lotus-soup-deals-e2e-acfc60bc1727-clients-0
7bd60e75ed0e be3c18d7f0d4 "/testplan" 10 seconds ago Up 8 seconds 0.0.0.0:32787->1234/tcp, 0.0.0.0:32782->2345/tcp, 0.0.0.0:32772->6060/tcp, 0.0.0.0:32776->6060/tcp tg-lotus-soup-deals-e2e-acfc60bc1727-miners-1
dff229d7b342 be3c18d7f0d4 "/testplan" 10 seconds ago Up 9 seconds 0.0.0.0:32778->1234/tcp, 0.0.0.0:32774->2345/tcp, 0.0.0.0:32769->6060/tcp, 0.0.0.0:32770->6060/tcp tg-lotus-soup-deals-e2e-acfc60bc1727-miners-0
4cd67690e3b8 be3c18d7f0d4 "/testplan" 11 seconds ago Up 8 seconds 0.0.0.0:32785->1234/tcp, 0.0.0.0:32780->2345/tcp, 0.0.0.0:32771->6060/tcp, 0.0.0.0:32775->6060/tcp tg-lotus-soup-deals-e2e-acfc60bc1727-bootstrapper-0
aeb334adf88d iptestground/sidecar:edge "testground sidecar …" 43 hours ago Up About an hour 0.0.0.0:32768->6060/tcp testground-sidecar
c1157500282b influxdb:1.8 "/entrypoint.sh infl…" 43 hours ago Up 25 seconds 0.0.0.0:8086->8086/tcp testground-influxdb
99ca4c07fecc redis "docker-entrypoint.s…" 43 hours ago Up About an hour 0.0.0.0:6379->6379/tcp testground-redis
bf25c87488a5 bitnami/grafana "/run.sh" 43 hours ago Up 26 seconds 0.0.0.0:3000->3000/tcp testground-grafana
cd1d6383eff7 goproxy/goproxy "/goproxy" 45 hours ago Up About a minute 8081/tcp testground-goproxy
```

3. Take note of the port mapping. Imagine in the output above, we want to query
`54dd5ad916b2`. We'd use `localhost:32788`, as it forwards to the container's
1234 port (Lotus Full Node RPC).
4. Run your Lotus CLI command setting the `FULLNODE_API_INFO` env variable,
which is a multiaddr:

```sh
$ FULLNODE_API_INFO=":/ip4/127.0.0.1/tcp/$port/http" lotus chain list
[...]
```

---

Alternatively, you could download gawk and setup a script in you .bashrc or .zshrc similar to:

```
lprt() {
NAME=$1
PORT=$2

docker ps --format "table {{.Names}}" | grep $NAME | xargs -I {} docker port {} $PORT | gawk --field-separator=":" '{print $2}'
}

envs() {
NAME=$1

local REMOTE_PORT_1234=$(lprt $NAME 1234)
local REMOTE_PORT_2345=$(lprt $NAME 2345)

export FULLNODE_API_INFO=":/ip4/127.0.0.1/tcp/$REMOTE_PORT_1234/http"
export STORAGE_API_INFO=":/ip4/127.0.0.1/tcp/$REMOTE_PORT_2345/http"

echo "Setting \$FULLNODE_API_INFO to $FULLNODE_API_INFO"
echo "Setting \$STORAGE_API_INFO to $STORAGE_API_INFO"
}
```

Then call commands like:
```
envs miners-0
lotus chain list
```

### `cluster:k8s`

Similar to `local:docker`, you pick a pod that you want to connect to and port-forward 1234 and 2345 to that specific pod, such as:

```
export PODNAME="tg-lotus-soup-ae620dfb2e19-miners-0"
kubectl port-forward pods/$PODNAME 1234:1234 2345:2345

export FULLNODE_API_INFO=":/ip4/127.0.0.1/tcp/1234/http"
export STORAGE_API_INFO=":/ip4/127.0.0.1/tcp/2345/http"
lotus-storage-miner storage-deals list
lotus-storage-miner storage-deals get-ask
```

### Useful commands / checks

* **Making sure miners are on the same chain:** compare outputs of `lotus chain list`.
* **Checking deals:** `lotus client list-deals`.
* **Sector queries:** `lotus-storage-miner info` , `lotus-storage-miner proving info`
* **Sector sealing errors:**
* `STORAGE_API_INFO=":/ip4/127.0.0.1/tcp/53624/http" FULLNODE_API_INFO=":/ip4/127.0.0.1/tcp/53623/http" lotus-storage-miner sector info`
* `STORAGE_API_INFO=":/ip4/127.0.0.1/tcp/53624/http" FULLNODE_API_INFO=":/ip4/127.0.0.1/tcp/53623/http" lotus-storage-miner sector status <sector_no>`
* `STORAGE_API_INFO=":/ip4/127.0.0.1/tcp/53624/http" FULLNODE_API_INFO=":/ip4/127.0.0.1/tcp/53623/http" lotus-storage-miner sector status --log <sector_no>`

## Viewing logs of a particular container `local:docker`

This works for both started and stopped containers. Just get the container ID
(in double angle brackets in Testground output, on every log line), and do a:

```shell script
$ docker logs $container_id
```

## Accessing the golang instrumentation

Testground exposes a pprof endpoint under local port 6060, which both
`local:docker` and `cluster:k8s` map.

For `local:docker`, see above to figure out which host port maps to the
container's 6060 port.

## Acquiring a goroutine dump

When things appear to be stuck, get a goroutine dump.

```shell script
$ wget -o goroutine.out http://localhost:${pprof_port}/debug/pprof/goroutine?debug=2
```

You can use whyrusleeping/stackparse to extract a summary:

```shell script
$ go get https://github.com/whyrusleeping/stackparse
$ stackparse --summary goroutine.out
```

## Acquiring a CPU profile

When the CPU appears to be spiking/rallying, grab a CPU profile.

```shell script
$ wget -o profile.out http://localhost:${pprof_port}/debug/pprof/profile
```

Analyse it using `go tool pprof`. Usually, generating a `png` graph is useful:

```shell script
$ go tool pprof profile.out
File: testground
Type: cpu
Time: Jul 3, 2020 at 12:00am (WEST)
Duration: 30.07s, Total samples = 2.81s ( 9.34%)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) png
Generating report in profile003.png
```

## Submitting actionable reports / findings

This is useful both internally (within the Oni team, so that peers can help) and
externally (when submitting a finding upstream).

We don't need to play the full bug-hunting game on Lotus, but it's tremendously
useful to provide the necessary data so that any reports are actionable.

These include:

* test outputs (use `testground collect`).
* stack traces that appear in logs (whether panics or not).
* output of relevant Lotus CLI commands.
* if this is some kind of blockage / deadlock, goroutine dumps.
* if this is a CPU hotspot, a CPU profile would be useful.
* if this is a memory issue, a heap dump would be useful.

**When submitting bugs upstream (Lotus), make sure to indicate:**

* Lotus commit.
* FFI commit.
20 changes: 20 additions & 0 deletions testplans/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SHELL = /bin/bash

.DEFAULT_GOAL := download-proofs

download-proofs:
go run github.com/filecoin-project/go-paramfetch/paramfetch 2048 ./docker-images/proof-parameters.json

build-images:
docker build -t "iptestground/oni-buildbase:v11-lotus" -f "docker-images/Dockerfile.oni-buildbase" "docker-images"
docker build -t "iptestground/oni-runtime:v5" -f "docker-images/Dockerfile.oni-runtime" "docker-images"

push-images:
docker push iptestground/oni-buildbase:v11-lotus
docker push iptestground/oni-runtime:v5

pull-images:
docker pull iptestground/oni-buildbase:v11-lotus
docker pull iptestground/oni-runtime:v5

.PHONY: download-proofs build-images push-images pull-images
Loading