Reduce startup time in local network mode
What problem does your feature solve?
The image is used for local testing and CI testing. The startup time directly impacts a developers ability to get started, and for CI directly impacts build times.
What would you like to see?
Faster image start to the point where an account can be funded via friendbot.
What alternatives are there?
Do nothing.
cc @stellar/devx
On my own system it takes about 28 seconds to get a successful response from friendbot.
From the logs below, looks like friendbot spends about 7 seconds waiting for Horizon to start after it's told to start.
Startup time can vary, I just got 20 seconds total, RPC was ready after 16 seconds, friendbot was ready 5 seconds after that.
root@7fc53fb4b1a0:/var/log/supervisor# cat friendbot-stdout---supervisor-e5c1k4o1.log
false
Waiting for horizon to be available...
false
Waiting for horizon to be available...
false
Waiting for horizon to be available...
false
Waiting for horizon to be available...
false
Waiting for horizon to be available...
true
starting friendbot...
2025/04/10 05:00:38 Found all valid params, now creating 10 minions
time="2025-04-10T05:00:38.044Z" level=error msg="creating minion accounts: refreshing bot seqnum: getting account detail: horizon error: \"Still Ingesting\" - check horizon.Error.Problem for more information" pid=579
true
starting friendbot...
2025/04/10 05:00:38 Found all valid params, now creating 10 minions
2025/04/10 05:00:38 Creating 10 new minion accounts
2025/04/10 05:00:38 Submitted create accounts tx for 10 minions successfully
2025/04/10 05:00:38 Adding 10 minions to friendbot
time="2025-04-10T05:00:38.967Z" level=info msg="starting friendbot server - devel" pid=885
time="2025-04-10T05:00:38.967Z" level=info msg="listening on 0.0.0.0:8002" pid=885
I believe re-writing Friendbot to use RPC will achieve this goal passively. We won't need to run Horizon anymore for a lot of scenarios as well
Switching Friendbot to RPC would shave possibly 5 seconds based on the above test. I wonder if there's a way we can get an order of magnitude improvement. For example, if there's a way to get 30 seconds to 5 seconds.
This issue is stale because it has been open for 90 days with no activity.
This issue is stale because it has been open for 90 days with no activity.
Switching Friendbot to RPC
this would be great, created https://github.com/stellar/quickstart/issues/791 to track
Switching Friendbot to RPC
Being tracked here:
- https://github.com/stellar/friendbot/issues/5