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

F/btc-lc feature #100

Closed
wants to merge 5 commits into from
Closed

F/btc-lc feature #100

wants to merge 5 commits into from

Conversation

maurolacy
Copy link
Collaborator

@maurolacy maurolacy commented Dec 16, 2024

Introduce a btc-lc feature flag, to remove BTC light client functionality from the Babylon contract.

babylon-contract has reached the wasm size limit (800KB), and to continue introducing features we must either move functionality to another contract, or reduce its size by removing features.

Here we do the second approach, which can in any case serve as a step towards the first one.

@SebastianElvis
Copy link
Member

Since we need to split BTC light client into another contract (#53), wdyt we go straight to that? Maintaining such a new feature would be very challenging and at the end of the day we will be removing this feature.

@maurolacy
Copy link
Collaborator Author

maurolacy commented Dec 18, 2024

May be. I did this to continue working on the rewards distribution feature, as the size limit was blocking me.

I would say let's merge this to unblock stuff, and work on the btc-lc contract ASAP.

Another option could be to leave this on a branch. But, rewards distribution requires this, so not sure about it.

@maurolacy
Copy link
Collaborator Author

In any case, we can merge this and then revert the entire squashed commit when working on the btc-lc contract.

@SebastianElvis
Copy link
Member

I would say let's merge this to unblock stuff, and work on the btc-lc contract ASAP.

To unblock can we temporarily enlarge the size limit of wasm contract? This seems cleaner

@maurolacy
Copy link
Collaborator Author

It seems, but I'm afraid it would involve changing the wasmd source code, i.e. we cannot directly use the binary artefact anymore.

I'll take a look.

@SebastianElvis
Copy link
Member

It seems, but I'm afraid it would involve changing the wasmd source code, i.e. we cannot directly use the binary artefact anymore.

I'll take a look.

Not really, we did this once in Babylon SDK actually by setting some public variables.

@SebastianElvis
Copy link
Member

Found it, you can set https://github.com/CosmWasm/wasmd/blob/c2b31e0bc0f4c1286ce2431553bd8cf0a66774db/x/wasm/types/validation.go#L24-L25 to something larger when initialising bcd app (as big as 3MB iirc)

@maurolacy
Copy link
Collaborator Author

You're right, I was confused between wasmd and wasmvm. Thanks.

@maurolacy maurolacy closed this Dec 18, 2024
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.

2 participants