#idea?: Start RPC via soroban-cli

13 messages · Page 1 of 1 (latest)

agile juniper
#

Do you think it would be an idea to start the docker container via the cli? So instead of having to execute this

docker run --rm -it \
    -p "8000:8000" \
    --name stellar \
    stellar/quickstart:soroban-dev \
    --futurenet \
    --enable-soroban-rpc

we should be able to do something like

soroban serve sandbox
soroban serve futurenet
soroban serve public

Would this be an idea?

#

Just had to dig again on how to start the RPC server to connect with the futurenet. Would be nice to be able to do this from the cli tool.

sage pewter
#

I feel in order to do that you will also need to allow users to customize the ports, urls, name and more values of the container which at that point I feel we end up in the same place... but it could be something good

wicked meteor
#

well.. soroban cli = Rust, and the RPC is built in Go. If you are going to embed the RPC in the CLI (which makes no sense to me, SoC) then you're gonna have a problem.

#

I don't think the CLI is meant to be a supertool (or an admin tool for that matter)? unless the complete CLI is rewritten to be completely modular/component-based and perhaps even allowing loading modules as .wasm components.
@unique vigil @opaque sun ?

#

RPC as wasm component? we may be going way over experimental and I think the whole point right now is to have a stable Soroban 1.0 (including infrastructure)
@errant plaza ?

unique vigil
#

It'd be more than just the rpc, you need stellar-core also or maybe captive-core at a minimum?

sage pewter
#

He's just proposing a shortcut to trigger the docker containers easily (basically a map of common shell commands inside the CLI itself)... Not merging all of that into the CLI

unique vigil
#

ah okay that's nice idea I love the idea of being able to access everything you need from one util. would need to deal with cases where no docker but i think it's smart, I agree about taking the custom variables, but have defaults too so it just works too

wicked meteor
unique vigil
#

why not? std::process::command

ionic ridge
#

Yeah, we initially looked at writing soroban-rpc in Rust for this reason (so it could be embedded in soroban-cli). But using go let us re-use a bunch of code from horizon (to manage captive-core), so was the faster option.

#

But I'm definitely not opposed to launching the docker container from soroban-cli. Just not a top priority work-wise at the moment.