I need to only keep
state for the last few blocks, but I don't want to wait for the full sync of the node, is there a way to do that faster than by using
--sync=full? Because it seems like all the current modes either download the
full history or just the latest state.
If you want a faster sync you can use the flag
--sync <SYNC_MODE> Blockchain syncing mode. - `full`: Download and validate full blockchain history. - `fast`: Download blocks and the latest state only. - `fast-unsafe`: Same as `fast`, but skip downloading state proofs. - `warp`: Download the latest state and proof.
More information about why is faster: Is GRANDPA warp sync the recommended method for syncing a node? and in the Polkadot Protocol Specification.