Skip to content

Conversation

@MSilb7
Copy link
Member

@MSilb7 MSilb7 commented Feb 14, 2024

@sebastianst
Copy link
Member

@MSilb7 given our recent discussions about this, is this PR still relevant?

@tynes
Copy link
Contributor

tynes commented Aug 1, 2024

cc @MSilb7 @sebastianst should we still consider this PR?


Conceptually what the above function captures is the formula below, where `compressedTxSize =
(zeroes*4 + ones*16) / 16` can be thought of as a rough approximation of how many bytes the
(zeroes*4 + ones*16 + 68*16) / 16` can be thought of as a rough approximation of how many bytes the
Copy link
Member

Choose a reason for hiding this comment

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

where did 68 come from? seems like magic number

Copy link
Member

Choose a reason for hiding this comment

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

I think that's an estimate of the overhead data of a tx, mostly coming from its signature?

Copy link
Contributor

Choose a reason for hiding this comment

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

In some places the 68 is hardcoded, to estimate cost before signing. But after the tx has been signed and encoded there's no need to add the 68. So it completely depends on context whether or not it's a necessary addition.

@emhane
Copy link
Member

emhane commented Apr 24, 2025

@emhane emhane added C-debt Category: debt U-smart-contract Upgrade: involving changes to smart contracts labels Apr 24, 2025
@sebastianst sebastianst removed the request for review from trianglesphere April 24, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-debt Category: debt U-smart-contract Upgrade: involving changes to smart contracts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants