Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of block confirmations do not update if BTCEXP_NO_INMEMORY_RPC_CACHE is set to False #189

Open
stevenceasefire opened this issue Mar 6, 2020 · 1 comment
Labels

Comments

@stevenceasefire
Copy link

stevenceasefire commented Mar 6, 2020

I've noticed this behavior when running BTC-RPC-Explorer in regtest, I can't speak to whether it happens on main or testnet. The workaround is pretty simple, but figured I'd bring it up in case it's unintended behavior.

Once I visit a block page, the number of block confirmations it has will not update. For instance, if I look at block 113 for the first time since the server has been started and the latest block is 114, it will correctly show 2 confirmations. However, if I generate another X blocks and either refresh the block 113 page or close and revisit the block, it will still only show 2 confirmations. If I then open the block chain explorer on a completely different computer and visit block 113, it will still only show 2 confirmations. The accurate number of confirmations a block has is reflected if the server is restarted with BTCEXP_NO_INMEMORY_RPC_CACHE set to "true" in the .env file.

Environment (please complete the following information):
btc-rpc-explorer: 1.1.9
Bitcoin Core 0.19.0.1
ElectrumX: 1.14.0

Code Version / Commit [e.g. ab6cde8]
1bea8c2

Configuration file content
BTCEXP_HOST=0.0.0.0
BTCEXP_PORT=50200
BTCEXP_BITCOIND_URI=bitcoin://[]:[]@127.0.0.1:40310?timeout=10000
BTCEXP_ADDRESS_API=electrumx
BTCEXP_ELECTRUMX_SERVERS=tls://127.0.0.1:50100
BTCEXP_RPC_CONCURRENCY=100
BTCEXP_UI_SHOW_TOOLS_SUBHEADER=false

#BTCEXP_NO_INMEMORY_RPC_CACHE=true
#BTCEXP_REDIS_URL=redis://localhost:6379
#BTCEXP_COOKIE_SECRET=0000aaaafffffgggggg
#BTCEXP_DEMO=true
#BTCEXP_PRIVACY_MODE=true
#BTCEXP_NO_RATES=true
#BTCEXP_BASIC_AUTH_PASSWORD=mypassword
#BTCEXP_RPC_ALLOWALL=true
#BTCEXP_RPC_BLACKLIST=signrawtransaction,sendtoaddress,stop,...
#BTCEXP_GANALYTICS_TRACKING=UA-XXXX-X
#BTCEXP_SENTRY_URL=https://00000fffffff@sentry.io/XXXX
#BTCEXP_IPSTACK_APIKEY=000000fffffaaaaa
#BTCEXP_OLD_SPACE_MAX_SIZE=2048

bitcoin.conf
regtest=1
server=1
txindex=1

[regtest]
rpcuser=
rpcpassword=
rpcthreads=6
rpcworkqueue=128
rpcport=40310
port=40300
addnode=[]
addnode=[]

@janoside
Copy link
Owner

janoside commented Mar 9, 2020

This is an issue of caching. Your workaround (disabling caching) is definitely a good fix if you don't need caching.

I'll need to think about how best to address this issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@janoside @stevenceasefire and others