0g-chain/internal/x/paychan
rhuairahrighairigh f58262c8b0 improve command UX
2018-09-01 22:22:50 -04:00
..
client improve command UX 2018-09-01 22:22:50 -04:00
doc.go add pkg doc file 2018-07-09 19:50:59 +01:00
endblocker_test.go fix genesis bug, get app running 2018-09-01 19:29:51 -04:00
endblocker.go fix genesis bug, get app running 2018-09-01 19:29:51 -04:00
handler.go add commands 2018-09-01 16:41:40 -04:00
keeper_test.go fix genesis bug, get app running 2018-09-01 19:29:51 -04:00
keeper.go fix genesis bug, get app running 2018-09-01 19:29:51 -04:00
README.md improve command UX 2018-09-01 22:22:50 -04:00
test_common.go add validation and signature checks 2018-09-01 13:16:56 -04:00
types_test.go add validation and signature checks 2018-09-01 13:16:56 -04:00
types.go fix genesis bug, get app running 2018-09-01 19:29:51 -04:00
wire.go improve command UX 2018-09-01 22:22:50 -04:00

Payment channel implementation sketch

Simplifications:

  • unidirectional paychans
  • no top ups or partial withdrawals (only opening and closing)

TODO

  • in code TODOs
  • Tidy up - method descriptions, heading comments, remove uneccessary comments, README/docs
  • Find a better name for Queue - clarify distinction between int slice and abstract queue concept
  • write some sort of integration test
    • possible bug in submitting same update repeatedly
  • find nicer name for payout
  • add Gas usage
  • add tags (return channel id on creation)
  • refactor cmds to be able to test them, then test them
    • verify doesnt throw json parsing error on invalid json
    • cant submit an update from an unitialised account
    • pay without a --from returns confusing error
  • use custom errors instead of using sdk.ErrInternal
  • split off signatures from update as with txs/msgs - testing easier, code easier to use, doesn't store sigs unecessarily on chain
  • consider removing pubKey from UpdateSignature - instead let channel module access accountMapper
  • remove printout from tests when app initialised
  • refactor queue into one object