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

b3_wallet WASM too big #27

Closed
sadernalwis opened this issue Oct 3, 2023 · 9 comments
Closed

b3_wallet WASM too big #27

sadernalwis opened this issue Oct 3, 2023 · 9 comments

Comments

@sadernalwis
Copy link
Contributor

sadernalwis commented Oct 3, 2023

First of all, Amazing work by the looks of it.
But I cannot build still.

I ran
npm install --force to fix peerDepndency issue.

During,
npm run deploy
the following.

Optimizing wasm...
Before optimization: 5.8M
After optimization: 2.9M
After adding candid interface: 3.4M
~/Medusa/InternetComputer/PostMaster/canister/backend/src/B3
Executing 'scripts/build.sh b3_system b3_system'
   Compiling b3_system v0.0.0-alpha.0 (~/Medusa/InternetComputer/PostMaster/canister/backend/src/B3/backend/b3_system)
    Finished release [optimized] target(s) in 1.50s
Installing canisters...
Installing code for canister b3_system, with canister ID be2us-64aaa-aaaaa-qaabq-cai
Installing code for canister b3_wallet, with canister ID br5f7-7uaaa-aaaaa-qaaca-cai
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed while trying to install all canisters.
    Failed to install wasm module to canister 'b3_wallet'.
      Failed during wasm installation call: The replica returned an HTTP Error: Http Error: status 413 Payload Too Large, content type "text/plain", content: Request 0x70360068d7c9b246a0b6c7808fe4c0e177bda00db92ac638b7db8e753bc10615 is too large. Message byte size 3472488 is larger than the max allowed 2097152.

What would be a solution for this?

@b3hr4d b3hr4d transferred this issue from B3Pay/b3-note Oct 3, 2023
@b3hr4d
Copy link
Contributor

b3hr4d commented Oct 3, 2023

Hi, Are you trying to install the wallet on the mainnet?

@sadernalwis
Copy link
Contributor Author

Hi @b3hr4d ,

I'm trying to deploy on local net.
using dfx 0.14.3

@b3hr4d
Copy link
Contributor

b3hr4d commented Oct 3, 2023

I have to reproduce the installation process and fix some staff, after the latest release I didn't check everything, but the error you get should not happen locally, can you upgrade your dfx to 0.15 + and try again?

@sadernalwis
Copy link
Contributor Author

same error.
and also i encountered an intermediate error.
after:
npm run dfx:install --enable-bitcoin

> b3wallet@0.5.0 dfx:install
> scripts/install.sh

There is no project-specific network 'local' defined in ~/Medusa/InternetComputer/PostMaster/canister/backend/src/B3/dfx.json
Using shared network 'local' defined in ~/.config/dfx/networks.json
Found local replica running on port 42621
Checking out the environment...
Error: Failed to install NNS components.

Caused by:
    0: Failed to verify that the network is empty; dfx nns install must be run just after dfx start --clean
    1: The ID for the nns-registry canister has already been taken.
Error: Extension exited with non-zero status code '1'.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  526k  100  526k    0     0  1252k      0 --:--:-- --:--:-- --:--:-- 1251k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8923  100  8923    0     0  58033      0 --:--:-- --:--:-- --:--:-- 58320
Deploying: ckbtc
Creating canisters...
Creating canister ckbtc...
ckbtc canister created with canister id: mxzaz-hqaaa-aaaar-qaada-cai
Building canisters...

rest continues.

I tried dfx nns install must be run just after dfx start --clean --enable-bitcoin

network.json:

{
  "local": {
    "bind": "127.0.0.1:8080",
    "type": "ephemeral",
    "replica": {
      "subnet_type": "system"
    }
  }
}

@sadernalwis
Copy link
Contributor Author

phew.. finally was able to get a build. 👍
used yarn.
these are the changes I had to make.
I can make a PR if u like.

@b3hr4d
Copy link
Contributor

b3hr4d commented Oct 4, 2023

Nice job, Yes please I totally forgot to update scripts 😃

@sadernalwis
Copy link
Contributor Author

PR done.
Thanx alot again for the repo.
Also let me know where I can contribute.
I'd like to see B3 alive n well.

@b3hr4d
Copy link
Contributor

b3hr4d commented Oct 4, 2023

Thank you very much for your interest in contributing!
Currently, I'm actively working on an npm library called 're-actor,' which is intended to be a valuable tool for every Internet Computer developer working on the front-end.

Fixing and improving the setup process would be greatly appreciated at the moment, as I'm not very experienced with it myself. Your help in this area would make a significant difference. Also, if you're interested in using the B3Wallet, that's great to hear!

Also, feel free to explore the repository, and if you have any specific questions or areas where you'd like to contribute, please let me know. Your input can help ensure that B3Wallet remains alive and well. Thanks again for your interest and willingness to contribute!

@sadernalwis
Copy link
Contributor Author

sadernalwis commented Oct 4, 2023

  • Re-actor sounds very promising. specially valuable for prototyping I'd assume.
  • Ofcoz I'll checkout improving setup.
  • I will be using B3 with a VanillaJS setup. I have just started figuring out internals. I will update you as I go along and discover.

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

No branches or pull requests

2 participants