trueblocks-explorer
trueblocks-explorer copied to clipboard
Page never loads
I followed the installation instructions located here https://chasewright.com/getting-started-with-trueblocks/ and appear to have a working chifra server. I can query the API and everything appears to be working as expected.
I then installed trueblocks-explorer and updated the .env file. I can things like aliased addresses to list, but no luck on actually populating the data associated with those aliases.
Charts, history, events etc never load. The only thing that updates is 0 records on mainnet
will change to x records on mainnet
I have queried the chifra api for an address I know has only 1 transaction and I can see the block number and transaction index so I assume chifra is working.
Thanks for reporting this. I'd really like to be helpful to you.
First question: when you say you followed Chase's instructions, does that mean you're running the docker version that used to be found in the trueblock-core
repo?
If yes, please note that in the most recent release that Dockerfile has been removed.
The "official" docker version is in a repo called trueblocks-docker
.
I quoted "official" because it's not yet supported officially, but this is where the docker version will come from.
In the very near future, we will be updating the docker repo, and once we do that, please re-connect with us in Discord. We'll be able to better help you out.
In the meantime, you should be able to run chifra serve
in a separate window and serve the Explorer app. Can you try that, and report back here?
I tried to install chifra directly on the VM and had issues (from the official documentation). None of the chifra commands worked. From my understanding, the OS was looking in trueblocks-core/bin/ for a chifra binary but my install created a chifra directory. I couldn't figure out how to resolve the issue so I tried using docker according to Chase's instructions.
I tried the official trueblocks docker repo and it didn't work, but I was able to go back a couple commits and find the following Dockerfile:
# Build trueblocks-core in stock Go builder container
FROM golang:1.18-alpine as builder
# Install additional build depenedencies
RUN apk --no-cache add g++ gcc make cmake git nano libcurl python3 python3-dev \
curl bash curl-dev linux-headers sqlite-dev
# Add source to container
ADD . /trueblocks-core
# Build trueblocks-core
# make -j <cpu_cores> (4+1 is a safe enough number)
RUN cd /trueblocks-core && mkdir build && cd build && cmake ../src && make -j 5
# Switch to an alpine container
FROM alpine:latest
# Install binary dependencies and nice to haves
RUN apk --no-cache add ca-certificates gzip libstdc++ libgcc libcurl python3 python3-dev procps bash curl nano
# Copy files from builder
COPY --from=builder /trueblocks-core/bin /usr/local/bin
COPY --from=builder /root/.local/bin/chifra /root/.local/bin/chifra
COPY --from=builder /root/.local/share/trueblocks /root/.local/share/trueblocks
# If no command is provided return help
CMD ["chifra", "--help"]
From there, I can run commands using docker run -v /data/volumes/trueblocks/trueBlocks.toml:/root/.local/share/trueblocks/trueBlocks.toml -v /data/volumes/trueblocks/cache:/root/.local/share/trueblocks/cache -v /data/volumes/trueblocks/unchained:/root/.local/share/trueblocks/unchained trueblocks-core:develop chifra list 0x0000000000085d4780b73119b644ae5ecd22b376
to list an address, or access the api via http://192.168.40.29:8080/list?addrs=0x0000000000085d4780b73119b644ae5ecd22b376
both of which are slow, but functional. (as far as I can tell)
My docker-compose file looks like this
version: '3.4'
services:
trueblocks-serve:
container_name: trueblocks-serve
image: trueblocks-core:develop
# build: ./github/trueblocks-core
restart: unless-stopped
volumes:
- /data/volumes/trueblocks/trueBlocks.toml:/root/.local/share/trueblocks/trueBlocks.toml
- /data/volumes/trueblocks/cache:/root/.local/share/trueblocks/cache
- /data/volumes/trueblocks/unchained:/root/.local/share/trueblocks/unchained
command:
- chifra
- serve
- --port=:8080
ports:
- "8080:8080"
trueblocks-scrape:
container_name: trueblocks-scrape
image: trueblocks-core:develop
build: ./github/trueblocks-core
restart: unless-stopped
volumes:
- /data/volumes/trueblocks/trueBlocks.toml:/root/.local/share/trueblocks/trueBlocks.toml
- /data/volumes/trueblocks/cache:/root/.local/share/trueblocks/cache
- /data/volumes/trueblocks/unchained:/root/.local/share/trueblocks/unchained
command:
- chifra
- scrape
- indexer
- --action=run
- --sleep=12
What information can I gather about my configuration to assist in troubleshooting? My instincts are that trueblocks is under fairly heavy development ATM so we probably have a version mismatch.
I notice that the explorer UI looks much more modern than the pictures I see online. Are there people that have the new version working?
You said, "I tried to install chifra directly on the VM and had issues (from the official documentation). None of the chifra commands worked. From my understanding, the OS was looking in trueblocks-core/bin/ for a chifra binary but my install created a chifra directory. I couldn't figure out how to resolve the issue so I tried using docker according to Chase's instructions."
Did you add to your shell's $PATH?
What information can I gather about my configuration to assist in troubleshooting? My instincts are that trueblocks is under fairly heavy development ATM so we probably have a version mismatch.
I notice that the explorer UI looks much more modern than the pictures I see online. Are there people that have the new version working?
All of the software (trueblocks-docker, trueblocks-dappnode, and trueblocks-explorer) are pretty much "pre-alpha," which means they "sort of work, but have problems."
trueblocks-core is beta, which means (at least to me) that it getting near to being feature complete but is not yet production ready.
I don't expect that most people are using the Explorer. I expect most people are using TrueBlocks for data science like tasks on the command line.
I tried to install chifra directly on the VM and had issues (from the official documentation). None of the chifra commands worked. From my understanding, the OS was looking in trueblocks-core/bin/ for a chifra binary but my install created a chifra directory. I couldn't figure out how to resolve the issue so I tried using docker according to Chase's instructions.
I tried the official trueblocks docker repo and it didn't work, but I was able to go back a couple commits and find the following Dockerfile:
# Build trueblocks-core in stock Go builder container FROM golang:1.18-alpine as builder # Install additional build depenedencies RUN apk --no-cache add g++ gcc make cmake git nano libcurl python3 python3-dev \ curl bash curl-dev linux-headers sqlite-dev # Add source to container ADD . /trueblocks-core # Build trueblocks-core # make -j <cpu_cores> (4+1 is a safe enough number) RUN cd /trueblocks-core && mkdir build && cd build && cmake ../src && make -j 5 # Switch to an alpine container FROM alpine:latest # Install binary dependencies and nice to haves RUN apk --no-cache add ca-certificates gzip libstdc++ libgcc libcurl python3 python3-dev procps bash curl nano # Copy files from builder COPY --from=builder /trueblocks-core/bin /usr/local/bin COPY --from=builder /root/.local/bin/chifra /root/.local/bin/chifra COPY --from=builder /root/.local/share/trueblocks /root/.local/share/trueblocks # If no command is provided return help CMD ["chifra", "--help"]
From there, I can run commands using
docker run -v /data/volumes/trueblocks/trueBlocks.toml:/root/.local/share/trueblocks/trueBlocks.toml -v /data/volumes/trueblocks/cache:/root/.local/share/trueblocks/cache -v /data/volumes/trueblocks/unchained:/root/.local/share/trueblocks/unchained trueblocks-core:develop chifra list 0x0000000000085d4780b73119b644ae5ecd22b376
to list an address, or access the api viahttp://192.168.40.29:8080/list?addrs=0x0000000000085d4780b73119b644ae5ecd22b376
both of which are slow, but functional. (as far as I can tell)My docker-compose file looks like this
version: '3.4' services: trueblocks-serve: container_name: trueblocks-serve image: trueblocks-core:develop # build: ./github/trueblocks-core restart: unless-stopped volumes: - /data/volumes/trueblocks/trueBlocks.toml:/root/.local/share/trueblocks/trueBlocks.toml - /data/volumes/trueblocks/cache:/root/.local/share/trueblocks/cache - /data/volumes/trueblocks/unchained:/root/.local/share/trueblocks/unchained command: - chifra - serve - --port=:8080 ports: - "8080:8080" trueblocks-scrape: container_name: trueblocks-scrape image: trueblocks-core:develop build: ./github/trueblocks-core restart: unless-stopped volumes: - /data/volumes/trueblocks/trueBlocks.toml:/root/.local/share/trueblocks/trueBlocks.toml - /data/volumes/trueblocks/cache:/root/.local/share/trueblocks/cache - /data/volumes/trueblocks/unchained:/root/.local/share/trueblocks/unchained command: - chifra - scrape - indexer - --action=run - --sleep=12
The docker file you mention here has been retired. The "official" docker image is in the trueblocks-core
repo.
Did you add to your shell's $PATH?
Yup. I was greeted with errors saying that my terminal had no idea what the chifra command was. If you think this is where my problem lies, I will happily try troubleshooting, although I would expect that the API returning JSON through docker would be good enough.
I don't expect that most people are using the Explorer. I expect most people are using TrueBlocks for data science like tasks on the command line.
This is my assumption too.
The docker file you mention here has been retired. The "official" docker image is in the trueblocks-core repo.
To be clear, the chifra inside the docker container appears to be working. I can run commands that will list transactions in JSON. If I had to place a guess, it wouldn't surprise me to find out that the JSON has a different structure between the dockerfile I am currently using and the structure explorer is expecting. That is just a shot in the dark though.
Yup. I was greeted with errors saying that my terminal had no idea what the chifra command was. If you think this is where my problem lies, I will happily try troubleshooting, although I would expect that the API returning JSON through docker would be good enough.
When you type:
env | grep PATH | tr ':' '\n' | grep trueblocks
What does it say?
To be clear, the chifra inside the docker container appears to be working. I can run commands that will list transactions in JSON. If I had to place a guess, it wouldn't surprise me to find out that the JSON has a different structure between the dockerfile I am currently using and the structure explorer is expecting. That is just a shot in the dark though.
Highly likely.
When you type:
env | grep PATH | tr ':' '\n' | grep trueblocks What does it say?
From inside the container I get no response. From ouside the container I get this PATH=/root/trueblocks-core/bin
Highly likely.
Is there a known working combination of versions? I can happily update/regress components for testing.
Found something interesting. Chifra is on version chifra version GHC-TrueBlocks//0.40.2-beta
but explorer is on v0.37.1-beta-1-g2ea9d92
I am going to try to update both to [v0.41.0-beta](https://github.com/TrueBlocks/trueblocks-core/releases/tag/v0.41.0-beta)
Are you on the explorer's master
branch? Maybe that's the problem. I think we updated the develop
branch, but I may have forgotten to merge develop
into master
. Let me know if that works, and I'll push a change.
Umm, I may have a mixture of the two. Would you like me to fully move to the develop branch or the master branch?
We're trying to get to the place where master
is always the best code, but I guess we're not quite there.
For now, I think the develop
branch on all of our repos is the "best code yet," so, yes. Move all your repos to develop
.
Please let me know how that works, and thanks for your continued patience.
The explorer repo has been closed, but we're still working on apps. More later on our blog.