solana-labs / solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://solanalabs.com
Apache License 2.0
13.02k stars 4.19k forks source link

Re-enable move support by default in release binaries #6578

Closed mvines closed 4 years ago

mvines commented 4 years ago

The move loader is currently hidden behind the move cargo feature and is not available in release binaries or testnets.

scripts/cargo-install-all.sh should be updated to additionally package the move loader, but ideally in a way that both:

  1. removes the move cargo feature, and
  2. avoids the need to build move by default during development
mvines commented 4 years ago

The main bottleneck seems to be the move feature in genesis_programs/, here: https://github.com/solana-labs/solana/blob/243fa6cf6387de8f5be3243765a6b8a58196d425/genesis_programs/src/lib.rs#L14

If we moved solana_move_loader_program definition from programs/move_loader_program/src/lib.rs to sdk/src/move_loader_program.rs then that unlocks building the move loader .so from cargo-install-all.sh, and the only remaining move featurization is in bench-tps/ and local_cluster/ (which seems tolerable for now)

jackcmay commented 4 years ago

@mvines, @sakridge What was the original goal of featurizing move? Local development build times?

@mvines If we move move_loader_program to the SDK doesn't that now create a direct dependency of the SDK on move_loader_api and thus always build the Move stuff?

mvines commented 4 years ago

Na. eg, https://github.com/solana-labs/solana/blob/master/sdk/src/system_program.rs

jackcmay commented 4 years ago

That form is made possible by this: https://github.com/solana-labs/solana/blob/243fa6cf6387de8f5be3243765a6b8a58196d425/runtime/src/message_processor.rs#L192

mvines commented 4 years ago

Other examples!

jackcmay commented 4 years ago

Those two examples aren't really apples to apples since the program macro and thus the genesis dependency is defined in /programs/....

As for Move, I was thinking that you were suggesting to move programs/move_loader_program. If I understand now, you are suggesting of just moving the macro solana_move_loader_program out of programs/move_loader_program/src/lib.rs and programs/move_loader_api/src/lib.rs into sdk/src/move_loader.rs while leaving programs/move_loder_program as the dynamic lib dependency.

mvines commented 4 years ago

Yes that's right. Sorry for not being clear