filecoin-project / oni

👹 (DEPRECATED; see README) Project Oni | Network Validation
https://docs.google.com/document/d/16jYL--EWYpJhxT9bakYq7ZBGLQ9SB940Wd1lTDOAbNE
7 stars 5 forks source link

fix payment channel stress tests #264

Closed nonsense closed 4 years ago

nonsense commented 4 years ago

This PR is fixing the payment channel stress tests. There are two problems with them at the moment:

  1. Incorrect value sent when publishing to a subscription in the test plan.
  2. Some weird ID mismatch caused either by Lotus or specs-actors v0.9.12 or something else, described below:

Abortf: voucher payment channel address t01002 does not match receiver t2bev75hv5nxtp22pmfs3bquqphjhlqf3z2hwsqlq
...
{"ts":1601995860076919846,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"payment voucher created; lane=4, nonce=3, amount=9000000000000000000"}}}
{"ts":1601995860077627260,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"remaining balance: 9000000000000000000"}}}
{"ts":1601995860079879518,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"payment voucher created; lane=5, nonce=3, amount=9000000000000000000"}}}
{"ts":1601995860080606931,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"remaining balance: 6000000000000000000"}}}
{"ts":1601995860082887728,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"payment voucher created; lane=6, nonce=3, amount=9000000000000000000"}}}
{"ts":1601995860083579357,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"remaining balance: 3000000000000000000"}}}
{"ts":1601995860085762595,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"payment voucher created; lane=7, nonce=3, amount=9000000000000000000"}}}
{"ts":1601995860086466361,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"remaining balance: 0"}}}
{"ts":1601995860086478950,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"finished sending all payment vouchers"}}}

...
{"ts":1601995830144740770,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"started node API server at 0.0.0.0:1234"}}}
{"ts":1601995830144843195,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"publish our address to the clients addr topic"}}}
{"ts":1601995830145099040,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"waiting for all nodes to be ready"}}}
{"ts":1601995831146085566,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"got 2 miner addrs"}}}
2020-10-06T14:50:32.020Z        WARN    messagepool     messagepool/messagepool.go:1191 could not recover signature for bls message bafy2bzaceahxsewxlqqx4px2gazscue4o3zqheln6m4ezg3hkadmpzlapuxuy
{"ts":1601995832161727878,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"connected peers: 5"}}}
{"ts":1601995832161769787,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"acting as Receiver"}}}
{"ts":1601995832162826866,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"message_event":{"message":"adding 24 payment vouchers"}}}
2020-10-06T14:51:00.026Z        WARN    vm      vm/runtime.go:283       Abortf: voucher payment channel address t01002 does not match receiver t2bev75hv5nxtp22pmfs3bquqphjhlqf3z2hwsqlq
2020-10-06T14:51:00.026Z        WARN    vm      vm/runtime.go:116       VM.Call failure: voucher payment channel address t01002 does not match receiver t2bev75hv5nxtp22pmfs3bquqphjhlqf3z2hwsqlq (RetCode=16):
    github.com/filecoin-project/specs-actors/v2/actors/builtin/paych.Actor.UpdateChannelState
        /go/pkg/mod/github.com/filecoin-project/specs-actors/v2@v2.0.0-20201002200957-bdd876b3bbe9/actors/builtin/paych/paych_actor.go:188
{"ts":1601995860026923419,"msg":"","group_id":"clients","run_id":"btu87b1961nlg5j09aog","event":{"failure_event":{"group":"clients","error":"failed to check voucher spendable: apply message failed: voucher payment channel address t01002 does not match receiver t2bev75hv5nxtp22pmfs3bquqphjhlqf3z2hwsqlq (RetCode=16)"}}}
nonsense commented 4 years ago

~Looks like we are not setting up the Receiver correctly from the Sender:~

VM.Call failure: voucher payment channel address t01002 does not match receiver t2bev75hv5nxtp22pmfs3bquqphjhlqf3z2hwsqlq

~I imagine we should be constructing the voucher with the receiver set to t01002 in this case.~

nonsense commented 4 years ago

@Stebalien somewhat related to https://github.com/filecoin-project/oni/pull/263

I am getting the payment channel error mentioned above only when using specs-actors v0.9.12 - downgrading to v0.9.11 and lotus set to 1a170e18add7 fixes this.


I am not sure where the bug is, but my guess is that something is wrong with specs-actors v0.9.12, so that we get a mismatch between the rt.Receiver and the payment channel address.

nonsense commented 4 years ago

Looks like the version of lotus updated at https://github.com/filecoin-project/oni/pull/266 solved the issue.