Open jsdw opened 10 months ago
Option 3) is to extract the light-sync-state stuff to a separate binary such subxt-cli-lightclient
because it's
fundamentally different from the existing subxt-cli which is used to generate a subxt codegen from the metadata.
This is on the other hand is used to generate a chainspec.... by calling lightSyncState
and AFAIU is that the chainspec may be "outdated" more often then the metadata itself because some bootnodes disappears or something similar.
I think it would be neat to support everything in a single binary without feature flags... if the number of deps are not extreme
This non-default feature is used to provide an additional flag to let users prune the returned chainSpec. The reason that we have a feature here is because we have to pull in a number of additional dependencies in order to do this pruning (ie
smoldot
).One issue that Tadeo pointed out (https://github.com/paritytech/subxt/pull/1278#discussion_r1406345412) is that this feature flag suddenly means that different users can have different "variants" of the CLI tool.
I think there are a couple of options:
smoldot
is a part of the dependency tree anyway.With either of these, we could also try to reduce the number of dependencies needed for this chain spec trimming. Perhaps we can avoid needing to depend on so many things with a bit of work in Smoldot? This is orthoganol to 1 and 2 but makes them a little more appealing :)
I'm torn, but either 1 or 2 would suit me! What do you guys thing @tadeohepperle @lexnv @niklasad1?