App Submission: Fulcrum
App Submission
App name
Fulcrum
Closes #613, also possibly resolves #134
For those who want to try it now, Fulcrum is also available on my personal app store
256x256 SVG icon
https://svgshare.com/i/1Acv.svg
Gallery images
1.jpg:
2.jpg:
3.jpg:
4.jpg:
I have tested my app on:
- [ ] umbrelOS on a Raspberry Pi
- [ ] umbrelOS on an Umbrel Home
- [x] umbrelOS on Linux VM
Regarding app IPs in exports.sh, is there any logic to set the IPs ?
Currently I have just selected them randomly so as to not conflict with existing Electrs.
Thanks for submitting Fulcrum @sahilph!
We've got our heads down on some other aspects of the codebase, but we have this on our radar and will get to it soon.
One quick thought (as a reminder to myself when I come back to this) is that since this is essentially a drop-in replacement for Electrs, we may want to wait until we've implemented a way to choose which app you want to use for a certain protocol (e.g., the electrum protocol). This is on our roadmap. This would allow users to switch to whatever Electrum implementation they want and have it work with all their other bitcoin ecosystem apps that rely on Electrum.
Right now, if we bring Fulcrum to the app store, apps like Mempool, BTC RPC Explorer, etc. that depend on an electrum server would not be able to use Fulcrum. Maybe this is okay for now.
apps like Mempool, BTC RPC Explorer, etc. that depend on an electrum server would not be able to use Fulcrum.. Maybe this is okay for now.
@nmfretz Yes, right. Initially I had set the export variables names to be same as that of Electrs, so that they will be able to use Fulcrum directly, but then I saw the Bitcoin Knots Submission #953, and changed the variables names and also added a note that Fulcrum will be integrated later on, very similar to how it was done for Knots.
Thanks for your patience @sahilph 🙏
@nmfretz Yes, right. Initially I had set the export variables names to be same as that of Electrs, so that they will be able to use Fulcrum directly, but then I saw the Bitcoin Knots Submission https://github.com/getumbrel/umbrel-apps/pull/953, and changed the variables names and also added a note that Fulcrum will be integrated later on, very similar to how it was done for Knots.
Perfect, really nice work digging in and implementing this. Let's get this shipped then as-is, and in a future umbrelOS update where the apps framework is upgraded (hopefully quite soon) Fulcrum will become hot-swappable with Electrs such that it can be used by apps like mempool, etc.
I am currently testing Fulcrum now. Is the UI working for you?
Fulcrum is currently building the index:
$ sudo docker logs fulcrum_fulcrum_1 -n 3
[2024-10-24 11:05:25.627] <Controller> Processed height: 406000, 46.8%, 3.27 blocks/sec, 4466.2 txs/sec, 17017.3 addrs/sec
[2024-10-24 11:08:44.605] <Controller> Processed height: 407000, 46.9%, 5.03 blocks/sec, 7069.9 txs/sec, 24965.1 addrs/sec
[2024-10-24 11:14:04.246] <Controller> Processed height: 408000, 47.1%, 3.13 blocks/sec, 4383.5 txs/sec, 15625.9 addrs/sec
But the UI is showing:
And is erroring with:
$ sudo docker logs fulcrum_app_1 -n 12
umbrel-middleware
syncPercent error: Error: connect ECONNREFUSED 10.21.21.200:50002
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '10.21.21.200',
port: 50002
}
::ffff:10.21.0.8 - - [Thu, 24 Oct 2024 11:18:39 GMT] "GET /v1/fulcrum/syncPercent HTTP/1.1" 500 94 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
So for some reason fulcrum is refusing connections on port 50002.
Perfect, really nice work digging in and implementing this.
Thank you !
Let's get this shipped then as-is, and in a future umbrelOS update where the apps framework is upgraded (hopefully quite soon) Fulcrum will become hot-swappable with Electrs such that it can be used by apps like mempool, etc.
Awesome. Hot Swapping will be great.
I am currently testing Fulcrum now. Is the UI working for you? ... And is erroring with: ... So for some reason fulcrum is refusing connections on port 50002.
Oh yes, I had noticed the errors too during the index building. It keeps on giving those errors. It turns out that, Fulcrum must first fully index the blockchain and compact its database before you can connect to it.
Oh yes, I had noticed the errors too during the index building. It keeps on giving those errors. It turns out that, Fulcrum must first fully index the blockchain and compact its database before you can connect to it.
Ah, ya I see. I don't want to overstep my role here, since I'm really just making sure that the app is packaged correctly for the umbrelOS app store, but could I suggest that the UI be tweaked slightly to avoid user's getting confused? Right now the user will see Waiting for Bitcoin Node to finish syncing... for the entire time that Fulcrum is building the index which could take a very long time (e.g., I'm about 60% in at 24 hours on an 8GB Pi 5).
I'm thinking that user's are going to see this message, notice that their Bitcoin Node is already synced, and think that something is wrong. They have no feedback on what is actually happening behind the scenes.
What if you just simplify that component to show something like Fulcrum is currently indexing... when the UI can't connect? A little hacky, but it's a simple change that will probably prevent you from being spammed with support queries.
e.g.:
Right now the user will see
Waiting for Bitcoin Node to finish syncing...
I took the existing umbrel's Electrs app as the base and made some changes to it for Fulcrum.. and that's what it says when it cant connect to Electrs (Yeah, strange !) But it quickly goes aways as Electrs accepts connections even during the initial building..
I'm thinking that user's are going to see this message, notice that their Bitcoin Node is already synced, and think that something is wrong. They have no feedback on what is actually happening behind the scenes.
Oh, I didn't think from that perspective..
What if you just simplify that component to show something like
Fulcrum is currently indexing... when the UI can't connect? A little hacky, but it's a simple change that will probably prevent you from being spammed with support queries.
Yes that sounds good, I will make that change to the frontend and then reply back..
@nmfretz I have updated the docker image which contains the new wording for the wait message. Please check.
Excellent, thanks for changing that @sahilph. I have pushed a few changes to finalize this submission https://github.com/sahilph/umbrel-apps/compare/09fdef50d7e69ccd21c5b9b1a20856379c4e92e4...9dee7d6d3595cf42345d1a878851fd1cd38b080f
I have tested, and it is working well for me. I have also tested successfully connecting sparrow wallet:
The icon and gallery images now live here: https://github.com/getumbrel/umbrel-apps-gallery/tree/master/fulcrum
We updated the background of the gallery images to complement the fulcrum logo:
Thanks again for all your work bringing Fulcrum to the official app store!
Awesome Thanks. 👍
You guys are awesome! Thx
Thanks for your patience @sahilph 🙏
@nmfretz Yes, right. Initially I had set the export variables names to be same as that of Electrs, so that they will be able to use Fulcrum directly, but then I saw the Bitcoin Knots Submission #953, and changed the variables names and also added a note that Fulcrum will be integrated later on, very similar to how it was done for Knots.
Perfect, really nice work digging in and implementing this. Let's get this shipped then as-is, and in a future umbrelOS update where the apps framework is upgraded (hopefully quite soon) Fulcrum will become hot-swappable with Electrs such that it can be used by apps like mempool, etc.
I am currently testing Fulcrum now. Is the UI working for you?
Fulcrum is currently building the index:
$ sudo docker logs fulcrum_fulcrum_1 -n 3 [2024-10-24 11:05:25.627] <Controller> Processed height: 406000, 46.8%, 3.27 blocks/sec, 4466.2 txs/sec, 17017.3 addrs/sec [2024-10-24 11:08:44.605] <Controller> Processed height: 407000, 46.9%, 5.03 blocks/sec, 7069.9 txs/sec, 24965.1 addrs/sec [2024-10-24 11:14:04.246] <Controller> Processed height: 408000, 47.1%, 3.13 blocks/sec, 4383.5 txs/sec, 15625.9 addrs/secBut the UI is showing:
And is erroring with:
$ sudo docker logs fulcrum_app_1 -n 12 umbrel-middleware syncPercent error: Error: connect ECONNREFUSED 10.21.21.200:50002 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '10.21.21.200', port: 50002 } ::ffff:10.21.0.8 - - [Thu, 24 Oct 2024 11:18:39 GMT] "GET /v1/fulcrum/syncPercent HTTP/1.1" 500 94 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"So for some reason fulcrum is refusing connections on port 50002.
Hi, I installed Fulcrum app into my new umbrel box, and I was confused about the UI message as described here. I found that the "$sudo docker logs fulcrum_fulcrum_1" was displaying the correct output, but the fulcrum.js file was looking for that output in a volume /fulcrum-logs/fulcrum.log file, which did not exist. After some testing I found that docker-compose.yml had a:
command: Fulcrum _ENV_ 2>&1 | tee /fulcrum-logs/fulcrum.log
which did not redirect the output correctly, so I made 2 changes into the docker-compose.yml file to finally make it to work:
$ diff docker-compose.yml.orig docker-compose.yml
48,49c48,51
< - ${APP_DATA_DIR}/data/fulcrum-logs:/logs
< command: Fulcrum _ENV_ 2>&1 | tee /fulcrum-logs/fulcrum.log
> - ${APP_DATA_DIR}/data/fulcrum-logs:/fulcrum-logs
> command: bash -c "Fulcrum _ENV_ -D /data -c /data/fulcrum.crt -k /data/fulcrum.key 2>&1 | tee /fulcrum-logs/fulcrum.log"
With this I can see the index percent into the UI.
The main problem seem to be the "2>&1" out/err redirection of the original command, not being accepted by the docker, only if it goes inside a "bash -c " command it goes to the fulcrum.log file of the volume, and gets parsed by the fulcrum.js that updates the UI.
Thanks for the app.
Hey @rarigita nice troubleshooting! I ran across the same thing when updating the app the other day and fixed it https://github.com/getumbrel/umbrel-apps/pull/3699#issue-3463185606.
Looks like at some point the app was tweaked to use the Fulcrum _ENV_ 2>&1 | tee /fulcrum-logs/fulcrum.log command and it slipped by.
