cryptiumlabs / backerei

Automated reward payment & account management for Tezos bakers.
https://cryptium.ch/networks/tezos
GNU General Public License v3.0
49 stars 11 forks source link

Backerei 404 #60

Closed thearchitectnyc closed 4 years ago

thearchitectnyc commented 4 years ago

I am running a local node and attempting to use backerei commands like backerei monitor and backerei init appear to work However, backerei payout always throws this exception:

$ backerei payout
Enter source account password: 
Creating new DB in file /home/username/.backerei.json...
Updating DB with estimates for cycle 212...
backerei: VanillaHttpException (HttpExceptionRequest Request {
  host                 = "127.0.0.1"
  port                 = 8732
  secure               = False
  requestHeaders       = []
  path                 = "/chains/main/blocks/BMEWWcDvaehAzuCNmkrD2r3cBJpNJ9j4jABjS6qND1YmRpDCHJM~27655/header"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutMicro 600000000
  requestVersion       = HTTP/1.1
}
 (StatusCodeException (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("transfer-encoding","chunked")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) ""))

This is probably a very simple fix. I have tried installing this on ubuntu server 18.04 and ubuntu desktop 19.10

tzemanovic commented 4 years ago

Can you confirm that you are running a full node? It looks like you may be running a rolling mode node, which doesn’t keep the data necessary for a baker

adrianbrink commented 4 years ago

You need to be running an archive node.

thearchitectnyc commented 4 years ago

I was running a full node. I stopped it an ran tezos-node reconstruct in order to turn it in to an archive node. I still get the 404 response.

$ backerei payout
Enter source account password: 
Updating DB with estimates for cycle 213...
backerei: VanillaHttpException (HttpExceptionRequest Request {
  host                 = "127.0.0.1"
  port                 = 8732
  secure               = False
  requestHeaders       = []
  path                 = "/chains/main/blocks/BMBzWdFqPFMSLozNZQaEX2HbLXu8vgr53coMwSMWm2coYv8tQRa/context/delegates/tz1<my_baker_address>/delegated_contracts"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutMicro 600000000
  requestVersion       = HTTP/1.1
}
 (StatusCodeException (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("transfer-encoding","chunked")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) ""))
thearchitectnyc commented 4 years ago

Update: I tried to convert the full node to an archive node using tezos-node reconstruct However, the results were the same. I decided to completely rebuilt my node with nohup ./tezos-node run --history-mode archive --rpc-addr 127.0.0.1 --connections 100 & Then I retried backerei and the 404 error stopped. Thank you for the feedback.

cwgoes commented 4 years ago

Glad you got it working, seems like this can be closed then.