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

More viable plasma rough draft #35

Closed
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@Koroqe
Copy link
Member

Koroqe commented Jul 13, 2018

No description provided.

@Koroqe Koroqe requested a review from johannbarbie Jul 13, 2018

@johannbarbie
Copy link
Member

johannbarbie left a comment

to be continued

exit.outputBonds = new address[](2);
exit.startedAt = uint32(block.timestamp);
exit.priority = _determineTxPriority(_i1Proof, _i2Proof);
exit.height = uint32(-1);

This comment has been minimized.

@johannbarbie

johannbarbie Jul 17, 2018

Member

why such a big height?

This comment has been minimized.

@Koroqe

Koroqe Aug 9, 2018

Member

Will use it later

exit.height = uint32(-1);

TxLib.Input[] memory inputs = new TxLib.Input[](tx.ins.length);
for (uint256 i = 0; i < inputs.length; i++) {

This comment has been minimized.

@johannbarbie

johannbarbie Jul 17, 2018

Member

why not just iterate over tx.ins ? drop inputs object.

ERC20(tokens[0].addr).transferFrom(msg.sender, address(this), inflightBond); //currently set psc tokens

//create exit with bond
InflightExit storage exit = inflightExits[txHash];

This comment has been minimized.

@johannbarbie

johannbarbie Jul 17, 2018

Member

inflightExits[txHash] = InflightExit({key: value, ...}) <- why not like this?
or should be we able to update existing exits?

This comment has been minimized.

@Koroqe

Koroqe Aug 9, 2018

Member

Can't copy TxLib.Input memory[] memory to storage, thats why.
Btw, from Solidity docs:
If the storage struct has tightly packed properties, initialize it with separate assignments: x.a = 1; x.b = 2;. In this way it will be easier for the optimizer to update storage in one go, thus making assignment cheaper.

@eezcjkr

This comment has been minimized.

Copy link
Collaborator

eezcjkr commented Dec 6, 2018

Closed in favour of #84

@eezcjkr eezcjkr closed this Dec 6, 2018

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