Skip to content
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 increased ~ 40KB after PR #28 #34

Closed
Flouse opened this issue Jan 8, 2024 · 4 comments
Closed

contract size increased ~ 40KB after PR #28 #34

Flouse opened this issue Jan 8, 2024 · 4 comments
Labels
enhancement Optimization

Comments

@Flouse
Copy link
Contributor

Flouse commented Jan 8, 2024

Description

After PR #28, the contract size has increased by ~40K.

ls build/release/ -lh

total 644K
-rwxr-xr-x 1 ubuntu docker  70K Jan  8 08:07 cluster
-rwxr-xr-x 1 ubuntu docker  82K Jan  8 08:08 cluster_agent
-rwxr-xr-x 1 ubuntu docker  68K Jan  8 08:07 cluster_proxy
-rw-r--r-- 1 ubuntu docker 262K Jan  8 08:07 libckblua.so
-rwxr-xr-x 1 ubuntu docker 110K Jan  8 08:08 spore
-rwxr-xr-x 1 ubuntu docker  41K Jan  8 08:07 spore_extension_lua

This might be a Low-Priority issue.

It may impact the Stage 1 deployment plan listed in https://dao.ckb.community/thread/vot-spore-protocol-mainnet-launch-sponsorship-proposal-48305

Stage 1:

Spore   (73,342 CKBytes)
Cluster (37,150 CKBytes)
@ashuralyk
Copy link
Contributor

good point, I guess co-build crate can introduce minimal features to meet the minimal demand from contract

@ashuralyk ashuralyk added the enhancement Optimization label Jan 11, 2024
@ashuralyk
Copy link
Contributor

@quake please mark this issue for our further optimization on co-build-transaction crate

@quake
Copy link
Collaborator

quake commented Jan 12, 2024

please change lto from false to true and see if we can get a smaller binary or not.

- lto = false
+ lto = true

@ashuralyk
Copy link
Contributor

please change lto from false to true and see if we can get a smaller binary or not.

- lto = false
+ lto = true

result is cool @Flouse

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Optimization
Projects
None yet
Development

No branches or pull requests

3 participants