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

WARNING: Wallet failed to verify data against a live chain. The above is from local cache and only valid up to the given height! (is your grin server offline or broken?) Command 'info' completed successfully #624

Closed
ghost opened this issue Nov 8, 2021 · 7 comments

Comments

@ghost
Copy link

ghost commented Nov 8, 2021

WARNING: Wallet failed to verify data against a live chain. The above is from local cache and only valid up to the given height! (is your grin server offline or broken?)
Command 'info' completed successfully

I get this on grin wallet 5.0.4 and 5.1.1 when i run ./grin-wallet --api_server_address="https://127.0.0.1:3413" -t test/ -p test info

@deevope
Copy link
Contributor

deevope commented Nov 9, 2021

@boorishpea Hey, you should instead of using https, use http in your api_server_address.

./grin-wallet --api_server_address="http://127.0.0.1:3413" -t test/ -p test info

@ghost
Copy link
Author

ghost commented Nov 9, 2021

./grin server -p 3413 run

./grin-wallet --api_server_address="http://127.0.0.1:3413" -t test/ -p test info

20211109 13:15:13.181 ERROR grin_wallet_impls::node_clients::http - Error calling get_version: Request error: Cannot make request: error sending request for url (http://127.0.0.1:3413/v2/foreign): connection closed before message completed
20211109 13:15:13.181 ERROR grin_wallet_impls::node_clients::http - Unable to contact Node to get version info: Client Callback Error: Error calling get_version: Request error: Cannot make request: error sending request for url (http://127.0.0.1:3413/v2/foreign): connection closed before message completed
20211109 13:15:13.216 ERROR grin_wallet_impls::node_clients::http - Error calling get_tip: Request error: Cannot make request: error sending request for url (http://127.0.0.1:3413/v2/foreign): connection closed before message completed
20211109 13:15:13.217 WARN grin_wallet_libwallet::api_impl::owner_updater - Updater Thread unable to contact node

@deevope
Copy link
Contributor

deevope commented Nov 9, 2021

@boorishpea can you give me a sample of your node and wallet config please?
node config : .grin/main/grin-server.toml
wallet config: .grin/main/grin-wallet.toml

@ghost
Copy link
Author

ghost commented Nov 12, 2021


# Generated Server Configuration File for Grin
#
# When running the grin executable without specifying any command line
# arguments, it will look for this file in two places, in the following
# order:
#
# -The working directory
# -[user home]/.grin
#

config_file_version = 2

#########################################
### SERVER CONFIGURATION              ###
#########################################

#Server connection details
[server]

#the directory, relative to current, in which the grin blockchain
#is stored
db_root = "/home/grin/.grin/main/chain_data"

#path of TLS certificate file, self-signed certificates are not supported
#tls_certificate_file = ""
#private key for the TLS certificate
#tls_certificate_key = ""

#the address on which services will listen, e.g. Transaction Pool
api_http_addr = "0.0.0.0:3415"

#path of the secret token used by the Rest API and v2 Owner API to authenticate the calls
#comment the it to disable basic auth
api_secret_path = "/home/grin/.grin/main/.api_secret"

#path of the secret token used by the Foreign API to authenticate the calls
#comment the it to disable basic auth
foreign_api_secret_path = "/home/grin/.grin/main/.foreign_api_secret"

#The chain type, which defines the genesis block and the set of cuckoo
#parameters used for mining as well as wallet output coinbase maturity. Can be:
#AutomatedTesting - For CI builds and instant blockchain creation
#UserTesting - For regular user testing (cuckoo 16)
#Testnet - For the long term test network
#Mainnet - For mainnet
chain_type = "Mainnet"

#The Future Time Limit (FTL) is a limit on how far into the future,
#relative to a node's local time, the timestamp on a new block can be,
#in order for the block to be accepted.
#At Hard Fork 4, this was reduced from 12 minutes down to 5 minutes,
#so as to limit possible timestamp manipulation on the new
#wtema difficulty adjustment algorithm
future_time_limit = 300

#the chain validation mode, defines how often (if at all) we
#want to run a full chain validation. Can be:
#"EveryBlock" - run full chain validation when processing each block (except during sync)
#"Disabled" - disable full chain validation (just run regular block validation)
chain_validation_mode = "Disabled"

#run the node in "full archive" mode (default is fast-sync, pruned node)
archive_mode = false

#skip waiting for sync on startup, (optional param, mostly for testing)
skip_sync_wait = false

#whether to run the ncurses TUI (Ncurses must be installed)
run_tui = true

#Whether to run a test miner. This is only for developer testing (chaintype
#usertesting) at cuckoo 16, and will only mine into the default wallet port.
#real mining should use the standalone grin-miner
run_test_miner = false

#test miner wallet URL (burns if this doesn't exist)
#test_miner_wallet_url = "http://127.0.0.1:3415"

#########################################
### SERVER P2P CONFIGURATION          ###
#########################################
#The P2P server details (i.e. the server that communicates with other
[server.p2p_config]

#The interface on which to listen.
#0.0.0.0 will listen on all interfaces, allowing others to interact
#127.0.0.1 will listen on the local machine only
host = "0.0.0.0"

#The port on which to listen.
port = 3414

#All seeds/peers can be either IP address or DNS names. Port number must always be specified
#how to seed this server, can be None, List or DNSSeed
seeding_type = "DNSSeed"

#If the seeding type is List, the list of peers to connect to can
#be specified as follows:
#seeds = ["192.168.0.1:3414","192.168.0.2:3414"]

#hardcoded peer lists for allow/deny
#will *only* connect to peers in allow list
#peers_allow = ["192.168.0.1:3414", "192.168.0.2:3414"]
#will *never* connect to peers in deny list
#peers_deny = ["192.168.0.3:3414", "192.168.0.4:3414"]
#a list of preferred peers to connect to
#peers_preferred = ["192.168.0.1:3414","192.168.0.2:3414"]

#how long a banned peer should stay banned
#ban_window = 10800

#maximum number of inbound peer connections
#peer_max_inbound_count = 128

#maximum number of outbound peer connections
#peer_max_outbound_count = 8

#preferred minimum number of outbound peers (we'll actively keep trying to add peers
#until we get to at least this number)
#peer_min_preferred_outbound_count = 8

#amount of incoming connections temporarily allowed to exceed peer_max_inbound_count
#peer_listener_buffer_count = 8

# A preferred dandelion_peer, mainly used for testing dandelion
# dandelion_peer = "10.0.0.1:13144"

#########################################
### MEMPOOL CONFIGURATION             ###
#########################################
[server.pool_config]

#base fee that's accepted into the pool
accept_fee_base = 500000

#reorg cache retention period in minute.
#the reorg cache repopulates local mempool in a reorg scenario.
reorg_cache_period = 30

#maximum number of transactions allowed in the pool
max_pool_size = 50000

#maximum number of transactions allowed in the stempool
max_stempool_size = 50000

#maximum total weight of transactions that can get selected to build a block
mineable_max_weight = 40000


#########################################
### DANDELION CONFIGURATION           ###
#########################################
[server.dandelion_config]

#dandelion epoch duration
epoch_secs = 600

#fluff and broadcast after embargo expires if tx not seen on network
embargo_secs = 180

#dandelion aggregation period in secs
aggregation_secs = 30

#dandelion stem probability (stem 90% of the time, fluff 10% of the time)
stem_probability = 90

#always stem our (pushed via api) txs regardless of stem/fluff epoch (as per Dandelion++ paper)
always_stem_our_txs = true


################################################
### STRATUM MINING SERVER CONFIGURATION      ###
################################################
[server.stratum_mining_config]

#whether stratum server is enabled
enable_stratum_server = false

#what port and address for the stratum server to listen on
stratum_server_addr = "127.0.0.1:3416"

#the amount of time, in seconds, to attempt to mine on a particular
#header before stopping and re-collecting transactions from the pool
attempt_time_per_block = 15

#the minimum acceptable share difficulty to request from miners
minimum_share_difficulty = 1

#the wallet receiver to which coinbase rewards will be sent
wallet_listener_url = "http://127.0.0.1:3415"

#whether to ignore the reward (mostly for testing)
burn_reward = false


#########################################
### WEBHOOK CONFIGURATION             ###
#########################################
[server.webhook_config]

#The url where a POST request will be sent when a new block is accepted by our node.
#block_accepted_url = "http://127.0.0.1:8080/acceptedblock"

#The url where a POST request will be sent when a new transaction is received by a peer.
#tx_received_url = "http://127.0.0.1:8080/tx"

#The url where a POST request will be sent when a new header is received by a peer.
#header_received_url = "http://127.0.0.1:8080/header"

#The url where a POST request will be sent when a new block is received by a peer.
#block_received_url = "http://127.0.0.1:8080/block"

#The number of worker threads that will be assigned to making the http requests.
nthreads = 4

#The timeout of the http request in seconds.
timeout = 10


#########################################
### LOGGING CONFIGURATION             ###
#########################################
[logging]

#whether to log to stdout
log_to_stdout = true

#log level for stdout: Error, Warning, Info, Debug, Trace
stdout_log_level = "Warning"

#whether to log to a file
log_to_file = true

#log level for file: Error, Warning, Info, Debug, Trace
file_log_level = "Info"

#log file path
log_file_path = "/home/grin/.grin/main/grin-server.log"

#whether to append to the log file (true), or replace it on every run (false)
log_file_append = true

#maximum log file size in bytes before performing log rotation
#comment it to disable log rotation
log_max_size = 16777216

#maximum count of the log files to rotate over
log_max_files = 32


@ghost
Copy link
Author

ghost commented Nov 12, 2021

#########################################
### WALLET CONFIGURATION              ###
#########################################
[wallet]
chain_type = "Mainnet"

#path of TLS certificate file, self-signed certificates are not supported
#tls_certificate_file = ""
#private key for the TLS certificate
#tls_certificate_key = ""

#port for wallet listener
api_listen_port = 3415

#port for wallet owner api
owner_api_listen_port = 3420

#path of the secret token used by the API to authenticate the calls
#comment it to disable basic auth
api_secret_path = "/home/grin/grin-wallet/target/release/test/.owner_api_secret"

#location of the node api secret for basic auth on the Grin API
node_api_secret_path = "/home/grin/grin-wallet/target/release/test/.foreign_api_secret"

#where the wallet should find a running node
check_node_api_http_addr = "http://127.0.0.1:3413"

#include the foreign API endpoints on the same port as the owner
#API. Useful for networking environments like AWS ECS that make
#it difficult to access multiple ports on a single service.
owner_api_include_foreign = false

#where to find wallet files (seed, data, etc)
data_file_dir = "/home/grin/grin-wallet/target/release/test/wallet_data"

#If true, don't store calculated commits in the database
#better privacy, but at a performance cost of having to
#re-calculate commits every time they're used
no_commit_cache = false

#Whether to use the black background color scheme for command line
dark_background_color_scheme = true

#The exploding lifetime for keybase notification on coins received.
#Unit: Minute. Default value 1440 minutes for one day.
#Refer to https://keybase.io/blog/keybase-exploding-messages for detail.
#To disable this notification, set it as 0.
keybase_notify_ttl = 1440


#########################################
### TOR CONFIGURATION (Experimental)  ###
#########################################
[tor]
skip_send_attempt = false

#Whether to start tor listener on listener startup (default true)
use_tor_listener = true

# TOR (SOCKS) proxy server address
socks_proxy_addr = "127.0.0.1:59050"

#Directory to output TOR configuration to when sending
send_config_dir = "/home/grin/grin-wallet/target/release/test/"


#########################################
### LOGGING CONFIGURATION             ###
#########################################
[logging]

#whether to log to stdout
log_to_stdout = true

#log level for stdout: Error, Warning, Info, Debug, Trace
stdout_log_level = "Warning"

#whether to log to a file
log_to_file = true

#log level for file: Error, Warning, Info, Debug, Trace
file_log_level = "Info"

#log file path
log_file_path = "/home/grin/grin-wallet/target/release/test/grin-wallet.log"

#whether to append to the log file (true), or replace it on every run (false)
log_file_append = true

#maximum log file size in bytes before performing log rotation
#comment it to disable log rotation
log_max_size = 16777216
log_max_files = 32


@deevope
Copy link
Contributor

deevope commented Nov 14, 2021

@boorishpea Your error come from the fact that you are setting the port for the P2P server as 3413 when you use the flag -p when you run ./grin server -p 3413 run, which is for inbound node and already used for the owner/foreign api of the node.

However, simply use the flag -a. Do ./grin server -a 3413 run to set the port for the owner and foreign api of your node. Which I guess is what you were trying to do.

And your wallet will be able to query the node again :)

@ghost
Copy link
Author

ghost commented Nov 14, 2021

can confirm -a works. closing issue.

@ghost ghost closed this as completed Nov 14, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant