prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Install roboto mono
  ## Abstract
  
  We should install the mono version of our main font in order to increase legibility and proper alignment of content in certain scenarios.
  
  ## Specification
  
  https://www.npmjs.com/package/typeface-roboto-mono install, require it where we require roboto, use it in classes where a mono font is required to line things up properly in data tables / cards / etc.
  
  </issue>
  <code>
  [start of rotkehlchen/chain/ethereum/transactions.py]
  1 import logging
  2 from collections import defaultdict
  3 from typing import Dict, List, Optional
  4 
  5 from rotkehlchen.db.dbhandler import DBHandler
  6 from rotkehlchen.db.ranges import DBQueryRanges
  7 from rotkehlchen.errors import RemoteError
  8 from rotkehlchen.externalapis.etherscan import Etherscan
  9 from rotkehlchen.logging import RotkehlchenLogsAdapter
  10 from rotkehlchen.typing import ChecksumEthAddress, EthereumTransaction, Timestamp
  11 from rotkehlchen.user_messages import MessagesAggregator
  12 from rotkehlchen.utils.interfaces import LockableQueryObject, protect_with_lock
  13 
  14 logger = logging.getLogger(__name__)
  15 log = RotkehlchenLogsAdapter(logger)
  16 
  17 FREE_ETH_TX_LIMIT = 500
  18 
  19 
  20 class EthTransactions(LockableQueryObject):
  21 
  22     def __init__(
  23             self,
  24             database: DBHandler,
  25             etherscan: Etherscan,
  26             msg_aggregator: MessagesAggregator,
  27     ) -> None:
  28         super().__init__()
  29         self.database = database
  30         self.etherscan = etherscan
  31         self.msg_aggregator = msg_aggregator
  32         self.tx_per_address: Dict[ChecksumEthAddress, int] = defaultdict(int)
  33 
  34     def _single_address_query_transactions(
  35             self,
  36             address: ChecksumEthAddress,
  37             start_ts: Timestamp,
  38             end_ts: Timestamp,
  39             with_limit: bool,
  40     ) -> List[EthereumTransaction]:
  41         self.tx_per_address[address] = 0
  42         transactions = self.database.get_ethereum_transactions(
  43             from_ts=start_ts,
  44             to_ts=end_ts,
  45             address=address,
  46         )
  47         ranges = DBQueryRanges(self.database)
  48         ranges_to_query = ranges.get_location_query_ranges(
  49             location_string=f'ethtxs_{address}',
  50             start_ts=start_ts,
  51             end_ts=end_ts,
  52         )
  53         new_transactions = []
  54         for query_start_ts, query_end_ts in ranges_to_query:
  55             for internal in (False, True):
  56                 try:
  57                     new_transactions.extend(self.etherscan.get_transactions(
  58                         account=address,
  59                         internal=internal,
  60                         from_ts=query_start_ts,
  61                         to_ts=query_end_ts,
  62                     ))
  63                 except RemoteError as e:
  64                     self.msg_aggregator.add_error(
  65                         f'Got error "{str(e)}" while querying ethereum transactions '
  66                         f'from Etherscan. Transactions not added to the DB '
  67                         f'from_ts: {query_start_ts} '
  68                         f'to_ts: {query_end_ts} '
  69                         f'internal: {internal}',
  70                     )
  71 
  72         # add new transactions to the DB
  73         if new_transactions != []:
  74             self.database.add_ethereum_transactions(new_transactions, from_etherscan=True)
  75         # and also set the last queried timestamps for the address
  76         ranges.update_used_query_range(
  77             location_string=f'ethtxs_{address}',
  78             start_ts=start_ts,
  79             end_ts=end_ts,
  80             ranges_to_query=ranges_to_query,
  81         )
  82         # finally append them to the already returned DB transactions
  83         transactions.extend(new_transactions)
  84 
  85         if with_limit:
  86             transactions_queried_so_far = sum(x for _, x in self.tx_per_address.items())
  87             remaining_num_tx = FREE_ETH_TX_LIMIT - transactions_queried_so_far
  88             returning_tx_length = min(remaining_num_tx, len(transactions))
  89             # Note down how many we got for this address
  90             self.tx_per_address[address] = returning_tx_length
  91             return transactions[:returning_tx_length]
  92 
  93         return transactions
  94 
  95     @protect_with_lock()
  96     def query(
  97             self,
  98             address: Optional[ChecksumEthAddress],
  99             from_ts: Timestamp,
  100             to_ts: Timestamp,
  101             with_limit: bool = False,
  102             recent_first: bool = False,
  103     ) -> List[EthereumTransaction]:
  104         """Queries for all transactions (normal AND internal) of all ethereum accounts.
  105         Returns a list of all transactions of all accounts sorted by time.
  106 
  107         If `with_limit` is true then the api limit is applied
  108 
  109         if `recent_first` is true then the transactions are returned with the most
  110         recent first on the list
  111 
  112         May raise:
  113         - RemoteError if etherscan is used and there is a problem with reaching it or
  114         with parsing the response.
  115         """
  116         transactions: List[EthereumTransaction] = []
  117 
  118         if address is not None:
  119             accounts = [address]
  120         else:
  121             accounts = self.database.get_blockchain_accounts().eth
  122 
  123         for address in accounts:
  124             transactions.extend(self._single_address_query_transactions(
  125                 address=address,
  126                 start_ts=from_ts,
  127                 end_ts=to_ts,
  128                 with_limit=with_limit,
  129             ))
  130 
  131         transactions.sort(key=lambda tx: tx.timestamp, reverse=recent_first)
  132         return transactions
  133
  [end of rotkehlchen/chain/ethereum/transactions.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/rotkehlchen/chain/ethereum/transactions.py b/rotkehlchen/chain/ethereum/transactions.py
  --- a/rotkehlchen/chain/ethereum/transactions.py
  +++ b/rotkehlchen/chain/ethereum/transactions.py
  @@ -72,6 +72,15 @@
           # add new transactions to the DB
           if new_transactions != []:
               self.database.add_ethereum_transactions(new_transactions, from_etherscan=True)
  +            # And since at least for now the increasingly negative nonce for the internal
  +            # transactions happens only in the DB writing, requery the entire batch from
  +            # the DB to get the updated transactions
  +            transactions = self.database.get_ethereum_transactions(
  +                from_ts=start_ts,
  +                to_ts=end_ts,
  +                address=address,
  +            )
  +
           # and also set the last queried timestamps for the address
           ranges.update_used_query_range(
               location_string=f'ethtxs_{address}',
  @@ -79,8 +88,6 @@
               end_ts=end_ts,
               ranges_to_query=ranges_to_query,
           )
  -        # finally append them to the already returned DB transactions
  -        transactions.extend(new_transactions)
   
           if with_limit:
               transactions_queried_so_far = sum(x for _, x in self.tx_per_address.items())
  
verification_info: {"golden_diff": "diff --git a/rotkehlchen/chain/ethereum/transactions.py b/rotkehlchen/chain/ethereum/transactions.py\n--- a/rotkehlchen/chain/ethereum/transactions.py\n+++ b/rotkehlchen/chain/ethereum/transactions.py\n@@ -72,6 +72,15 @@\n         # add new transactions to the DB\n         if new_transactions != []:\n             self.database.add_ethereum_transactions(new_transactions, from_etherscan=True)\n+            # And since at least for now the increasingly negative nonce for the internal\n+            # transactions happens only in the DB writing, requery the entire batch from\n+            # the DB to get the updated transactions\n+            transactions = self.database.get_ethereum_transactions(\n+                from_ts=start_ts,\n+                to_ts=end_ts,\n+                address=address,\n+            )\n+\n         # and also set the last queried timestamps for the address\n         ranges.update_used_query_range(\n             location_string=f'ethtxs_{address}',\n@@ -79,8 +88,6 @@\n             end_ts=end_ts,\n             ranges_to_query=ranges_to_query,\n         )\n-        # finally append them to the already returned DB transactions\n-        transactions.extend(new_transactions)\n \n         if with_limit:\n             transactions_queried_so_far = sum(x for _, x in self.tx_per_address.items())\n", "issue": "Install roboto mono\n## Abstract\r\n\r\nWe should install the mono version of our main font in order to increase legibility and proper alignment of content in certain scenarios.\r\n\r\n## Specification\r\n\r\nhttps://www.npmjs.com/package/typeface-roboto-mono install, require it where we require roboto, use it in classes where a mono font is required to line things up properly in data tables / cards / etc.\n", "before_files": [{"content": "import logging\nfrom collections import defaultdict\nfrom typing import Dict, List, Optional\n\nfrom rotkehlchen.db.dbhandler import DBHandler\nfrom rotkehlchen.db.ranges import DBQueryRanges\nfrom rotkehlchen.errors import RemoteError\nfrom rotkehlchen.externalapis.etherscan import Etherscan\nfrom rotkehlchen.logging import RotkehlchenLogsAdapter\nfrom rotkehlchen.typing import ChecksumEthAddress, EthereumTransaction, Timestamp\nfrom rotkehlchen.user_messages import MessagesAggregator\nfrom rotkehlchen.utils.interfaces import LockableQueryObject, protect_with_lock\n\nlogger = logging.getLogger(__name__)\nlog = RotkehlchenLogsAdapter(logger)\n\nFREE_ETH_TX_LIMIT = 500\n\n\nclass EthTransactions(LockableQueryObject):\n\n    def __init__(\n            self,\n            database: DBHandler,\n            etherscan: Etherscan,\n            msg_aggregator: MessagesAggregator,\n    ) -> None:\n        super().__init__()\n        self.database = database\n        self.etherscan = etherscan\n        self.msg_aggregator = msg_aggregator\n        self.tx_per_address: Dict[ChecksumEthAddress, int] = defaultdict(int)\n\n    def _single_address_query_transactions(\n            self,\n            address: ChecksumEthAddress,\n            start_ts: Timestamp,\n            end_ts: Timestamp,\n            with_limit: bool,\n    ) -> List[EthereumTransaction]:\n        self.tx_per_address[address] = 0\n        transactions = self.database.get_ethereum_transactions(\n            from_ts=start_ts,\n            to_ts=end_ts,\n            address=address,\n        )\n        ranges = DBQueryRanges(self.database)\n        ranges_to_query = ranges.get_location_query_ranges(\n            location_string=f'ethtxs_{address}',\n            start_ts=start_ts,\n            end_ts=end_ts,\n        )\n        new_transactions = []\n        for query_start_ts, query_end_ts in ranges_to_query:\n            for internal in (False, True):\n                try:\n                    new_transactions.extend(self.etherscan.get_transactions(\n                        account=address,\n                        internal=internal,\n                        from_ts=query_start_ts,\n                        to_ts=query_end_ts,\n                    ))\n                except RemoteError as e:\n                    self.msg_aggregator.add_error(\n                        f'Got error \"{str(e)}\" while querying ethereum transactions '\n                        f'from Etherscan. Transactions not added to the DB '\n                        f'from_ts: {query_start_ts} '\n                        f'to_ts: {query_end_ts} '\n                        f'internal: {internal}',\n                    )\n\n        # add new transactions to the DB\n        if new_transactions != []:\n            self.database.add_ethereum_transactions(new_transactions, from_etherscan=True)\n        # and also set the last queried timestamps for the address\n        ranges.update_used_query_range(\n            location_string=f'ethtxs_{address}',\n            start_ts=start_ts,\n            end_ts=end_ts,\n            ranges_to_query=ranges_to_query,\n        )\n        # finally append them to the already returned DB transactions\n        transactions.extend(new_transactions)\n\n        if with_limit:\n            transactions_queried_so_far = sum(x for _, x in self.tx_per_address.items())\n            remaining_num_tx = FREE_ETH_TX_LIMIT - transactions_queried_so_far\n            returning_tx_length = min(remaining_num_tx, len(transactions))\n            # Note down how many we got for this address\n            self.tx_per_address[address] = returning_tx_length\n            return transactions[:returning_tx_length]\n\n        return transactions\n\n    @protect_with_lock()\n    def query(\n            self,\n            address: Optional[ChecksumEthAddress],\n            from_ts: Timestamp,\n            to_ts: Timestamp,\n            with_limit: bool = False,\n            recent_first: bool = False,\n    ) -> List[EthereumTransaction]:\n        \"\"\"Queries for all transactions (normal AND internal) of all ethereum accounts.\n        Returns a list of all transactions of all accounts sorted by time.\n\n        If `with_limit` is true then the api limit is applied\n\n        if `recent_first` is true then the transactions are returned with the most\n        recent first on the list\n\n        May raise:\n        - RemoteError if etherscan is used and there is a problem with reaching it or\n        with parsing the response.\n        \"\"\"\n        transactions: List[EthereumTransaction] = []\n\n        if address is not None:\n            accounts = [address]\n        else:\n            accounts = self.database.get_blockchain_accounts().eth\n\n        for address in accounts:\n            transactions.extend(self._single_address_query_transactions(\n                address=address,\n                start_ts=from_ts,\n                end_ts=to_ts,\n                with_limit=with_limit,\n            ))\n\n        transactions.sort(key=lambda tx: tx.timestamp, reverse=recent_first)\n        return transactions\n", "path": "rotkehlchen/chain/ethereum/transactions.py"}]}