-
Notifications
You must be signed in to change notification settings - Fork 13
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
Contract size optimization #99
Comments
hashmesan
pushed a commit
to hashmesan/onebtc
that referenced
this issue
Apr 20, 2022
hashmesan
pushed a commit
to hashmesan/onebtc
that referenced
this issue
Apr 25, 2022
hashmesan
pushed a commit
to hashmesan/onebtc
that referenced
this issue
Apr 25, 2022
hashmesan
pushed a commit
to hashmesan/onebtc
that referenced
this issue
Apr 25, 2022
hashmesan
pushed a commit
to hashmesan/onebtc
that referenced
this issue
Apr 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OneBTC contract size is currently over the 24KB limit. There are a couple strategies to reducing the size.
Current change
The least disruptive method, without changing the architecture significantly is moving any shared library (static linked) into dynamically linked libraries.
In hashmesan@8f0ec01 , the
SecP256K1Lib
andTXValidate
libraries were identified to convert to linked library.internal
toexternal
As per warning
We must be cautious of using any shared datastructure that might change in the upgraded library OR interfaces change that may break the dependencies. We can always deploy brand new library every time which avoid this issue altogether.
Future change
Later on if we hit the 24k again, we may have to separate
Issue
,Redeem
, andReplace
as libraries and isolate storage intoOneBTC
. This is a huge architecture change we need to avoid as much as we can.The text was updated successfully, but these errors were encountered: