Code Monkey home page Code Monkey logo

Comments (8)

habanoz avatar habanoz commented on May 26, 2024

public key aliases starting with prefix "tz" confused the application. Length check is added to avoid the situation. if a key starts with tz or KT and has a length of 36 then it is regarded as a PKH, else a key alias.

from tezos-reward-distributor.

gaia avatar gaia commented on May 26, 2024

So we should always use the alias? I started with a tz PKH, and got

2018-12-06 21:11:44,064 - main - DEBUG - producer  - Trying payments for cycle 47
2018-12-06 21:11:44,691 - main - DEBUG - producer  - checking payment_cycle <= current_cycle - (self.nw_config['NB_FREEZE_CYCLE'] + 1) - self.release_override
2018-12-06 21:11:44,692 - main - DEBUG - producer  - checking 47 <= 53 - (5 + 1) - 0
2018-12-06 21:11:44,692 - main - INFO - producer  - Payment cycle is 47

--- Logging error ---
Traceback (most recent call last):
  File "src/main.py", line 103, in run
    reward_data = reward_api.get_rewards_for_cycle_map(payment_cycle)
  File "/home/tezos/scripts/tezos-tools/tezos-reward-distributor/src/tzscan/tzscan_reward_api.py", line 43, in get_rewards_for_cycle_map
    nb_delegators = self.get_nb_delegators(cycle)[0]
  File "/home/tezos/scripts/tezos-tools/tezos-reward-distributor/src/tzscan/tzscan_reward_api.py", line 37, in get_nb_delegators
    raise Exception('GET /tasks/ {}'.format(resp.status_code))
Exception: GET /tasks/ 504

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "src/main.py", line 136, in run
    logger.error("Error at reward calculation", e)
Message: 'Error at reward calculation'
Arguments: (Exception('GET /tasks/ 504',),)
--- Logging error ---
Traceback (most recent call last):
  File "src/main.py", line 103, in run
    reward_data = reward_api.get_rewards_for_cycle_map(payment_cycle)
  File "/home/tezos/scripts/tezos-tools/tezos-reward-distributor/src/tzscan/tzscan_reward_api.py", line 43, in get_rewards_for_cycle_map
    nb_delegators = self.get_nb_delegators(cycle)[0]
  File "/home/tezos/scripts/tezos-tools/tezos-reward-distributor/src/tzscan/tzscan_reward_api.py", line 37, in get_nb_delegators
    raise Exception('GET /tasks/ {}'.format(resp.status_code))
Exception: GET /tasks/ 504

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/lib/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "src/main.py", line 136, in run
    logger.error("Error at reward calculation", e)
Message: 'Error at reward calculation'
Arguments: (Exception('GET /tasks/ 504',),)
2018-12-06 21:12:49,999 - main - DEBUG - producer  - Trying payments for cycle 47
2018-12-06 21:12:50,623 - main - DEBUG - producer  - checking payment_cycle <= current_cycle - (self.nw_config['NB_FREEZE_CYCLE'] + 1) - self.release_override
2018-12-06 21:12:50,623 - main - DEBUG - producer  - checking 47 <= 53 - (5 + 1) - 0
2018-12-06 21:12:50,624 - main - INFO - producer  - Payment cycle is 47

from tezos-reward-distributor.

habanoz avatar habanoz commented on May 26, 2024

You got HTTP/504 (Gateway Timeout) from tzscan. You may try again. Also please update to the latest code, if you did not already.

If your problem persists, you may open another issue.

from tezos-reward-distributor.

SemElVik avatar SemElVik commented on May 26, 2024

I had today on two different nodes the same thing.
everything was decided by restarting distributor!

from tezos-reward-distributor.

habanoz avatar habanoz commented on May 26, 2024

Did you get 504 two times on different nodes? And does it persist even after you restart ?

from tezos-reward-distributor.

SemElVik avatar SemElVik commented on May 26, 2024

after restart i paid. after the restart, I paid for 1 cycle (47) and then I launched by default now # python3 src/main.py payNode2. I worked in this mode, but I got 504.
on another node I was paying with a duplicate program. There was also an error 504. At first there was a wrong billing address, I corrected it, but I received the same error.
then I deleted all the .csv files and made the correct billing address. I got it seems the same error (not sure now exactly)., I closed the application and paid for 1 cycle (47) everything worked out.
Now Iā€™m running everywhere by default # python3 src / main.py - wait for the end of the cycle and see.

from tezos-reward-distributor.

habanoz avatar habanoz commented on May 26, 2024

tzscan mirror 4 is down. I modified application not to use mirror 4. Please update and share your results

from tezos-reward-distributor.

habanoz avatar habanoz commented on May 26, 2024

Closing the issue.

from tezos-reward-distributor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.