Skip to content

Conversation

@Brechtpd
Copy link
Contributor

https://github.com/Loopring/team/issues/124

Numbers in the design doc updated for the worst case scenario where all bytes are non-zero (like we do for all other data as well), cost will be lower in practice.

const sizeA = 25;
const sizeB = 43;
assert.equal(sizeA + sizeB, size, "invalid transform sizes");
const size1 = 29;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per my understandings, TX_DATA_AVAILABILITY_SIZE(68) is the max bytes of DA in all types, what's the reason of this 29+39(before 25+43)? I think it is a separation best fits for 1 specific type (transfer??), is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's the number of bytes necessary for a trade. And transfers are normally a couple of bytes less so it works well for transfers as well (though if extra addresses are put onchain a transfer can actually make use of almost all 68 bytes, but that should be uncommon).

Copy link

@hosschao hosschao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Brechtpd Brechtpd merged commit dbba45e into master Sep 14, 2020
@Brechtpd Brechtpd deleted the protocol36-storageid branch September 14, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants