HerodotusDev / hdp

Enable smart contracts to perform compute over arbitrary on-chain data in a verifiable manner
https://docs.herodotus.dev/herodotus-docs/developers/herodotus-data-processor-hdp
GNU General Public License v3.0
29 stars 4 forks source link

make cli great again #112

Closed rkdud007 closed 3 months ago

rkdud007 commented 4 months ago

Note: this is bit tricky problem love to hear more feedback

trying to find sweet spot of "try not to introduce breaking change too much" vs "have more intuitive cli with v2 <> v1 generalization".

And also try to remove unnecessary serde/deserde and commands

Background

This is the cases where we use hdp most often:

  1. hdp-test : pass 1 raw task-> preprocess
  2. hdp-server(onchain) : pass N encoded tasks -> preprocess -> process
  3. later : pass N tasks input.json -> process

we will have 4 command

hdp encode --request-query {FILE_PATH} --encoded-query {FILE_PATH}
hdp decode --encoded-query {FILE_PATH}  --request-query {FILE_PATH}

and run command will support 2 type, each can be either by calling encoded request or raw request

hdp run-datalake --encoded-datalakes {BYTES} --encoded-tasks {BYTES} ... some etc arguments  
hdp run-module  --encoded-modules {BYTES} ... some etc arguments 

and raw server request

hdp run --request-query {FILE_PATH}
rkdud007 commented 3 months ago

close with #115