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 --no-dry run freezes #27

Closed issie81 closed 5 years ago

issie81 commented 5 years ago

I got it so fare the backerei payout works good.. the --no-dry run freezes it seems, this is output i get

xx@payment:~/tezos$ backerei payout --no-dry-run Enter source account password: Total payouts: 0.191056, payout account balance: xx For cycle 64 delegator xx should be paid 0.191056 XTZ Running '/home/xx/tezos/tezos-client -c /home/xx/.tezos-client/config sign bytes xx for xx' in a pty

when i run the above command manual all goes good in the yaml file the fee is set like

fee:

if i change to fee: 0 i get error, can this be the issue? Otherwise looking foward to the solution

cwgoes commented 5 years ago

The fee is a rational number, you need to set the numerator and denominator, which backerei init will do automatically. For example, if you want to charge a fee of zero, you would write:

fee:
  numerator: 0
  denominator: 1
issie81 commented 5 years ago

thank you for your comment @cwgoes my settings are fee: denominator: 10 numerator: 1

with 10% fee charge but i was more talking about transaction fees... as you can see the above delegator is a rather small one (delegating 142 xtz)

When i run the above code manually: Running '/home/xx/tezos/tezos-client -c /home/xx/.tezos-client/config sign bytes xx for xx'

somehow backerei doesnt seem to execute it and by hand i can, what do you suggest

issie81 commented 5 years ago

problem is fixed!!!

problem was a vanity address without pass i did payment with new account which worked like a charm now created a new vanity address with pass maybe it's a pass thing after i changed the new payout address i run in to mempool rejection issue

which is solved with running

./tezos-client rpc post /chains/main/mempool/filter with '{ "minimal_fees": "0", "minimal_nanotez_per_gas_unit": "0", "minimal_nanotez_per_byte": "0" }'

issie81 commented 5 years ago

also note i got payment for cycle 65 complete

yet in the block explorer there is no transaction on the payout address, what could be the issue?

cwgoes commented 5 years ago

Did the transaction include enough of a fee for a baker to likely include it?

issie81 commented 5 years ago

I didn't do something on fee side why not write how to configure the node how it would work succesfully with backerei?

Really not much documentation how tot properly configure all..

Kindly advice how tot setup so the transactions Goes well, would also be cool if the node also give some sort of error now i got payment status complete which isnt the case

Also what would you consider enough fee?

cwgoes commented 5 years ago

Indeed the documentation could be improved - we'd gladly accept PRs to improve it; you know better than we do which parts aren't clear.

backerei relies on the tezos-node to store your transaction in the mempool and broadcast it to the network (just as you would when sending a transaction with tezos-client) - so the requisite fee will depend on your node's configuration settings and the minimum fees bakers have set for including transactions. I expect many still use the defaults.

issie81 commented 5 years ago

Yeah that's why i am writing so much more feedback the bettter:))

So i didn't touch any setting i would say its default then.. can you kindly state which values in which file i have to set? Then i will play around or should i keep defaults?

issie81 commented 5 years ago

i set payment default fee on the RPC file to 0.00142 it was prior that to 0

this is the error i got?

backerei: VanillaHttpException (HttpExceptionRequest Request { host = "127.0.0.1" port = 8732 secure = False requestHeaders = [("Content-Type","application/json")] path = "/injection/operation" queryString = "" method = "POST" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutMicro 600000000 requestVersion = HTTP/1.1 } (StatusCodeException (Response {responseStatus = Status {statusCode = 500, statusMessage = "Internal Server Error"}, responseVersion = HTTP/1.1, responseHeaders = [("content-length","114"),("content-type","application/json")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) "[{\"kind\":\"generic\",\"error\":\"Error while applying operation xx\"}]\n"))

this seems no mempool error, what do you think @cwgoes ?

when i send some xtz to one address to other one without --fee flag it sends so the payment/fee are set good

issie81 commented 5 years ago

More updates

this problem is identical to closd issue 21 i was getting rejected by mempool now i get error applying operation, i am pretty sure i got everything right at the moment.. i can send manual transactions without --fee flag

the rejected by mempool error got disappeared by applying this

./tezos-client rpc post /chains/main/mempool/filter with '{ "minimal_fees": "0", "minimal_nanotez_per_gas_unit": "0", "minimal_nanotez_per_byte": "0" }'

the RPC.hs line 103 defined fee of 0.00142 so the transaction should get enough fee to get trough and now is Error while applying operation xx

surely there must be something easy what is the issue?

issie81 commented 5 years ago

now i fixed some things by restarting node on new updated mainnet i get cycle 66 complete

transaction send to node

Feb 3 00:11:02 - prevalidator.NetXdQprcVkpa.PsddFKi32cMJ(1): injecting operation opCPCeEvCcoLFzwtVKt8GCYHbk3GMUEgDBzYPkGs4dFnYMDCroQ Feb 3 00:11:02 - prevalidator.NetXdQprcVkpa.PsddFKi32cMJ(1): Pushed: 2019-02-02T23:11:02Z, Treated: 2019-02-02T23:11:02Z, Completed: 2019-02-02T23:11:02Z

i got this same hash in the Json file

"payoutOperationHash": "opCPCeEvCcoLFzwtVKt8GCYHbk3GMUEgDBzYPkGs4dFnYMDCroQ"

but transaction never hit the blockchain how can this be possible, i have not rejects as the node accepts but its not broadcast to network

sending manual transactions work (without fee flag, so the node is configured correctly on fee side)

so when sending the transaction with backerei never hits blockchain (even if the node gives no error and accepts the injection) and doing it manual with tezos-client work (without fee flag) something not right here....

cwgoes commented 5 years ago

If the transaction is correctly received and injected by the node, but it is not confirmed on the Tezos main chain, it means that no baker has (yet) chosen to include your transaction in their block. That could be because they have a higher minimum fee set, because they have never received the transaction, or for any number of other reasons.

issie81 commented 5 years ago

thank you for the prompt reaction @cwgoes lets keep up the pace:)

i dont believe this is a fee issue, when i do a normal transaction the transaction is being direcly also hitting the blockchain directly without --fee flag using my node config

so lets look at output of the manual transaction

This sequence of operations was run: Manager signed operations: From: xx Fee to the baker: ꜩ0.001272 Expected counter: 7 Gas limit: 10200 Storage limit: 0 bytes Balance updates: xx............ -ꜩ0.001272 fees(xx) ... +ꜩ0.001272 Transaction:

so the fee was 0.001272 i believe this is also what most use.. bakers tend to go abit higher like 0.00142 (which is what i use).. i defined this fee in the RPC file line 103, i assume that is the correct place to note the fee, this is my line 103

("destination", A.String dest), ("storage_limit", A.String "0"), ("gas_limit", A.String "10300"), ("fee", A.String "0.00142"), ("counter", A.toJSON $ P.show counter)]) (P.zip dests [currentCounter + 1 ..])

i even tried 0.002 which is way higher then default 0.0001, still transaction doesnt goes trough to the blockchain.. what's next?

cwgoes commented 5 years ago

Yes; that's the right place to set the fee.

Once backerei submits the transaction to your node's mempool, what happens then is entirely out of backerei's control - maybe check the contents of your mempool, enable verbose logging, and see whether the transaction is rebroadcast to other nodes or not?

cwgoes commented 5 years ago

@issie81 Are you still trying to get this working / anything I can help with here?

cwgoes commented 5 years ago

Closing for now but please reopen if you still need assistance.