-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
payments channel lanes appear broken #2297
Comments
raulk
changed the title
payments channel lanes features appears broken
payments channel lanes appear broken
Jul 7, 2020
BTW -- we really should have tests for this package. I'm pretty sure there are more dragons lurking inside. Maybe Oni can help with that? |
Closing as this should now be fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
During the execution of the payment channels stress test, I started seeing errors when sending a payment voucher on a newly-allocated lane. I was testing with 256 lanes initially, then down to 8 lanes, but ended up bringing it down to 1 lane to isolate the faults.
The interesting test logic starts here: https://github.com/filecoin-project/oni/pull/109/files#diff-cd0cffda40d3b3034e745c5e679091f7R66
Testing against Lotus 99b5ec9.
Problem
We start seeing (recovered) nil pointer panics from specs-actors v0.6.1 (lotus master) when sending payment vouchers on newly-allocated lanes:
Taking a stroll down Debugging Lane
Debugging away, I found that the
ChannelInfo
is storing a suspiciousNextLane
value, which looks likemax(int64) + an increment
.The piece of code that generates this value seems to be
maxLaneFromState()
:lotus/paychmgr/paych.go
Lines 57 to 65 in 8233143
If there are no lanes (as is the case), this method will return max int64, which then specs-actors doesn't appreciate.
maxLaneFromState()
is called fromloadOutboundChannelInfo()
, which gets called fromwaitForPaychCreateMsg()
(and other places, but this is the relevant one for us).When we first create a channel,
waitForPaychCreateMsg()
waits until the message is posted on chain, followed bybuild.MessageConfidence
confirmations, and "imports" the paych actor's state into our paych store (storing aChannelInfo
struct).Findings/bugs
The text was updated successfully, but these errors were encountered: