polkadot icon indicating copy to clipboard operation
polkadot copied to clipboard

feature request: support import-blocks and export-blocks capabilities via RPC

Open onejoelman opened this issue 3 years ago • 6 comments

Polkadot binary offers a feature of exporting blocks in binary and json formats, as well as importing them afterwards. Please port this feature to the official RPC (preferably both JSON-RPC and WS) api, enabling remote block submitting (like bitcoin has)

Right now, I'm using a patch, running a bash command via ssh to do the following:

  • shutdown polkadot instance
  • call polkadot cli export blocks to temp file (polkadot export-blocks --from ${from} --to ${to} --binary /temp/file)
  • stream the file
  • delete the file
  • re-launch polkadot instance

This seems to me a bit of a hack, and I'd be very happy if you could look into this feature.

Many thanks! Joel

onejoelman avatar Jun 09 '22 11:06 onejoelman

For what you need this feature?

bkchr avatar Jun 09 '22 11:06 bkchr

maintaining an offline network

onejoelman avatar Jun 09 '22 12:06 onejoelman

What is an offline network?

bkchr avatar Jun 13 '22 12:06 bkchr

a bunch of computers that aren't connected to the internet, but connected within themselves (intra-net)

onejoelman avatar Jul 24 '22 12:07 onejoelman

Sounds to me like a very niche use case.

bkchr avatar Jul 24 '22 20:07 bkchr

still, it's already partially implemented

onejoelman avatar Jul 26 '22 16:07 onejoelman