You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Compute the state root hash from the genesis entry.# Enable this to create a smaller chain spec file.chain-spec-pruning = ["smoldot"]
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 (#1278 (comment)) 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:
Just remove the feature flag and suck up the extra dependencies. Primarily this will slow compile times a bit when building the CLI tool, but I hope wouldn't have much impact on the overall CI workflows since smoldot is a part of the dependency tree anyway.
Make the feature flag be enabled by default. This means that everybody will get all functionality by default, but if people have a specific reason to want to opt out of certain features, then there is a way to do so. This is different from having to tell people to enable specific functionality by using feature flags, and by default having a less capable CLI tool.
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 :)
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 (#1278 (comment)) 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?
The text was updated successfully, but these errors were encountered: