This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Weight annotation. #3157
Weight annotation. #3157
Changes from all commits
b042a93
37f6ae0
2e5b1f4
b7646ec
a871c9f
8e7c803
a824b56
5de080f
a8789b9
7d96429
30b4ba7
2a9c9df
342efb5
b8f564e
07fdfe2
7f33006
36063fe
7a0fbc9
84fa279
f4d4579
def6425
d12713a
3350f9c
b788507
b9b6b53
045681e
bfcfa36
107801f
c100df9
f5d33c6
0c1c268
6a0a1d4
b06ef82
c3e0ee3
5b0c715
e683829
ce11fc5
0b592e2
ee970d1
58191a3
67b268a
0d9133f
ec6554f
a25e4be
5724771
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should safety be the default here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The priority was to be consistent with how the std operations work. This implementation might panic. There are saturating/checked ones that don't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As updated in the sheet, weight scale is now
[10, 1_000_00]
and the weight-to-fee factor10^6
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1_000_000 seems small for a block. why not make it 1_000_000_000 per block to allow more fine-grained transaction weighting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this also came hand in hand with the fact that a fixed multiplier of 1000 was removed from weights. So the limit hasn't actually changed at all.
Could easily be reverted, yet, my arguments being:
weight = 10, weight = 50, weight = 100
rather than a stack of zeros attached to all of them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kianenigma what about using powers of 2 instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not enough.
Not a good enough reason, since this is actually important logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not enough.
Not a good enough reason, since this is actually important logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, Po2 not a good idea here. weights are meant to be vaguely human-comprehensible, not things that are stored in memory or otherwise benefit from Po2 sizes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted to a scale of
1_000_000_000