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

Add FastFinality contract #106 #160

Merged
merged 7 commits into from Jan 21, 2019

Conversation

Projects
None yet
3 participants
@syuhei176
Copy link
Member

syuhei176 commented Jan 3, 2019

Task List

  • dispute
  • challenge
  • secondDispute
  • finalizeDispute
  • spec: dispute
  • spec: challenge
  • spec: secondDispute
  • spec: finalizeDispute

Closes #106

@syuhei176 syuhei176 force-pushed the fast-finality branch from d077af9 to 2a3cb81 Jan 3, 2019

@coveralls

This comment has been minimized.

Copy link

coveralls commented Jan 3, 2019

Pull Request Test Coverage Report for Build 621

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.667%

Totals Coverage Status
Change from base Build 608: 0.0%
Covered Lines: 528
Relevant Lines: 649

💛 - Coveralls
@coveralls

This comment has been minimized.

Copy link

coveralls commented Jan 3, 2019

Pull Request Test Coverage Report for Build 666

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.667%

Totals Coverage Status
Change from base Build 633: 0.0%
Covered Lines: 528
Relevant Lines: 649

💛 - Coveralls

@syuhei176 syuhei176 force-pushed the fast-finality branch 2 times, most recently from 047d4b8 to 4a0660e Jan 3, 2019

@syuhei176 syuhei176 force-pushed the fast-finality branch from 4a0660e to 9196ba9 Jan 3, 2019

address recipient;
uint256 withdrawableAt;
uint256 amount;
bool isUsed;

This comment has been minimized.

@shogochiai

shogochiai Jan 6, 2019

Contributor

@syuhei176
uint 256 bond;?

This comment has been minimized.

@syuhei176

syuhei176 Jan 15, 2019

Member

surely, I'll add bond.

@syuhei176

This comment has been minimized.

Copy link
Member

syuhei176 commented Jan 6, 2019

I found a problem.

Basically, sender and operator are malicious in Plasma double spend attack scenario.
And FF transactions were signed by sender and operator.

Sender sign two different transactions, tx1 is changing owner to the receiver, tx2 is to the operator.

sender send tx1 to the receiver, but the operator includes tx2 in the block and include tx1 in the next block. Then tx1 is double spent transaction. But receiver already receives tx1, and the sender gets an item from the receiver.

The receiver sends a dispute request by tx1, but the operator can challenge by inclusion proof of tx1.

To solve this.
The operator should show that tx1 is exitable for the receiver before challenging the dispute.

uint256 index,
uint256 blkNum,
bytes txBytes,
bytes txInfos

This comment has been minimized.

@shogochiai

shogochiai Jan 7, 2019

Contributor

(txInfos|_txInfos) data structure is being used in many places but structure information is somehow inaccessible. Please note here how should it be.

AFAIK txInfos is RLP decodable and the first element is to be Merkle Proof of Transactions

What I suggest is in form of comment like -

/* txInfos
[
  <merkle_proof_of_transactions>,
  <signature>,
  <confsig>,
  <???>
]
*/

This comment has been minimized.

@syuhei176

syuhei176 Jan 7, 2019

Member

txInfos include proof, signature and confsig.
I don't want to usetxInfos but there is solidity limitation for the number of arguments

This comment has been minimized.

@shogochiai

shogochiai Jan 7, 2019

Contributor

It's okay to use RLP bytes I also believe :)
But format indication is better to be this time. I needed 2~3 hops to reach that.

This comment has been minimized.

@syuhei176

syuhei176 Jan 7, 2019

Member

Added comments as js doc;)

@syuhei176

This comment has been minimized.

Copy link
Member

syuhei176 commented Jan 9, 2019

I added the second dispute.

@syuhei176 syuhei176 force-pushed the fast-finality branch from 254917b to 42b9836 Jan 9, 2019

@syuhei176 syuhei176 force-pushed the fast-finality branch from ce8f1fb to 3dbcc27 Jan 15, 2019

@syuhei176 syuhei176 changed the title [WIP] Add FastFinality contract #106 Add FastFinality contract #106 Jan 15, 2019

@syuhei176

This comment has been minimized.

Copy link
Member

syuhei176 commented Jan 15, 2019

added all specs.

syuhei176 added a commit that referenced this pull request Jan 16, 2019

@syuhei176 syuhei176 force-pushed the fast-finality branch from e19c80f to 94b372b Jan 16, 2019

@syuhei176 syuhei176 merged commit ea7f86c into master Jan 21, 2019

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 77.667%
Details
@syuhei176

This comment has been minimized.

@syuhei176 syuhei176 deleted the fast-finality branch Jan 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment