{
  "contractName": "Relay",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "_genesisHeader",
          "type": "bytes"
        },
        {
          "internalType": "uint256",
          "name": "_height",
          "type": "uint256"
        },
        {
          "internalType": "bytes32",
          "name": "_periodStart",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "_first",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "_last",
          "type": "bytes32"
        }
      ],
      "name": "Extension",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "_from",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "_to",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "_gcd",
          "type": "bytes32"
        }
      ],
      "name": "NewTip",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "HEIGHT_INTERVAL",
      "outputs": [
        {
          "internalType": "uint32",
          "name": "",
          "type": "uint32"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getCurrentEpochDifficulty",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getPrevEpochDifficulty",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getRelayGenesis",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getBestKnownDigest",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getLastReorgCommonAncestor",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "_digest",
          "type": "bytes32"
        }
      ],
      "name": "findHeight",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "_digest",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "_offset",
          "type": "uint256"
        }
      ],
      "name": "findAncestor",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "_ancestor",
          "type": "bytes32"
        },
        {
          "internalType": "bytes32",
          "name": "_descendant",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "_limit",
          "type": "uint256"
        }
      ],
      "name": "isAncestor",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "bytes",
          "name": "_anchor",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "_headers",
          "type": "bytes"
        }
      ],
      "name": "addHeaders",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "bytes",
          "name": "_oldPeriodStartHeader",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "_oldPeriodEndHeader",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "_headers",
          "type": "bytes"
        }
      ],
      "name": "addHeadersWithRetarget",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "_ancestor",
          "type": "bytes32"
        },
        {
          "internalType": "bytes",
          "name": "_currentBest",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "_newBest",
          "type": "bytes"
        },
        {
          "internalType": "uint256",
          "name": "_limit",
          "type": "uint256"
        }
      ],
      "name": "markNewHeaviest",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_genesisHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_periodStart\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_first\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_last\",\"type\":\"bytes32\"}],\"name\":\"Extension\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_gcd\",\"type\":\"bytes32\"}],\"name\":\"NewTip\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"HEIGHT_INTERVAL\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_anchor\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_headers\",\"type\":\"bytes\"}],\"name\":\"addHeaders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_oldPeriodStartHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_oldPeriodEndHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_headers\",\"type\":\"bytes\"}],\"name\":\"addHeadersWithRetarget\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_digest\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_offset\",\"type\":\"uint256\"}],\"name\":\"findAncestor\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_digest\",\"type\":\"bytes32\"}],\"name\":\"findHeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getBestKnownDigest\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentEpochDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastReorgCommonAncestor\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getPrevEpochDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getRelayGenesis\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_ancestor\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_descendant\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"isAncestor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_ancestor\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_currentBest\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_newBest\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"markNewHeaviest\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addHeaders(bytes,bytes)\":{\"details\":\"We check integrity and consistency of the header chain\",\"params\":{\"_anchor\":\"The header immediately preceeding the new chain\",\"_headers\":\"A tightly-packed list of 80-byte Bitcoin headers\"},\"return\":\"True if successfully written, error otherwise\"},\"addHeadersWithRetarget(bytes,bytes,bytes)\":{\"details\":\"Checks the retarget, the heights, and the linkage\",\"params\":{\"_headers\":\"A tightly-packed list of 80-byte Bitcoin headers\",\"_oldPeriodEndHeader\":\"The last header in the difficulty period being closed\",\"_oldPeriodStartHeader\":\"The first header in the difficulty period being closed\"},\"return\":\"True if successfully written, error otherwise\"},\"constructor\":{\"details\":\"We don't check this AT ALL really. Don't use relays with bad genesis\",\"params\":{\"_genesisHeader\":\"The starting header\",\"_height\":\"The starting height\",\"_periodStart\":\"The hash of the first header in the genesis epoch\"}},\"findAncestor(bytes32,uint256)\":{\"details\":\"Will fail if the header is unknown\",\"params\":{\"_digest\":\"The header digest to search for\"},\"return\":\"The height of the header, or error if unknown\"},\"findHeight(bytes32)\":{\"details\":\"Will fail if the header is unknown\",\"params\":{\"_digest\":\"The header digest to search for\"},\"return\":\"The height of the header, or error if unknown\"},\"getBestKnownDigest()\":{\"details\":\"This updated only by calling markNewHeaviest\",\"return\":\"The hash of the best marked chain tip\"},\"getCurrentEpochDifficulty()\":{\"details\":\"This is updated when a new heavist header has a new diff\",\"return\":\"The difficulty of the bestKnownDigest\"},\"getLastReorgCommonAncestor()\":{\"details\":\"This is updated only by calling markNewHeaviest\",\"return\":\"The hash of the shared ancestor of the most recent fork\"},\"getPrevEpochDifficulty()\":{\"details\":\"This is updated when a difficulty change is accepted\",\"return\":\"The difficulty of the previous epoch\"},\"getRelayGenesis()\":{\"details\":\"This is an initialization parameter\",\"return\":\"The hash of the first block of the relay\"},\"isAncestor(bytes32,bytes32,uint256)\":{\"details\":\"Limit the amount of lookups (and thus gas usage) with _limit\",\"params\":{\"_ancestor\":\"The prospective ancestor\",\"_descendant\":\"The descendant to check\",\"_limit\":\"The maximum number of blocks to check\"},\"return\":\"true if ancestor is at most limit blocks lower than descendant, otherwise false\"},\"markNewHeaviest(bytes32,bytes,bytes,uint256)\":{\"details\":\"We don't check this AT ALL really. Don't use relays with bad genesis\",\"params\":{\"_ancestor\":\"The digest of the most recent common ancestor\",\"_currentBest\":\"The 80-byte header referenced by bestKnownDigest\",\"_limit\":\"Limit the amount of traversal of the chain\",\"_newBest\":\"The 80-byte header to mark as the new best\"},\"return\":\"True if successfully updates bestKnownDigest, error otherwise\"}}},\"userdoc\":{\"methods\":{\"addHeaders(bytes,bytes)\":{\"notice\":\"Adds headers to storage after validating\"},\"addHeadersWithRetarget(bytes,bytes,bytes)\":{\"notice\":\"Adds headers to storage, performs additional validation of retarget\"},\"constructor\":\"Gives a starting point for the relay\",\"findAncestor(bytes32,uint256)\":{\"notice\":\"Finds an ancestor for a block by its digest\"},\"findHeight(bytes32)\":{\"notice\":\"Finds the height of a header by its digest\"},\"getBestKnownDigest()\":{\"notice\":\"Getter for bestKnownDigest\"},\"getCurrentEpochDifficulty()\":{\"notice\":\"Getter for currentEpochDiff\"},\"getLastReorgCommonAncestor()\":{\"notice\":\"Getter for relayGenesis\"},\"getPrevEpochDifficulty()\":{\"notice\":\"Getter for prevEpochDiff\"},\"getRelayGenesis()\":{\"notice\":\"Getter for relayGenesis\"},\"isAncestor(bytes32,bytes32,uint256)\":{\"notice\":\"Checks if a digest is an ancestor of the current one\"},\"markNewHeaviest(bytes32,bytes,bytes,uint256)\":{\"notice\":\"Gives a starting point for the relay\"}}}},\"settings\":{\"compilationTarget\":{\"@summa-tx/relay-sol/contracts/Relay.sol\":\"Relay\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol\":{\"keccak256\":\"0x461cc52e40ba53e646f5c9505b992baa3d5b3c98ae5718561e61b3bc6c726d52\",\"urls\":[\"bzz-raw://90cf2e608b660671642a616ec044e2a39e8ceb7079315b6133ec978c47af9f98\",\"dweb:/ipfs/QmX4hyYS99RYWiQ7BwLXuvQpU5x62YbjJWLgYFwrPkYbzT\"]},\"@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol\":{\"keccak256\":\"0x43451fdb4c4d55c01122411a4cf89a5c544c2bd4b646ee1d1f306626275324bf\",\"urls\":[\"bzz-raw://db93f07c32fa294d416aaab1b19a205772f2a3fa573fd380e5641e7770193ccf\",\"dweb:/ipfs/QmVE4y8cFKWZGKEfTM9Q3YreAArpMTTALHNr2tcvcNDnbi\"]},\"@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol\":{\"keccak256\":\"0x22d34c04c68c2a77ee83e2ef3756f6e6bad6ad675560d777e612315d7eb83935\",\"urls\":[\"bzz-raw://b642c61be1d34e153e4f9cc139291fa26f4ecf31a3acc5b960aad20f4f689eeb\",\"dweb:/ipfs/QmWADdVTCSyvtgb76AxFFkAr9h9jbY57Mj5X6xiEqCqmMu\"]},\"@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol\":{\"keccak256\":\"0x9af3b3f36de63e95977f09548617989e391b3c511cf0383ee35cefd5da7d3bfd\",\"urls\":[\"bzz-raw://97ce025c7d18540e4c24578db61cc5e33828be8e9a82b5cb5f46c99212f75ed1\",\"dweb:/ipfs/QmRrdWnd95rgCZzeaNiU4KUcGe1j7oDBj7LatpXhUmjbEE\"]},\"@summa-tx/relay-sol/contracts/Interfaces.sol\":{\"keccak256\":\"0x6f2698f8aab5cee319f36d69438b6870496a5523e7ccac4b465cdb38661242fa\",\"urls\":[\"bzz-raw://7f854c72db81631d1df800ae0c5fb0a50dc9efd97b0e6593b063c9fb1c61ef9e\",\"dweb:/ipfs/QmUMSQhzYKRSkLTGcHekjqvw1mLpeUULZkfffRdN521NBg\"]},\"@summa-tx/relay-sol/contracts/Relay.sol\":{\"keccak256\":\"0x4a6d12fa6570e2c787f9dc234edae9c1eb326e78eb2c6384c84d2b6ba0a0ad7e\",\"urls\":[\"bzz-raw://fa5365dc5a8312d0305568dbf297964be13567a7879395bfc3e99be2510e4e10\",\"dweb:/ipfs/QmfGZz6iL45xPcwQTT3XFAqb7McuY89niBEvfbhy513moF\"]}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b5060405162001ee238038062001ee2833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604090815260208201519101518451919350915060501462000142576040805162461bcd60e51b815260206004820152600f60248201526e29ba37b8103132b4b73390323ab6b160891b604482015290519081900360640190fd5b60006200015a846200021760201b62000f0c1760201c565b905062ffffff821615620001a05760405162461bcd60e51b815260040180806020018281038252603d81526020018062001ea5603d913960400191505060405180910390fd5b600081815560018290556002829055818152600460205260409020839055620001dc6107e08406846200035060201b620015a41790919060201c565b60046000848152602001908152602001600020819055506200020984620003ae60201b620014b71760201c565b600555506200062f92505050565b6000600280836040518082805190602001908083835b602083106200024e5780518252601f1990920191602091820191016200022d565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156200028e573d6000803e3d6000fd5b5050506040513d6020811015620002a457600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b60208310620002f25780518252601f199092019160209182019101620002d1565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa15801562000332573d6000803e3d6000fd5b5050506040513d60208110156200034857600080fd5b505192915050565b600082821115620003a8576040805162461bcd60e51b815260206004820152601d60248201527f556e646572666c6f7720647572696e67207375627472616374696f6e2e000000604482015290519081900360640190fd5b50900390565b6000620003d7620003c8836001600160e01b03620003dd16565b6001600160e01b036200045d16565b92915050565b60006060620003ff60486003856200047e60201b6200103d179092919060201c565b9050600083604b815181106200041157fe5b016020015160f81c905060006200044462000435846001600160e01b036200054916565b6001600160e01b03620005db16565b6002199290920160ff166101000a909102949350505050565b6000620003d78261ffff60d01b6200061b60201b6200165e1790919060201c565b6060816200049c575060408051602081019091526000815262000542565b8282018381118015620004b0575080855110155b62000502576040805162461bcd60e51b815260206004820152601360248201527f536c696365206f7574206f6620626f756e647300000000000000000000000000604482015290519081900360640190fd5b604051915082604083010160405282825283850182038460208701018481015b808210156200053d5781518383015260208201915062000522565b505050505b9392505050565b60608082516040519080825280601f01601f19166020018201604052801562000579576020820181803883390190505b50905060005b8351811015620005d4578381815181106200059657fe5b602001015160f81c60f81b826001838751030381518110620005b457fe5b60200101906001600160f81b031916908160001a9053506001016200057f565b5092915050565b600080805b8351811015620005d4578060010184510360080260020a8482815181106200060457fe5b016020015160f81c029190910190600101620005e0565b60008183816200062757fe5b049392505050565b611866806200063f6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370d53c181161007157806370d53c18146101f557806374c3a3a9146102165780637fa637fc146102db578063b985621a146103e9578063c58242cd14610412578063e3d8d8d81461041a576100b4565b8063113764be146100b95780631910d973146100d35780632b97be24146100db57806330017b3b146100e357806360b5c3901461010657806365da41b914610123575b600080fd5b6100c1610422565b60408051918252519081900360200190f35b6100c1610428565b6100c161042e565b6100c1600480360360408110156100f957600080fd5b5080359060200135610434565b6100c16004803603602081101561011c57600080fd5b5035610449565b6101e16004803603604081101561013957600080fd5b810190602081018135600160201b81111561015357600080fd5b82018360208201111561016557600080fd5b803590602001918460018302840111600160201b8311171561018657600080fd5b919390929091602081019035600160201b8111156101a357600080fd5b8201836020820111156101b557600080fd5b803590602001918460018302840111600160201b831117156101d657600080fd5b50909250905061045c565b604080519115158252519081900360200190f35b6101fd6104dc565b6040805163ffffffff9092168252519081900360200190f35b6101e16004803603608081101561022c57600080fd5b81359190810190604081016020820135600160201b81111561024d57600080fd5b82018360208201111561025f57600080fd5b803590602001918460018302840111600160201b8311171561028057600080fd5b919390929091602081019035600160201b81111561029d57600080fd5b8201836020820111156102af57600080fd5b803590602001918460018302840111600160201b831117156102d057600080fd5b9193509150356104e1565b6101e1600480360360608110156102f157600080fd5b810190602081018135600160201b81111561030b57600080fd5b82018360208201111561031d57600080fd5b803590602001918460018302840111600160201b8311171561033e57600080fd5b919390929091602081019035600160201b81111561035b57600080fd5b82018360208201111561036d57600080fd5b803590602001918460018302840111600160201b8311171561038e57600080fd5b919390929091602081019035600160201b8111156103ab57600080fd5b8201836020820111156103bd57600080fd5b803590602001918460018302840111600160201b831117156103de57600080fd5b509092509050610564565b6101e1600480360360608110156103ff57600080fd5b508035906020810135906040013561060d565b6100c1610624565b6100c161062a565b60055490565b60015490565b60065490565b60006104408383610630565b90505b92915050565b6000610454826106ac565b90505b919050565b60006104d185858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152925087915086908190840183828082843760009201829052509250610757915050565b90505b949350505050565b600481565b60006105598787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250889250610a4f915050565b979650505050505050565b600061055987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881529250889150879081908401838280828437600092019190915250610c4c92505050565b600061061a848484610e5f565b90505b9392505050565b60025490565b60005490565b600082815b8381101561066657600091825260036020526040909120549061065f81600163ffffffff610eb416565b9050610635565b5080610440576040805162461bcd60e51b815260206004820152601060248201526f2ab735b737bbb71030b731b2b9ba37b960811b604482015290519081900360640190fd5b60008082815b6005811015610719576000828152600460205260409020549250826106e7576000918252600360205260409091205490610701565b6106f7838263ffffffff610eb416565b9350505050610457565b61071281600163ffffffff610eb416565b90506106b2565b506040805162461bcd60e51b815260206004820152600d60248201526c556e6b6e6f776e20626c6f636b60981b604482015290519081900360640190fd5b600080606060008061076888610f0c565b905060006107866107818983605063ffffffff61103d16565b6110f7565b90506000610793836106ac565b905087806107a85750816107a68b6110f7565b145b6107e35760405162461bcd60e51b81526004018080602001828103825260248152602001806117be6024913960400191505060405180910390fd5b60508951816107ee57fe5b061561082b5760405162461bcd60e51b815260040180806020018281038252602b8152602001806116cb602b913960400191505060405180910390fd5b60005b60508a518161083957fe5b04811015610a0b5761086461085582605063ffffffff61115016565b8b90605063ffffffff61103d16565b9550610879826001830163ffffffff610eb416565b965061088486610f0c565b60008181526003602052604090205490955061094957826108cb6108c687604051602001808281526020019150506040516020818303038152906040526111c0565b61124d565b111561091e576040805162461bcd60e51b815260206004820152601b60248201527f48656164657220776f726b20697320696e73756666696369656e740000000000604482015290519081900360640190fd5b6000858152600360205260409020849055600487066109495760008581526004602052604090208790555b82610953876110f7565b146109a5576040805162461bcd60e51b815260206004820152601b60248201527f546172676574206368616e67656420756e65787065637465646c790000000000604482015290519081900360640190fd5b6109b5868563ffffffff61128a16565b6109f05760405162461bcd60e51b81526004018080602001828103825260268152602001806116726026913960400191505060405180910390fd5b849350610a0481600163ffffffff610eb416565b905061082e565b5083610a168b610f0c565b6040517ff90e4f1d9cd0dd55e339411cbc9b152482307c3a23ed64715e4a2858f641a3f590600090a35060019998505050505050505050565b60006107e0821115610a925760405162461bcd60e51b81526004018080602001828103825260338152602001806116986033913960400191505060405180910390fd5b6000610a9d84610f0c565b90506000610aaa86610f0c565b90506001548114610b02576040805162461bcd60e51b815260206004820181905260248201527f50617373656420696e2062657374206973206e6f742062657374206b6e6f776e604482015290519081900360640190fd5b600082815260036020526040902054610b58576040805162461bcd60e51b81526020600482015260136024820152722732bb903132b9ba1034b9903ab735b737bbb760691b604482015290519081900360640190fd5b610b668760015484876112bb565b610ba15760405162461bcd60e51b81526004018080602001828103825260298152602001806118096029913960400191505060405180910390fd5b81610bad88888861136c565b14610be95760405162461bcd60e51b815260040180806020018281038252603381526020018061175b6033913960400191505060405180910390fd5b600182905560028790556000610bfe866114b7565b90506005548114610c0f5760058190555b8783837f3cc13de64df0f0239626235c51a2da251bbc8c85664ecce39263da3ee03f606c60405160405180910390a4506001979650505050505050565b600080610c60610c5b86610f0c565b6106ac565b90506000610c70610c5b86610f0c565b90506107e081066107df14610cb65760405162461bcd60e51b815260040180806020018281038252603d81526020018061171e603d913960400191505060405180910390fd5b610cc8826107df63ffffffff610eb416565b8114610d055760405162461bcd60e51b81526004018080602001828103825260288152602001806116f66028913960400191505060405180910390fd5b610d0e856114b7565b610d17876114b7565b14610d535760405162461bcd60e51b81526004018080602001828103825260278152602001806117e26027913960400191505060405180910390fd5b6060610d68856000605063ffffffff61103d16565b90506000610d75826110f7565b90506000610da8610d858a6110f7565b610d8e8b6114ca565b63ffffffff16610d9d8b6114ca565b63ffffffff166114e0565b90508181831614610e00576040805162461bcd60e51b815260206004820152601960248201527f496e76616c69642072657461726765742070726f766964656400000000000000604482015290519081900360640190fd5b6000610e0b8a6114b7565b90508060065414158015610e3a5750610e376107e0610e2b6001546106ac565b9063ffffffff6115a416565b85115b15610e455760068190555b610e5189896001610757565b9a9950505050505050505050565b600082815b83811015610ea85785821415610e7f5760019250505061061d565b6000918252600360205260409091205490610ea181600163ffffffff610eb416565b9050610e64565b50600095945050505050565b81810182811015610443576040805162461bcd60e51b815260206004820152601960248201527f4f766572666c6f7720647572696e67206164646974696f6e2e00000000000000604482015290519081900360640190fd5b6000600280836040518082805190602001908083835b60208310610f415780518252601f199092019160209182019101610f22565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015610f80573d6000803e3d6000fd5b5050506040513d6020811015610f9557600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b60208310610fe15780518252601f199092019160209182019101610fc2565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611020573d6000803e3d6000fd5b5050506040513d602081101561103557600080fd5b505192915050565b606081611059575060408051602081019091526000815261061d565b828201838111801561106c575080855110155b6110b3576040805162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b604482015290519081900360640190fd5b604051915082604083010160405282825283850182038460208701018481015b808210156110ec578151838301526020820191506110d3565b505050509392505050565b6000606061110e836048600363ffffffff61103d16565b9050600083604b8151811061111f57fe5b016020015160f81c905060006111376108c6846111c0565b6002199290920160ff166101000a909102949350505050565b60008261115f57506000610443565b508181028183828161116d57fe5b0414610443576040805162461bcd60e51b815260206004820152601f60248201527f4f766572666c6f7720647572696e67206d756c7469706c69636174696f6e2e00604482015290519081900360640190fd5b60608082516040519080825280601f01601f1916602001820160405280156111ef576020820181803883390190505b50905060005b83518110156112465783818151811061120a57fe5b602001015160f81c60f81b82600183875103038151811061122757fe5b60200101906001600160f81b031916908160001a9053506001016111f5565b5092915050565b600080805b8351811015611246578060010184510360080260020a84828151811061127457fe5b016020015160f81c029190910190600101611252565b60008061129e61129985611601565b611616565b90508281146112b1576000915050610443565b5060019392505050565b600083851480156112cb57508285145b156112d8575060016104d4565b8383818160005b8681101561133357898314611301576000838152600360205260409020549294505b89821461131b576000828152600360205260409020549193505b61132c81600163ffffffff610eb416565b90506112df565b50828414156113495760009450505050506104d4565b80821461135d5760009450505050506104d4565b50600198975050505050505050565b600080611378856106ac565b90506000611388610c5b86610f0c565b90506000611398610c5b86610f0c565b90508282101580156113aa5750828110155b6113e55760405162461bcd60e51b815260040180806020018281038252603081526020018061178e6030913960400191505060405180910390fd5b60006114016107e08506610e2b866107e063ffffffff610eb416565b90508083108183108115826114135750805b1561142e5761142189610f0c565b965050505050505061061d565b818015611439575080155b156114475761142188610f0c565b8180156114515750805b15611475578385101561146c5761146788610f0c565b611421565b61142189610f0c565b611493611481896114b7565b6107e0865b069063ffffffff61115016565b6114a861149f8b6114b7565b6107e088611486565b101561146c5761142188610f0c565b60006104546114c5836110f7565b611632565b60006104546108c66114db84611649565b6111c0565b6000806114f3838563ffffffff6115a416565b905061150962127500600463ffffffff61165e16565b8110156115275761152462127500600463ffffffff61165e16565b90505b61153b62127500600463ffffffff61115016565b8111156115595761155662127500600463ffffffff61115016565b90505b600061157e82611572886201000063ffffffff61165e16565b9063ffffffff61115016565b905061159a62010000611572836212750063ffffffff61165e16565b9695505050505050565b6000828211156115fb576040805162461bcd60e51b815260206004820152601d60248201527f556e646572666c6f7720647572696e67207375627472616374696f6e2e000000604482015290519081900360640190fd5b50900390565b6060610454826004602063ffffffff61103d16565b600081516000141561162a57506000610457565b506020015190565b600061045461ffff60d01b8363ffffffff61165e16565b6060610454826044600463ffffffff61103d16565b600081838161166957fe5b04939250505056fe4865616465727320646f206e6f7420666f726d206120636f6e73697374656e7420636861696e526571756573746564206c696d69742069732067726561746572207468616e203120646966666963756c747920706572696f64486561646572206172726179206c656e677468206d75737420626520646976697369626c652062792038304d7573742070726f766964652065786163746c79203120646966666963756c747920706572696f644d7573742070726f7669646520746865206c61737420686561646572206f662074686520636c6f73696e6720646966666963756c747920706572696f644e65772062657374206861736820646f6573206e6f742068617665206d6f726520776f726b207468616e2070726576696f7573412064657363656e64616e74206865696768742069732062656c6f772074686520616e636573746f7220686569676874556e6578706563746564207265746172676574206f6e2065787465726e616c2063616c6c506572696f642068656164657220646966666963756c7469657320646f206e6f74206d61746368416e636573746f72206d75737420626520686561766965737420636f6d6d6f6e20616e636573746f72a265627a7a72315820e0a3ee16eb326c412f32b2af58902e4a254709fe898305b89bb3eddbffc8f69e64736f6c63430005110032506572696f64207374617274206861736820646f6573206e6f74206861766520776f726b2e2048696e743a2077726f6e672062797465206f726465723f",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370d53c181161007157806370d53c18146101f557806374c3a3a9146102165780637fa637fc146102db578063b985621a146103e9578063c58242cd14610412578063e3d8d8d81461041a576100b4565b8063113764be146100b95780631910d973146100d35780632b97be24146100db57806330017b3b146100e357806360b5c3901461010657806365da41b914610123575b600080fd5b6100c1610422565b60408051918252519081900360200190f35b6100c1610428565b6100c161042e565b6100c1600480360360408110156100f957600080fd5b5080359060200135610434565b6100c16004803603602081101561011c57600080fd5b5035610449565b6101e16004803603604081101561013957600080fd5b810190602081018135600160201b81111561015357600080fd5b82018360208201111561016557600080fd5b803590602001918460018302840111600160201b8311171561018657600080fd5b919390929091602081019035600160201b8111156101a357600080fd5b8201836020820111156101b557600080fd5b803590602001918460018302840111600160201b831117156101d657600080fd5b50909250905061045c565b604080519115158252519081900360200190f35b6101fd6104dc565b6040805163ffffffff9092168252519081900360200190f35b6101e16004803603608081101561022c57600080fd5b81359190810190604081016020820135600160201b81111561024d57600080fd5b82018360208201111561025f57600080fd5b803590602001918460018302840111600160201b8311171561028057600080fd5b919390929091602081019035600160201b81111561029d57600080fd5b8201836020820111156102af57600080fd5b803590602001918460018302840111600160201b831117156102d057600080fd5b9193509150356104e1565b6101e1600480360360608110156102f157600080fd5b810190602081018135600160201b81111561030b57600080fd5b82018360208201111561031d57600080fd5b803590602001918460018302840111600160201b8311171561033e57600080fd5b919390929091602081019035600160201b81111561035b57600080fd5b82018360208201111561036d57600080fd5b803590602001918460018302840111600160201b8311171561038e57600080fd5b919390929091602081019035600160201b8111156103ab57600080fd5b8201836020820111156103bd57600080fd5b803590602001918460018302840111600160201b831117156103de57600080fd5b509092509050610564565b6101e1600480360360608110156103ff57600080fd5b508035906020810135906040013561060d565b6100c1610624565b6100c161062a565b60055490565b60015490565b60065490565b60006104408383610630565b90505b92915050565b6000610454826106ac565b90505b919050565b60006104d185858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152925087915086908190840183828082843760009201829052509250610757915050565b90505b949350505050565b600481565b60006105598787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250889250610a4f915050565b979650505050505050565b600061055987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881529250889150879081908401838280828437600092019190915250610c4c92505050565b600061061a848484610e5f565b90505b9392505050565b60025490565b60005490565b600082815b8381101561066657600091825260036020526040909120549061065f81600163ffffffff610eb416565b9050610635565b5080610440576040805162461bcd60e51b815260206004820152601060248201526f2ab735b737bbb71030b731b2b9ba37b960811b604482015290519081900360640190fd5b60008082815b6005811015610719576000828152600460205260409020549250826106e7576000918252600360205260409091205490610701565b6106f7838263ffffffff610eb416565b9350505050610457565b61071281600163ffffffff610eb416565b90506106b2565b506040805162461bcd60e51b815260206004820152600d60248201526c556e6b6e6f776e20626c6f636b60981b604482015290519081900360640190fd5b600080606060008061076888610f0c565b905060006107866107818983605063ffffffff61103d16565b6110f7565b90506000610793836106ac565b905087806107a85750816107a68b6110f7565b145b6107e35760405162461bcd60e51b81526004018080602001828103825260248152602001806117be6024913960400191505060405180910390fd5b60508951816107ee57fe5b061561082b5760405162461bcd60e51b815260040180806020018281038252602b8152602001806116cb602b913960400191505060405180910390fd5b60005b60508a518161083957fe5b04811015610a0b5761086461085582605063ffffffff61115016565b8b90605063ffffffff61103d16565b9550610879826001830163ffffffff610eb416565b965061088486610f0c565b60008181526003602052604090205490955061094957826108cb6108c687604051602001808281526020019150506040516020818303038152906040526111c0565b61124d565b111561091e576040805162461bcd60e51b815260206004820152601b60248201527f48656164657220776f726b20697320696e73756666696369656e740000000000604482015290519081900360640190fd5b6000858152600360205260409020849055600487066109495760008581526004602052604090208790555b82610953876110f7565b146109a5576040805162461bcd60e51b815260206004820152601b60248201527f546172676574206368616e67656420756e65787065637465646c790000000000604482015290519081900360640190fd5b6109b5868563ffffffff61128a16565b6109f05760405162461bcd60e51b81526004018080602001828103825260268152602001806116726026913960400191505060405180910390fd5b849350610a0481600163ffffffff610eb416565b905061082e565b5083610a168b610f0c565b6040517ff90e4f1d9cd0dd55e339411cbc9b152482307c3a23ed64715e4a2858f641a3f590600090a35060019998505050505050505050565b60006107e0821115610a925760405162461bcd60e51b81526004018080602001828103825260338152602001806116986033913960400191505060405180910390fd5b6000610a9d84610f0c565b90506000610aaa86610f0c565b90506001548114610b02576040805162461bcd60e51b815260206004820181905260248201527f50617373656420696e2062657374206973206e6f742062657374206b6e6f776e604482015290519081900360640190fd5b600082815260036020526040902054610b58576040805162461bcd60e51b81526020600482015260136024820152722732bb903132b9ba1034b9903ab735b737bbb760691b604482015290519081900360640190fd5b610b668760015484876112bb565b610ba15760405162461bcd60e51b81526004018080602001828103825260298152602001806118096029913960400191505060405180910390fd5b81610bad88888861136c565b14610be95760405162461bcd60e51b815260040180806020018281038252603381526020018061175b6033913960400191505060405180910390fd5b600182905560028790556000610bfe866114b7565b90506005548114610c0f5760058190555b8783837f3cc13de64df0f0239626235c51a2da251bbc8c85664ecce39263da3ee03f606c60405160405180910390a4506001979650505050505050565b600080610c60610c5b86610f0c565b6106ac565b90506000610c70610c5b86610f0c565b90506107e081066107df14610cb65760405162461bcd60e51b815260040180806020018281038252603d81526020018061171e603d913960400191505060405180910390fd5b610cc8826107df63ffffffff610eb416565b8114610d055760405162461bcd60e51b81526004018080602001828103825260288152602001806116f66028913960400191505060405180910390fd5b610d0e856114b7565b610d17876114b7565b14610d535760405162461bcd60e51b81526004018080602001828103825260278152602001806117e26027913960400191505060405180910390fd5b6060610d68856000605063ffffffff61103d16565b90506000610d75826110f7565b90506000610da8610d858a6110f7565b610d8e8b6114ca565b63ffffffff16610d9d8b6114ca565b63ffffffff166114e0565b90508181831614610e00576040805162461bcd60e51b815260206004820152601960248201527f496e76616c69642072657461726765742070726f766964656400000000000000604482015290519081900360640190fd5b6000610e0b8a6114b7565b90508060065414158015610e3a5750610e376107e0610e2b6001546106ac565b9063ffffffff6115a416565b85115b15610e455760068190555b610e5189896001610757565b9a9950505050505050505050565b600082815b83811015610ea85785821415610e7f5760019250505061061d565b6000918252600360205260409091205490610ea181600163ffffffff610eb416565b9050610e64565b50600095945050505050565b81810182811015610443576040805162461bcd60e51b815260206004820152601960248201527f4f766572666c6f7720647572696e67206164646974696f6e2e00000000000000604482015290519081900360640190fd5b6000600280836040518082805190602001908083835b60208310610f415780518252601f199092019160209182019101610f22565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015610f80573d6000803e3d6000fd5b5050506040513d6020811015610f9557600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b60208310610fe15780518252601f199092019160209182019101610fc2565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611020573d6000803e3d6000fd5b5050506040513d602081101561103557600080fd5b505192915050565b606081611059575060408051602081019091526000815261061d565b828201838111801561106c575080855110155b6110b3576040805162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b604482015290519081900360640190fd5b604051915082604083010160405282825283850182038460208701018481015b808210156110ec578151838301526020820191506110d3565b505050509392505050565b6000606061110e836048600363ffffffff61103d16565b9050600083604b8151811061111f57fe5b016020015160f81c905060006111376108c6846111c0565b6002199290920160ff166101000a909102949350505050565b60008261115f57506000610443565b508181028183828161116d57fe5b0414610443576040805162461bcd60e51b815260206004820152601f60248201527f4f766572666c6f7720647572696e67206d756c7469706c69636174696f6e2e00604482015290519081900360640190fd5b60608082516040519080825280601f01601f1916602001820160405280156111ef576020820181803883390190505b50905060005b83518110156112465783818151811061120a57fe5b602001015160f81c60f81b82600183875103038151811061122757fe5b60200101906001600160f81b031916908160001a9053506001016111f5565b5092915050565b600080805b8351811015611246578060010184510360080260020a84828151811061127457fe5b016020015160f81c029190910190600101611252565b60008061129e61129985611601565b611616565b90508281146112b1576000915050610443565b5060019392505050565b600083851480156112cb57508285145b156112d8575060016104d4565b8383818160005b8681101561133357898314611301576000838152600360205260409020549294505b89821461131b576000828152600360205260409020549193505b61132c81600163ffffffff610eb416565b90506112df565b50828414156113495760009450505050506104d4565b80821461135d5760009450505050506104d4565b50600198975050505050505050565b600080611378856106ac565b90506000611388610c5b86610f0c565b90506000611398610c5b86610f0c565b90508282101580156113aa5750828110155b6113e55760405162461bcd60e51b815260040180806020018281038252603081526020018061178e6030913960400191505060405180910390fd5b60006114016107e08506610e2b866107e063ffffffff610eb416565b90508083108183108115826114135750805b1561142e5761142189610f0c565b965050505050505061061d565b818015611439575080155b156114475761142188610f0c565b8180156114515750805b15611475578385101561146c5761146788610f0c565b611421565b61142189610f0c565b611493611481896114b7565b6107e0865b069063ffffffff61115016565b6114a861149f8b6114b7565b6107e088611486565b101561146c5761142188610f0c565b60006104546114c5836110f7565b611632565b60006104546108c66114db84611649565b6111c0565b6000806114f3838563ffffffff6115a416565b905061150962127500600463ffffffff61165e16565b8110156115275761152462127500600463ffffffff61165e16565b90505b61153b62127500600463ffffffff61115016565b8111156115595761155662127500600463ffffffff61115016565b90505b600061157e82611572886201000063ffffffff61165e16565b9063ffffffff61115016565b905061159a62010000611572836212750063ffffffff61165e16565b9695505050505050565b6000828211156115fb576040805162461bcd60e51b815260206004820152601d60248201527f556e646572666c6f7720647572696e67207375627472616374696f6e2e000000604482015290519081900360640190fd5b50900390565b6060610454826004602063ffffffff61103d16565b600081516000141561162a57506000610457565b506020015190565b600061045461ffff60d01b8363ffffffff61165e16565b6060610454826044600463ffffffff61103d16565b600081838161166957fe5b04939250505056fe4865616465727320646f206e6f7420666f726d206120636f6e73697374656e7420636861696e526571756573746564206c696d69742069732067726561746572207468616e203120646966666963756c747920706572696f64486561646572206172726179206c656e677468206d75737420626520646976697369626c652062792038304d7573742070726f766964652065786163746c79203120646966666963756c747920706572696f644d7573742070726f7669646520746865206c61737420686561646572206f662074686520636c6f73696e6720646966666963756c747920706572696f644e65772062657374206861736820646f6573206e6f742068617665206d6f726520776f726b207468616e2070726576696f7573412064657363656e64616e74206865696768742069732062656c6f772074686520616e636573746f7220686569676874556e6578706563746564207265746172676574206f6e2065787465726e616c2063616c6c506572696f642068656164657220646966666963756c7469657320646f206e6f74206d61746368416e636573746f72206d75737420626520686561766965737420636f6d6d6f6e20616e636573746f72a265627a7a72315820e0a3ee16eb326c412f32b2af58902e4a254709fe898305b89bb3eddbffc8f69e64736f6c63430005110032",
  "sourceMap": "436:19817:55:-;;;1428:740;8:9:-1;5:2;;;30:1;27;20:12;5:2;1428:740:55;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1428:740:55;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;1428:740:55;;420:4:-1;411:14;;;;1428:740:55;;;;;411:14:-1;1428:740:55;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1428:740:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1428:740:55;;;;;;;;;;;1533:21;;1428:740;;-1:-1:-1;1428:740:55;-1:-1:-1;1558:2:55;1533:27;1525:55;;;;;-1:-1:-1;;;1525:55:55;;;;;;;;;;;;-1:-1:-1;;;1525:55:55;;;;;;;;;;;;;;;1590:22;1615:24;:14;:22;;;;;:24;;:::i;:::-;1590:49;-1:-1:-1;1694:66:55;1671:90;;:104;1650:203;;;;-1:-1:-1;;;1650:203:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1864:12;:29;;;1903:15;:32;;;1945:23;:40;;;1995:27;;;:11;:27;;;;;:37;;;2070:27;2092:4;2025:7;2082:14;2070:7;:11;;;;;;:27;;;;:::i;:::-;2042:11;:25;2054:12;2042:25;;;;;;;;;;;:55;;;;2127:34;:14;:32;;;;;:34;;:::i;:::-;2108:16;:53;-1:-1:-1;436:19817:55;;-1:-1:-1;;;436:19817:55;5703:126:48;5760:7;5786:36;5810:10;5817:2;5810:10;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;5810:10:48;;;;;;;-1:-1:-1;263:2;;-1:-1;;5810:10:48;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5810:10:48;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5810:10:48;5793:28;;;5810:10;5793:28;;;;;;;;;26:21:-1;;;22:32;;6:49;;5793:28:48;;;;;;;5786:36;;5793:28;;;;5786:36;;;;;5793:28;5786:36;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;5786:36:48;;;;;;;-1:-1:-1;263:2;;-1:-1;;5786:36:48;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5786:36:48;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5786:36:48;;5703:126;-1:-1:-1;;5703:126:48:o;2288:160:51:-;2348:7;2381:2;2375;:8;;2367:50;;;;;-1:-1:-1;;;2367:50:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2434:7:51;;;2288:160::o;24914:148:48:-;24986:7;25012:43;25032:22;25046:7;-1:-1:-1;;;;;25032:13:48;:22;:::i;:::-;-1:-1:-1;;;;;25012:19:48;:43;:::i;:::-;25005:50;24914:148;-1:-1:-1;;24914:148:48:o;22696:316::-;22764:7;22783:15;22801:20;22815:2;22819:1;22801:7;:13;;;;;;:20;;;;;:::i;:::-;22783:38;;22831:8;22848:7;22856:2;22848:11;;;;;;;;;;;;;;;-1:-1:-1;22870:17:48;22890:34;22902:21;22920:2;-1:-1:-1;;;;;22902:17:48;:21;:::i;:::-;-1:-1:-1;;;;;22890:11:48;:34;:::i;:::-;-1:-1:-1;;22951:6:48;;;;22934:23;;22988:3;:16;22975:30;;;;22696:316;-1:-1:-1;;;;22696:316:48:o;23392:178::-;23461:7;23538:25;23555:7;-1:-1:-1;;;23538:16:48;;;;;;:25;;;;:::i;10345:924:49:-;10432:16;10464:12;10460:55;;-1:-1:-1;10492:12:49;;;;;;;;;-1:-1:-1;10492:12:49;;;;10460:55;10536:16;;;10570:13;;;:38;;;;;10604:4;10587:6;:13;:21;;10570:38;10562:70;;;;;-1:-1:-1;;;10562:70:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;10769:4;10763:11;10756:18;;10818:7;10813:2;10808:3;10804:12;10800:26;10794:4;10787:40;10852:7;10847:3;10840:20;10979:6;10971;10967:19;10962:3;10958:29;11055:6;11050:2;11042:6;11038:15;11034:28;11099:7;11094:3;11090:17;11001:252;11130:3;11125;11122:12;11001:252;;;11234:3;11228:10;11221:4;11216:3;11212:14;11205:34;11169:2;11164:3;11160:12;11153:19;;11001:252;;;11005:116;;10652:611;;;;;;;;:::o;2548:278:48:-;2615:12;2639:22;2674:2;:9;2664:20;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;2664:20:48;87:34:-1;135:17;;-1:-1;2664:20:48;-1:-1:-1;2639:45:48;-1:-1:-1;2700:6:48;2695:98;2716:2;:9;2712:1;:13;2695:98;;;2777:2;2780:1;2777:5;;;;;;;;;;;;;;;;2746:9;2772:1;2768;2756:2;:9;:13;:17;2746:28;;;;;;;;;;;:36;-1:-1:-1;;;;;2746:36:48;;;;;;;;-1:-1:-1;2727:3:48;;2695:98;;;-1:-1:-1;2810:9:48;2548:278;-1:-1:-1;;2548:278:48:o;4382:268::-;4443:7;;;4488:131;4509:2;:9;4505:1;:13;4488:131;;;4599:1;4603;4599:5;4586:2;:9;:19;4581:1;:25;4575:1;:32;4565:2;4568:1;4565:5;;;;;;;;;;;;;;4559:49;4549:59;;;;;4520:3;;4488:131;;1865:301:51;1925:7;2157:2;2152;:7;;;;;;;1865:301;-1:-1:-1;;;1865:301:51:o;436:19817:55:-;;;;;;;",
  "deployedSourceMap": "436:19817:55:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;436:19817:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2357:109;;;:::i;:::-;;;;;;;;;;;;;;;;3185:99;;;:::i;2646:103::-;;;:::i;4223:143::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4223:143:55;;;;;;;:::i;3851:113::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3851:113:55;;:::i;5378:154::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5378:154:55;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5378:154:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5378:154:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;5378:154:55;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;5378:154:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5378:154:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;5378:154:55;;-1:-1:-1;5378:154:55;-1:-1:-1;5378:154:55;:::i;:::-;;;;;;;;;;;;;;;;;;704:42;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6967:259;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;6967:259:55;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6967:259:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6967:259:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6967:259:55;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6967:259:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6967:259:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6967:259:55;;-1:-1:-1;6967:259:55;-1:-1:-1;6967:259:55;;:::i;6088:286::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6088:286:55;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6088:286:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6088:286:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6088:286:55;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6088:286:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6088:286:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6088:286:55;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6088:286:55;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6088:286:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;6088:286:55;;-1:-1:-1;6088:286:55;-1:-1:-1;6088:286:55;:::i;4821:172::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4821:172:55;;;;;;;;;;;;:::i;3478:115::-;;;:::i;2916:93::-;;;:::i;2357:109::-;2443:16;;2357:109;:::o;3185:99::-;3262:15;;3185:99;:::o;2646:103::-;2729:13;;2646:103;:::o;4223:143::-;4302:7;4328:31;4342:7;4351;4328:13;:31::i;:::-;4321:38;;4223:143;;;;;:::o;3851:113::-;3911:7;3937:20;3949:7;3937:11;:20::i;:::-;3930:27;;3851:113;;;;:::o;5378:154::-;5465:4;5488:37;5500:7;;5488:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;5488:37:55;;;;137:4:-1;5488:37:55;;;;;;;;;;;;;;;;;;-1:-1:-1;5509:8:55;;-1:-1:-1;5509:8:55;;;;5488:37;;5509:8;;;;5488:37;1:33:-1;99:1;81:16;;74:27;;;-1:-1;99:1;-1:-1;5488:11:55;;-1:-1:-1;;5488:37:55:i;:::-;5481:44;;5378:154;;;;;;;:::o;704:42::-;745:1;704:42;:::o;6967:259::-;7137:4;7160:59;7177:9;7188:12;;7160:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;7160:59:55;;;;137:4:-1;7160:59:55;;;;;;;;;;;;;;;;;;-1:-1:-1;7202:8:55;;-1:-1:-1;7202:8:55;;;;7160:59;;7202:8;;;;7160:59;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;7212:6:55;;-1:-1:-1;7160:16:55;;-1:-1:-1;;7160:59:55:i;:::-;7153:66;6967:259;-1:-1:-1;;;;;;;6967:259:55:o;6088:286::-;6267:4;6290:77;6314:21;;6290:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;6290:77:55;;;;137:4:-1;6290:77:55;;;;;;;;;;;;;;;;;;-1:-1:-1;6337:19:55;;-1:-1:-1;6337:19:55;;;;6290:77;;6337:19;;;;6290:77;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;;6290:77:55;;;;137:4:-1;6290:77:55;;;;;;;;;;;;;;;;;;-1:-1:-1;6358:8:55;;-1:-1:-1;6358:8:55;;;;6290:77;;6358:8;;;;6290:77;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;6290:23:55;;-1:-1:-1;;;6290:77:55:i;4821:172::-;4920:4;4943:43;4955:9;4966:11;4979:6;4943:11;:43::i;:::-;4936:50;;4821:172;;;;;;:::o;3478:115::-;3563:23;;3478:115;:::o;2916:93::-;2964:7;2990:12;2916:93;:::o;13510:333::-;13590:7;13628;13590;13645:106;13669:7;13665:1;:11;13645:106;;;13717:23;;;;:13;:23;;;;;;;;13682:8;:1;13688;13682:8;:5;:8;:::i;:::-;13678:12;;13645:106;;;-1:-1:-1;13768:22:55;13760:51;;;;;-1:-1:-1;;;13760:51:55;;;;;;;;;;;;-1:-1:-1;;;13760:51:55;;;;;;;;;;;;;;12794:457;12855:7;;12922;12855;12939:273;12963:19;12959:23;;12939:273;;;13022:21;;;;:11;:21;;;;;;;-1:-1:-1;13061:12:55;13057:145;;13104:23;;;;:13;:23;;;;;;;;13057:145;;;13173:14;:7;13185:1;13173:14;:11;:14;:::i;:::-;13166:21;;;;;;;13057:145;12988:8;:1;12994;12988:8;:5;:8;:::i;:::-;12984:12;;12939:273;;;-1:-1:-1;13221:23:55;;;-1:-1:-1;;;13221:23:55;;;;;;;;;;;;-1:-1:-1;;;13221:23:55;;;;;;;;;;;;;;7724:2282;7824:4;7840:15;7865:20;7895:22;7927:23;7953:17;:7;:15;:17::i;:::-;7927:43;-1:-1:-1;7981:15:55;7999:37;:21;:8;7981:15;8017:2;7999:21;:14;:21;:::i;:::-;:35;:37::i;:::-;7981:55;;8046:21;8070:28;8082:15;8070:11;:28::i;:::-;8046:52;;8159:9;:47;;;;8199:7;8172:23;:7;:21;:23::i;:::-;:34;8159:47;8138:121;;;;-1:-1:-1;;;8138:121:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8295:2;8277:8;:15;:20;;;;;;:25;8269:81;;;;-1:-1:-1;;;8269:81:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8605:9;8600:1294;8642:2;8624:8;:15;:20;;;;;;8620:1;:24;8600:1294;;;8684:29;8699:9;:1;8705:2;8699:9;:5;:9;:::i;:::-;8684:8;;8710:2;8684:29;:14;:29;:::i;:::-;8674:39;-1:-1:-1;8737:24:55;:13;8759:1;8755:5;;8737:24;:17;:24;:::i;:::-;8727:34;;8792:17;:7;:15;:17::i;:::-;9051:1;9010:29;;;:13;:29;;;;;;8775:34;;-1:-1:-1;9006:560:55;;9172:7;9102:66;:52;9119:14;9102:32;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;9102:32:55;;;:50;:52::i;:::-;:64;:66::i;:::-;:77;;9073:158;;;;;-1:-1:-1;;;9073:158:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;9249:29;;;;:13;:29;;;;;:47;;;745:1;9318:7;:25;9314:238;;9496:27;;;;:11;:27;;;;;:37;;;9314:238;9685:7;9658:23;:7;:21;:23::i;:::-;:34;9650:74;;;;;-1:-1:-1;;;9650:74:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;9746:47;:7;9777:15;9746:47;:30;:47;:::i;:::-;9738:98;;;;-1:-1:-1;;;9738:98:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9869:14;;-1:-1:-1;8650:8:55;:1;8656;8650:8;:5;:8;:::i;:::-;8646:12;;8600:1294;;;;9963:14;9932:17;:7;:15;:17::i;:::-;9909:69;;;;;;;-1:-1:-1;9995:4:55;;7724:2282;-1:-1:-1;;;;;;;;;7724:2282:55:o;15224:1287::-;15391:4;15425;15415:6;:14;;15407:78;;;;-1:-1:-1;;;15407:78:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15495:22;15520:18;:8;:16;:18::i;:::-;15495:43;;15548:26;15577:22;:12;:20;:22::i;:::-;15548:51;;15639:15;;15617:18;:37;15609:82;;;;;-1:-1:-1;;;15609:82:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15763:1;15722:29;;;:13;:29;;;;;;15701:100;;;;;-1:-1:-1;;;15701:100:55;;;;;;;;;;;;-1:-1:-1;;;15701:100:55;;;;;;;;;;;;;;;15832:73;15854:9;15865:15;;15882:14;15898:6;15832:21;:73::i;:::-;15811:152;;;;-1:-1:-1;;;15811:152:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16054:14;15994:56;16016:9;16027:12;16041:8;15994:21;:56::i;:::-;:74;15973:163;;;;-1:-1:-1;;;15973:163:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16147:15;:32;;;16189:23;:35;;;-1:-1:-1;16254:28:55;:8;:26;:28::i;:::-;16235:47;;16308:16;;16296:8;:28;16292:86;;16340:16;:27;;;16292:86;16473:9;16445:14;16413:18;16393:90;;;;;;;;;;-1:-1:-1;16500:4:55;;15224:1287;-1:-1:-1;;;;;;;15224:1287:55:o;10562:1995::-;10736:4;10806:20;10829:44;10841:31;:21;:29;:31::i;:::-;10829:11;:44::i;:::-;10806:67;;10883:18;10904:42;10916:29;:19;:27;:29::i;10904:42::-;10883:63;-1:-1:-1;11057:4:55;10883:63;11044:17;11065:4;11044:25;11023:124;;;;-1:-1:-1;;;11023:124:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11192:22;:12;11209:4;11192:22;:16;:22;:::i;:::-;11178:10;:36;11157:114;;;;-1:-1:-1;;;11157:114:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11347:39;:19;:37;:39::i;:::-;11302:41;:21;:39;:41::i;:::-;:84;11281:161;;;;-1:-1:-1;;;11281:161:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11547:28;11578:21;:8;11593:1;11596:2;11578:21;:14;:21;:::i;:::-;11547:52;;11609:21;11633:31;:15;:29;:31::i;:::-;11609:55;;11674:23;11700:193;11740:37;:21;:35;:37::i;:::-;11791:40;:21;:38;:40::i;:::-;11700:193;;11845:38;:19;:36;:38::i;:::-;11700:193;;:26;:193::i;:::-;11674:219;;11961:13;11941:15;11925:13;:31;11924:50;11903:113;;;;;-1:-1:-1;;;11903:113:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;12226:16;12245:41;:21;:39;:41::i;:::-;12226:60;;12317:8;12300:13;;:25;;:80;;;;;12342:38;12375:4;12342:28;12354:15;;12342:11;:28::i;:::-;:32;:38;:32;:38;:::i;:::-;12329:10;:51;12300:80;12296:135;;;12396:13;:24;;;12296:135;12502:48;12514:19;12535:8;12545:4;12502:11;:48::i;:::-;12495:55;10562:1995;-1:-1:-1;;;;;;;;;;10562:1995:55:o;14298:438::-;14398:4;14433:11;14398:4;14519:189;14543:6;14539:1;:10;14519:189;;;14595:9;14583:8;:21;14579:71;;;14631:4;14624:11;;;;;;14579:71;14674:23;;;;:13;:23;;;;;;;;14555:8;:1;14561;14555:8;:5;:8;:::i;:::-;14551:12;;14519:189;;;-1:-1:-1;14724:5:55;;14298:438;-1:-1:-1;;;;;14298:438:55:o;2520:172:51:-;2605:7;;;2630;;;;2622:45;;;;;-1:-1:-1;;;2622:45:51;;;;;;;;;;;;;;;;;;;;;;;;;;;5703:126:48;5760:7;5786:36;5810:10;5817:2;5810:10;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;5810:10:48;;;;;;;-1:-1:-1;263:2;;-1:-1;;5810:10:48;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5810:10:48;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5810:10:48;5793:28;;;5810:10;5793:28;;;;;;;;;26:21:-1;;;22:32;;6:49;;5793:28:48;;;;;;;5786:36;;5793:28;;;;5786:36;;;;;5793:28;5786:36;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;5786:36:48;;;;;;;-1:-1:-1;263:2;;-1:-1;;5786:36:48;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5786:36:48;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5786:36:48;;5703:126;-1:-1:-1;;5703:126:48:o;10345:924:49:-;10432:16;10464:12;10460:55;;-1:-1:-1;10492:12:49;;;;;;;;;-1:-1:-1;10492:12:49;;;;10460:55;10536:16;;;10570:13;;;:38;;;;;10604:4;10587:6;:13;:21;;10570:38;10562:70;;;;;-1:-1:-1;;;10562:70:49;;;;;;;;;;;;-1:-1:-1;;;10562:70:49;;;;;;;;;;;;;;;10769:4;10763:11;10756:18;;10818:7;10813:2;10808:3;10804:12;10800:26;10794:4;10787:40;10852:7;10847:3;10840:20;10979:6;10971;10967:19;10962:3;10958:29;11055:6;11050:2;11042:6;11038:15;11034:28;11099:7;11094:3;11090:17;11001:252;11130:3;11125;11122:12;11001:252;;;11234:3;11228:10;11221:4;11216:3;11212:14;11205:34;11169:2;11164:3;11160:12;11153:19;;11001:252;;;11005:116;;10652:611;;;;;;;:::o;22696:316:48:-;22764:7;22783:15;22801:20;:7;22815:2;22819:1;22801:20;:13;:20;:::i;:::-;22783:38;;22831:8;22848:7;22856:2;22848:11;;;;;;;;;;;;;;;-1:-1:-1;22870:17:48;22890:34;22902:21;22920:2;22902:17;:21::i;22890:34::-;-1:-1:-1;;22951:6:48;;;;22934:23;;22988:3;:16;22975:30;;;;22696:316;-1:-1:-1;;;;22696:316:48:o;1317:456:51:-;1377:9;1619:7;1615:46;;-1:-1:-1;1649:1:51;1642:8;;1615:46;-1:-1:-1;1675:7:51;;;1680:2;1675;:7;:2;1700:6;;;;;:12;1692:56;;;;;-1:-1:-1;;;1692:56:51;;;;;;;;;;;;;;;;;;;;;;;;;;;2548:278:48;2615:12;2639:22;2674:2;:9;2664:20;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;2664:20:48;87:34:-1;135:17;;-1:-1;2664:20:48;-1:-1:-1;2639:45:48;-1:-1:-1;2700:6:48;2695:98;2716:2;:9;2712:1;:13;2695:98;;;2777:2;2780:1;2777:5;;;;;;;;;;;;;;;;2746:9;2772:1;2768;2756:2;:9;:13;:17;2746:28;;;;;;;;;;;:36;-1:-1:-1;;;;;2746:36:48;;;;;;;;-1:-1:-1;2727:3:48;;2695:98;;;-1:-1:-1;2810:9:48;2548:278;-1:-1:-1;;2548:278:48:o;4382:268::-;4443:7;;;4488:131;4509:2;:9;4505:1;:13;4488:131;;;4599:1;4603;4599:5;4586:2;:9;:19;4581:1;:25;4575:1;:32;4565:2;4568:1;4565:5;;;;;;;;;;;;;;4559:49;4549:59;;;;;4520:3;;4488:131;;5322:391:52;5426:4;5489:17;5509:40;:28;:7;:26;:28::i;:::-;:38;:40::i;:::-;5489:60;;5651:17;5638:9;:30;5634:51;;5678:5;5671:12;;;;;5634:51;-1:-1:-1;5702:4:52;;5322:391;-1:-1:-1;;;5322:391:52:o;16998:1082:55:-;17156:4;17220:5;17207:9;:18;:41;;;;;17242:6;17229:9;:19;17207:41;17203:83;;;-1:-1:-1;17271:4:55;17264:11;;17203:83;17319:5;17358:6;17319:5;17358:6;17296:20;17447:413;17470:6;17466:1;:10;17447:413;;;17523:9;17510;:22;17506:163;;17616:24;;;;:13;:24;;;;;;17567:9;;-1:-1:-1;17506:163:55;17700:9;17686:10;:23;17682:168;;17796:25;;;;:13;:25;;;;;;17745:10;;-1:-1:-1;17682:168:55;17482:8;:1;17488;17482:8;:5;:8;:::i;:::-;17478:12;;17447:413;;;;17889:13;17873:12;:29;17869:50;;;17912:5;17905:12;;;;;;;;17869:50;17994:10;17981:9;:23;17977:44;;18014:5;18007:12;;;;;;;;17977:44;-1:-1:-1;18069:4:55;;16998:1082;-1:-1:-1;;;;;;;;16998:1082:55:o;18483:1768::-;18627:7;18646:23;18672:22;18684:9;18672:11;:22::i;:::-;18646:48;;18704:19;18726:28;18738:15;:5;:13;:15::i;18726:28::-;18704:50;;18764:20;18787:29;18799:16;:6;:14;:16::i;18787:29::-;18764:52;;18863:15;18848:11;:30;;:65;;;;;18898:15;18882:12;:31;;18848:65;18827:151;;;;-1:-1:-1;;;18827:151:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19086:30;19119:53;19167:4;19149:15;:22;19119:25;:15;19139:4;19119:25;:19;:25;:::i;:53::-;19086:86;-1:-1:-1;19203:36:55;;;19271:37;;;19648:14;;19203:36;19648:32;;;19666:14;19648:32;19644:63;;;19690:15;:5;:13;:15::i;:::-;19683:22;;;;;;;;;;19644:63;19720:13;:32;;;;;19738:14;19737:15;19720:32;19716:64;;;19762:16;:6;:14;:16::i;19716:64::-;19793:13;:31;;;;;19810:14;19793:31;19789:456;;;19862:12;19847:11;:27;;:64;;19895:16;:6;:14;:16::i;:::-;19847:64;;;19877:15;:5;:13;:15::i;19789:456::-;20063:53;20089:26;:6;:24;:26::i;:::-;20079:4;20064:12;:19;;;20063:53;:25;:53;:::i;:::-;19992:51;20017:25;:5;:23;:25::i;:::-;20007:4;19993:11;:18;;19992:51;19991:125;19987:248;;;20143:16;:6;:14;:16::i;24914:148:48:-;24986:7;25012:43;25032:22;25046:7;25032:13;:22::i;:::-;25012:19;:43::i;24520:170::-;24591:6;24623:59;24635:46;24653:27;24672:7;24653:18;:27::i;:::-;24635:17;:46::i;27555:920::-;27711:7;;27753:37;:16;27774:15;27753:37;:20;:37;:::i;:::-;27730:60;-1:-1:-1;27889:22:48;486:20;27909:1;27889:22;:19;:22;:::i;:::-;27874:12;:37;27870:105;;;27942:22;486:20;27962:1;27942:22;:19;:22;:::i;:::-;27927:37;;27870:105;28003:22;486:20;28023:1;28003:22;:19;:22;:::i;:::-;27988:12;:37;27984:105;;;28056:22;486:20;28076:1;28056:22;:19;:22;:::i;:::-;28041:37;;27984:105;28346:17;28366:44;28397:12;28366:26;:15;28386:5;28366:26;:19;:26;:::i;:::-;:30;:44;:30;:44;:::i;:::-;28346:64;-1:-1:-1;28427:41:48;28462:5;28427:30;28346:64;486:20;28427:30;:13;:30;:::i;:41::-;28420:48;27555:920;-1:-1:-1;;;;;;27555:920:48:o;2288:160:51:-;2348:7;2381:2;2375;:8;;2367:50;;;;;-1:-1:-1;;;2367:50:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2434:7:51;;;2288:160::o;23829:131:48:-;23902:12;23933:20;:7;23947:1;23950:2;23933:20;:13;:20;:::i;16172:232:49:-;16236:14;16266:7;:14;16284:1;16266:19;16262:60;;;-1:-1:-1;16308:3:49;16301:10;;16262:60;-1:-1:-1;16384:2:49;16371:16;16365:23;;16341:57::o;23392:178:48:-;23461:7;23538:25;-1:-1:-1;;;23555:7:48;23538:25;:16;:25;:::i;24182:131::-;24255:12;24286:20;:7;24300:2;24304:1;24286:20;:13;:20;:::i;1865:301:51:-;1925:7;2157:2;2152;:7;;;;;;;1865:301;-1:-1:-1;;;1865:301:51:o",
  "source": "pragma solidity ^0.5.10;\n\n/** @title Relay */\n/** @author Summa (https://summa.one) */\n\nimport {SafeMath} from \"@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol\";\nimport {BytesLib} from \"@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol\";\nimport {BTCUtils} from \"@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol\";\nimport {ValidateSPV} from \"@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol\";\nimport {IRelay} from \"./Interfaces.sol\";\n\ncontract Relay is IRelay {\n    using SafeMath for uint256;\n    using BytesLib for bytes;\n    using BTCUtils for bytes;\n    using ValidateSPV for bytes;\n\n    // How often do we store the height?\n    // A higher number incurs less storage cost, but more lookup cost\n    uint32 public constant HEIGHT_INTERVAL = 4;\n\n    bytes32 internal relayGenesis;\n    bytes32 internal bestKnownDigest;\n    bytes32 internal lastReorgCommonAncestor;\n    mapping (bytes32 => bytes32) internal previousBlock;\n    mapping (bytes32 => uint256) internal blockHeight;\n\n    uint256 internal currentEpochDiff;\n    uint256 internal prevEpochDiff;\n\n\n    /// @notice                   Gives a starting point for the relay\n    /// @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n    /// @param  _genesisHeader    The starting header\n    /// @param  _height           The starting height\n    /// @param  _periodStart      The hash of the first header in the genesis epoch\n    constructor(bytes memory _genesisHeader, uint256 _height, bytes32 _periodStart) public {\n        require(_genesisHeader.length == 80, \"Stop being dumb\");\n        bytes32 _genesisDigest = _genesisHeader.hash256();\n\n        require(\n            _periodStart & bytes32(0x0000000000000000000000000000000000000000000000000000000000ffffff) == bytes32(0),\n            \"Period start hash does not have work. Hint: wrong byte order?\");\n\n        relayGenesis = _genesisDigest;\n        bestKnownDigest = _genesisDigest;\n        lastReorgCommonAncestor = _genesisDigest;\n        blockHeight[_genesisDigest] = _height;\n        blockHeight[_periodStart] = _height.sub(_height % 2016);\n\n        currentEpochDiff = _genesisHeader.extractDifficulty();\n    }\n\n    /// @notice     Getter for currentEpochDiff\n    /// @dev        This is updated when a new heavist header has a new diff\n    /// @return     The difficulty of the bestKnownDigest\n    function getCurrentEpochDifficulty() external view returns (uint256) {\n        return currentEpochDiff;\n    }\n    /// @notice     Getter for prevEpochDiff\n    /// @dev        This is updated when a difficulty change is accepted\n    /// @return     The difficulty of the previous epoch\n    function getPrevEpochDifficulty() external view returns (uint256) {\n        return prevEpochDiff;\n    }\n\n    /// @notice     Getter for relayGenesis\n    /// @dev        This is an initialization parameter\n    /// @return     The hash of the first block of the relay\n    function getRelayGenesis() public view returns (bytes32) {\n        return relayGenesis;\n    }\n\n    /// @notice     Getter for bestKnownDigest\n    /// @dev        This updated only by calling markNewHeaviest\n    /// @return     The hash of the best marked chain tip\n    function getBestKnownDigest() public view returns (bytes32) {\n        return bestKnownDigest;\n    }\n\n    /// @notice     Getter for relayGenesis\n    /// @dev        This is updated only by calling markNewHeaviest\n    /// @return     The hash of the shared ancestor of the most recent fork\n    function getLastReorgCommonAncestor() public view returns (bytes32) {\n        return lastReorgCommonAncestor;\n    }\n\n    /// @notice         Finds the height of a header by its digest\n    /// @dev            Will fail if the header is unknown\n    /// @param _digest  The header digest to search for\n    /// @return         The height of the header, or error if unknown\n    function findHeight(bytes32 _digest) external view returns (uint256) {\n        return _findHeight(_digest);\n    }\n\n    /// @notice         Finds an ancestor for a block by its digest\n    /// @dev            Will fail if the header is unknown\n    /// @param _digest  The header digest to search for\n    /// @return         The height of the header, or error if unknown\n    function findAncestor(bytes32 _digest, uint256 _offset) external view returns (bytes32) {\n        return _findAncestor(_digest, _offset);\n    }\n\n    /// @notice             Checks if a digest is an ancestor of the current one\n    /// @dev                Limit the amount of lookups (and thus gas usage) with _limit\n    /// @param _ancestor    The prospective ancestor\n    /// @param _descendant  The descendant to check\n    /// @param _limit       The maximum number of blocks to check\n    /// @return             true if ancestor is at most limit blocks lower than descendant, otherwise false\n    function isAncestor(bytes32 _ancestor, bytes32 _descendant, uint256 _limit) external view returns (bool) {\n        return _isAncestor(_ancestor, _descendant, _limit);\n    }\n\n    /// @notice             Adds headers to storage after validating\n    /// @dev                We check integrity and consistency of the header chain\n    /// @param  _anchor     The header immediately preceeding the new chain\n    /// @param  _headers    A tightly-packed list of 80-byte Bitcoin headers\n    /// @return             True if successfully written, error otherwise\n    function addHeaders(bytes calldata _anchor, bytes calldata _headers) external returns (bool) {\n        return _addHeaders(_anchor, _headers, false);\n    }\n\n    /// @notice                       Adds headers to storage, performs additional validation of retarget\n    /// @dev                          Checks the retarget, the heights, and the linkage\n    /// @param  _oldPeriodStartHeader The first header in the difficulty period being closed\n    /// @param  _oldPeriodEndHeader   The last header in the difficulty period being closed\n    /// @param  _headers              A tightly-packed list of 80-byte Bitcoin headers\n    /// @return                       True if successfully written, error otherwise\n    function addHeadersWithRetarget(\n        bytes calldata _oldPeriodStartHeader,\n        bytes calldata _oldPeriodEndHeader,\n        bytes calldata _headers\n    ) external returns (bool) {\n        return _addHeadersWithRetarget(_oldPeriodStartHeader, _oldPeriodEndHeader, _headers);\n    }\n\n    /// @notice                   Gives a starting point for the relay\n    /// @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n    /// @param  _ancestor         The digest of the most recent common ancestor\n    /// @param  _currentBest      The 80-byte header referenced by bestKnownDigest\n    /// @param  _newBest          The 80-byte header to mark as the new best\n    /// @param  _limit            Limit the amount of traversal of the chain\n    /// @return                   True if successfully updates bestKnownDigest, error otherwise\n    function markNewHeaviest(\n        bytes32 _ancestor,\n        bytes calldata _currentBest,\n        bytes calldata _newBest,\n        uint256 _limit\n    ) external returns (bool) {\n        return _markNewHeaviest(_ancestor, _currentBest, _newBest, _limit);\n    }\n\n    /// @notice             Adds headers to storage after validating\n    /// @dev                We check integrity and consistency of the header chain\n    /// @param  _anchor     The header immediately preceeding the new chain\n    /// @param  _headers    A tightly-packed list of new 80-byte Bitcoin headers to record\n    /// @param  _internal   True if called internally from addHeadersWithRetarget, false otherwise\n    /// @return             True if successfully written, error otherwise\n    function _addHeaders(bytes memory _anchor, bytes memory _headers, bool _internal) internal returns (bool) {\n        uint256 _height;\n        bytes memory _header;\n        bytes32 _currentDigest;\n        bytes32 _previousDigest = _anchor.hash256();\n\n        uint256 _target = _headers.slice(0, 80).extractTarget();\n        uint256 _anchorHeight = _findHeight(_previousDigest);  /* NB: errors if unknown */\n\n        require(\n            _internal || _anchor.extractTarget() == _target,\n            \"Unexpected retarget on external call\");\n        require(_headers.length % 80 == 0, \"Header array length must be divisible by 80\");\n\n        /*\n        NB:\n        1. check that the header has sufficient work\n        2. check that headers are in a coherent chain (no retargets, hash links good)\n        3. Store the block connection\n        4. Store the height\n        */\n        for (uint256 i = 0; i < _headers.length / 80; i = i.add(1)) {\n            _header = _headers.slice(i.mul(80), 80);\n            _height = _anchorHeight.add(i + 1);\n            _currentDigest = _header.hash256();\n\n            /*\n            NB:\n            if the block is already authenticated, we don't need to a work check\n            Or write anything to state. This saves gas\n            */\n            if (previousBlock[_currentDigest] == bytes32(0)) {\n                require(\n                    abi.encodePacked(_currentDigest).reverseEndianness().bytesToUint() <= _target,\n                    \"Header work is insufficient\");\n                previousBlock[_currentDigest] = _previousDigest;\n                if (_height % HEIGHT_INTERVAL == 0) {\n                    /*\n                    NB: We store the height only every 4th header to save gas\n                    */\n                    blockHeight[_currentDigest] = _height;\n                }\n            }\n\n            /* NB: we do still need to make chain level checks tho */\n            require(_header.extractTarget() == _target, \"Target changed unexpectedly\");\n            require(_header.validateHeaderPrevHash(_previousDigest), \"Headers do not form a consistent chain\");\n\n            _previousDigest = _currentDigest;\n        }\n\n        emit Extension(\n            _anchor.hash256(),\n            _currentDigest);\n        return true;\n    }\n\n    /// @notice                       Adds headers to storage, performs additional validation of retarget\n    /// @dev                          Checks the retarget, the heights, and the linkage\n    /// @param  _oldPeriodStartHeader The first header in the difficulty period being closed\n    /// @param  _oldPeriodEndHeader   The last header in the difficulty period being closed\n    /// @param  _headers              A tightly-packed list of 80-byte Bitcoin headers\n    /// @return                       True if successfully written, error otherwise\n    function _addHeadersWithRetarget(\n        bytes memory _oldPeriodStartHeader,\n        bytes memory _oldPeriodEndHeader,\n        bytes memory _headers\n    ) internal returns (bool) {\n        /* NB: requires that both blocks are known */\n        uint256 _startHeight = _findHeight(_oldPeriodStartHeader.hash256());\n        uint256 _endHeight = _findHeight(_oldPeriodEndHeader.hash256());\n\n        /* NB: retargets should happen at 2016 block intervals */\n        require(\n            _endHeight % 2016 == 2015,\n            \"Must provide the last header of the closing difficulty period\");\n        require(\n            _endHeight == _startHeight.add(2015),\n            \"Must provide exactly 1 difficulty period\");\n        require(\n            _oldPeriodStartHeader.extractDifficulty() == _oldPeriodEndHeader.extractDifficulty(),\n            \"Period header difficulties do not match\");\n\n        /* NB: This comparison looks weird because header nBits encoding truncates targets */\n        bytes memory _newPeriodStart = _headers.slice(0, 80);\n        uint256 _actualTarget = _newPeriodStart.extractTarget();\n        uint256 _expectedTarget = BTCUtils.retargetAlgorithm(\n            _oldPeriodStartHeader.extractTarget(),\n            _oldPeriodStartHeader.extractTimestamp(),\n            _oldPeriodEndHeader.extractTimestamp()\n        );\n        require(\n            (_actualTarget & _expectedTarget) == _actualTarget,\n            \"Invalid retarget provided\");\n\n        // If the current known prevEpochDiff doesn't match, and this old period is near the chaintip/\n        // update the stored prevEpochDiff\n        // Don't update if this is a deep past epoch\n        uint256 _oldDiff = _oldPeriodStartHeader.extractDifficulty();\n        if (prevEpochDiff != _oldDiff && _endHeight > _findHeight(bestKnownDigest).sub(2016)) {\n            prevEpochDiff = _oldDiff;\n        }\n\n        // Pass all but the first through to be added\n        return _addHeaders(_oldPeriodEndHeader, _headers, true);\n    }\n\n    /// @notice         Finds the height of a header by its digest\n    /// @dev            Will fail if the header is unknown\n    /// @param _digest  The header digest to search for\n    /// @return         The height of the header\n    function _findHeight(bytes32 _digest) internal view returns (uint256) {\n        uint256 _height = 0;\n        bytes32 _current = _digest;\n        for (uint256 i = 0; i < HEIGHT_INTERVAL + 1; i = i.add(1)) {\n            _height = blockHeight[_current];\n            if (_height == 0) {\n                _current = previousBlock[_current];\n            } else {\n                return _height.add(i);\n            }\n        }\n        revert(\"Unknown block\");\n    }\n\n    /// @notice         Finds an ancestor for a block by its digest\n    /// @dev            Will fail if the header is unknown\n    /// @param _digest  The header digest to search for\n    /// @return         The height of the header, or error if unknown\n    function _findAncestor(bytes32 _digest, uint256 _offset) internal view returns (bytes32) {\n        bytes32 _current = _digest;\n        for (uint256 i = 0; i < _offset; i = i.add(1)) {\n            _current = previousBlock[_current];\n        }\n        require(_current != bytes32(0), \"Unknown ancestor\");\n        return _current;\n    }\n\n    /// @notice             Checks if a digest is an ancestor of the current one\n    /// @dev                Limit the amount of lookups (and thus gas usage) with _limit\n    /// @param _ancestor    The prospective ancestor\n    /// @param _descendant  The descendant to check\n    /// @param _limit       The maximum number of blocks to check\n    /// @return             true if ancestor is at most limit blocks lower than descendant, otherwise false\n    function _isAncestor(bytes32 _ancestor, bytes32 _descendant, uint256 _limit) internal view returns (bool) {\n        bytes32 _current = _descendant;\n        /* NB: 200 gas/read, so gas is capped at ~200 * limit */\n        for (uint256 i = 0; i < _limit; i = i.add(1)) {\n            if (_current == _ancestor) {\n                return true;\n            }\n            _current = previousBlock[_current];\n        }\n        return false;\n    }\n\n    /// @notice                   Marks the new best-known chain tip\n    /// @param  _ancestor         The digest of the most recent common ancestor\n    /// @param  _currentBest      The 80-byte header referenced by bestKnownDigest\n    /// @param  _newBest          The 80-byte header to mark as the new best\n    /// @param  _limit            Limit the amount of traversal of the chain\n    /// @return                   True if successfully updates bestKnownDigest, error otherwise\n    function _markNewHeaviest(\n        bytes32 _ancestor,\n        bytes memory _currentBest,\n        bytes memory _newBest,\n        uint256 _limit\n    ) internal returns (bool) {\n        require(_limit <= 2016, \"Requested limit is greater than 1 difficulty period\");\n        bytes32 _newBestDigest = _newBest.hash256();\n        bytes32 _currentBestDigest = _currentBest.hash256();\n        require(_currentBestDigest == bestKnownDigest, \"Passed in best is not best known\");\n        require(\n            previousBlock[_newBestDigest] != bytes32(0),\n            \"New best is unknown\");\n        require(\n            _isMostRecentAncestor(_ancestor, bestKnownDigest, _newBestDigest, _limit),\n            \"Ancestor must be heaviest common ancestor\");\n        require(\n            _heaviestFromAncestor(_ancestor, _currentBest, _newBest) == _newBestDigest,\n            \"New best hash does not have more work than previous\");\n\n        bestKnownDigest = _newBestDigest;\n        lastReorgCommonAncestor = _ancestor;\n\n        uint256 _newDiff = _newBest.extractDifficulty();\n        if (_newDiff != currentEpochDiff) {\n            currentEpochDiff = _newDiff;\n        }\n\n        emit NewTip(\n            _currentBestDigest,\n            _newBestDigest,\n            _ancestor);\n        return true;\n    }\n\n    /// @notice             Checks if a digest is an ancestor of the current one\n    /// @dev                Limit the amount of lookups (and thus gas usage) with _limit\n    /// @param _ancestor    The prospective shared ancestor\n    /// @param _left        A chain tip\n    /// @param _right       A chain tip\n    /// @param _limit       The maximum number of blocks to check\n    /// @return             true if it is the most recent common ancestor within _limit, false otherwise\n    function _isMostRecentAncestor(\n        bytes32 _ancestor,\n        bytes32 _left,\n        bytes32 _right,\n        uint256 _limit\n    ) internal view returns (bool) {\n        /* NB: sure why not */\n        if (_ancestor == _left && _ancestor == _right) {\n            return true;\n        }\n\n        bytes32 _leftCurrent = _left;\n        bytes32 _rightCurrent = _right;\n        bytes32 _leftPrev = _left;\n        bytes32 _rightPrev = _right;\n\n        for(uint256 i = 0; i < _limit; i = i.add(1)) {\n            if (_leftPrev != _ancestor) {\n                _leftCurrent = _leftPrev;  // cheap\n                _leftPrev = previousBlock[_leftPrev];  // expensive\n            }\n            if (_rightPrev != _ancestor) {\n                _rightCurrent = _rightPrev;  // cheap\n                _rightPrev = previousBlock[_rightPrev];  // expensive\n            }\n        }\n        if (_leftCurrent == _rightCurrent) {return false;} /* NB: If the same, they're a nearer ancestor */\n        if (_leftPrev != _rightPrev) {return false;} /* NB: Both must be ancestor */\n        return true;\n    }\n\n    /// @notice             Decides which header is heaviest from the ancestor\n    /// @dev                Does not support reorgs above 2017 blocks (:\n    /// @param _ancestor    The prospective shared ancestor\n    /// @param _left        A chain tip\n    /// @param _right       A chain tip\n    /// @return             true if it is the most recent common ancestor within _limit, false otherwise\n    function _heaviestFromAncestor(\n        bytes32 _ancestor,\n        bytes memory _left,\n        bytes memory _right\n    ) internal view returns (bytes32) {\n        uint256 _ancestorHeight = _findHeight(_ancestor);\n        uint256 _leftHeight = _findHeight(_left.hash256());\n        uint256 _rightHeight = _findHeight(_right.hash256());\n\n        require(\n            _leftHeight >= _ancestorHeight && _rightHeight >= _ancestorHeight,\n            \"A descendant height is below the ancestor height\");\n\n        /* NB: we can shortcut if one block is in a new difficulty window and the other isn't */\n        uint256 _nextPeriodStartHeight = _ancestorHeight.add(2016).sub(_ancestorHeight % 2016);\n        bool _leftInPeriod = _leftHeight < _nextPeriodStartHeight;\n        bool _rightInPeriod = _rightHeight < _nextPeriodStartHeight;\n\n        /*\n        NB:\n        1. Left is in a new window, right is in the old window. Left is heavier\n        2. Right is in a new window, left is in the old window. Right is heavier\n        3. Both are in the same window, choose the higher one\n        4. They're in different new windows. Choose the heavier one\n        */\n        if (!_leftInPeriod && _rightInPeriod) {return _left.hash256();}\n        if (_leftInPeriod && !_rightInPeriod) {return _right.hash256();}\n        if (_leftInPeriod && _rightInPeriod) {\n            return _leftHeight >= _rightHeight ? _left.hash256() : _right.hash256();\n        } else {  // if (!_leftInPeriod && !_rightInPeriod) {\n            if (((_leftHeight % 2016).mul(_left.extractDifficulty())) <\n                (_rightHeight % 2016).mul(_right.extractDifficulty())) {\n                return _right.hash256();\n            } else {\n                return _left.hash256();\n            }\n        }\n    }\n}\n\n// For unittests\ncontract TestRelay is Relay {\n\n    /// @notice                   Gives a starting point for the relay\n    /// @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n    /// @param  _genesisHeader    The starting header\n    /// @param  _height           The starting height\n    /// @param  _periodStart      The hash of the first header in the genesis epoch\n    constructor(bytes memory _genesisHeader, uint256 _height, bytes32 _periodStart)\n        Relay(_genesisHeader, _height, _periodStart)\n    public {}\n\n    function heaviestFromAncestor(\n        bytes32 _ancestor,\n        bytes calldata _left,\n        bytes calldata _right\n    ) external view returns (bytes32) {\n        return _heaviestFromAncestor(_ancestor, _left, _right);\n    }\n\n    function isMostRecentAncestor(\n        bytes32 _ancestor,\n        bytes32 _left,\n        bytes32 _right,\n        uint256 _limit\n    ) external view returns (bool) {\n        return _isMostRecentAncestor(_ancestor, _left, _right, _limit);\n    }\n}\n",
  "sourcePath": "@summa-tx/relay-sol/contracts/Relay.sol",
  "ast": {
    "absolutePath": "@summa-tx/relay-sol/contracts/Relay.sol",
    "exportedSymbols": {
      "Relay": [
        16343
      ],
      "TestRelay": [
        16400
      ]
    },
    "id": 16401,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 15279,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".10"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:55"
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
        "file": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
        "id": 15281,
        "nodeType": "ImportDirective",
        "scope": 16401,
        "sourceUnit": 13922,
        "src": "88:74:55",
        "symbolAliases": [
          {
            "foreign": 15280,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
        "file": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
        "id": 15283,
        "nodeType": "ImportDirective",
        "scope": 16401,
        "sourceUnit": 13433,
        "src": "163:74:55",
        "symbolAliases": [
          {
            "foreign": 15282,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
        "file": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
        "id": 15285,
        "nodeType": "ImportDirective",
        "scope": 16401,
        "sourceUnit": 13217,
        "src": "238:74:55",
        "symbolAliases": [
          {
            "foreign": 15284,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
        "file": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
        "id": 15287,
        "nodeType": "ImportDirective",
        "scope": 16401,
        "sourceUnit": 14208,
        "src": "313:80:55",
        "symbolAliases": [
          {
            "foreign": 15286,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@summa-tx/relay-sol/contracts/Interfaces.sol",
        "file": "./Interfaces.sol",
        "id": 15289,
        "nodeType": "ImportDirective",
        "scope": 16401,
        "sourceUnit": 14394,
        "src": "394:40:55",
        "symbolAliases": [
          {
            "foreign": 15288,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 15290,
              "name": "IRelay",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 14393,
              "src": "454:6:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IRelay_$14393",
                "typeString": "contract IRelay"
              }
            },
            "id": 15291,
            "nodeType": "InheritanceSpecifier",
            "src": "454:6:55"
          }
        ],
        "contractDependencies": [
          14393
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 16343,
        "linearizedBaseContracts": [
          16343,
          14393
        ],
        "name": "Relay",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 15294,
            "libraryName": {
              "contractScope": null,
              "id": 15292,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13921,
              "src": "473:8:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$13921",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "467:27:55",
            "typeName": {
              "id": 15293,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "486:7:55",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "id": 15297,
            "libraryName": {
              "contractScope": null,
              "id": 15295,
              "name": "BytesLib",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13432,
              "src": "505:8:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BytesLib_$13432",
                "typeString": "library BytesLib"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "499:25:55",
            "typeName": {
              "id": 15296,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "518:5:55",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 15300,
            "libraryName": {
              "contractScope": null,
              "id": 15298,
              "name": "BTCUtils",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 13216,
              "src": "535:8:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_BTCUtils_$13216",
                "typeString": "library BTCUtils"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "529:25:55",
            "typeName": {
              "id": 15299,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "548:5:55",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "id": 15303,
            "libraryName": {
              "contractScope": null,
              "id": 15301,
              "name": "ValidateSPV",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 14207,
              "src": "565:11:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ValidateSPV_$14207",
                "typeString": "library ValidateSPV"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "559:28:55",
            "typeName": {
              "id": 15302,
              "name": "bytes",
              "nodeType": "ElementaryTypeName",
              "src": "581:5:55",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes_storage_ptr",
                "typeString": "bytes"
              }
            }
          },
          {
            "constant": true,
            "id": 15306,
            "name": "HEIGHT_INTERVAL",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "704:42:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint32",
              "typeString": "uint32"
            },
            "typeName": {
              "id": 15304,
              "name": "uint32",
              "nodeType": "ElementaryTypeName",
              "src": "704:6:55",
              "typeDescriptions": {
                "typeIdentifier": "t_uint32",
                "typeString": "uint32"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "34",
              "id": 15305,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "745:1:55",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_4_by_1",
                "typeString": "int_const 4"
              },
              "value": "4"
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 15308,
            "name": "relayGenesis",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "753:29:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 15307,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "753:7:55",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 15310,
            "name": "bestKnownDigest",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "788:32:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 15309,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "788:7:55",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 15312,
            "name": "lastReorgCommonAncestor",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "826:40:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 15311,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "826:7:55",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 15316,
            "name": "previousBlock",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "872:51:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
              "typeString": "mapping(bytes32 => bytes32)"
            },
            "typeName": {
              "id": 15315,
              "keyType": {
                "id": 15313,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "881:7:55",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "872:28:55",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                "typeString": "mapping(bytes32 => bytes32)"
              },
              "valueType": {
                "id": 15314,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "892:7:55",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 15320,
            "name": "blockHeight",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "929:49:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
              "typeString": "mapping(bytes32 => uint256)"
            },
            "typeName": {
              "id": 15319,
              "keyType": {
                "id": 15317,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "938:7:55",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "929:28:55",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                "typeString": "mapping(bytes32 => uint256)"
              },
              "valueType": {
                "id": 15318,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "949:7:55",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 15322,
            "name": "currentEpochDiff",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "985:33:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 15321,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "985:7:55",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 15324,
            "name": "prevEpochDiff",
            "nodeType": "VariableDeclaration",
            "scope": 16343,
            "src": "1024:30:55",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 15323,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1024:7:55",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 15395,
              "nodeType": "Block",
              "src": "1515:653:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 15337,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 15334,
                            "name": "_genesisHeader",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15326,
                            "src": "1533:14:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15335,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1533:21:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "3830",
                          "id": 15336,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1558:2:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_80_by_1",
                            "typeString": "int_const 80"
                          },
                          "value": "80"
                        },
                        "src": "1533:27:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "53746f70206265696e672064756d62",
                        "id": 15338,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1562:17:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_54f9a5f9e9dfa58d8856435ba6e7418b795ac217ba9b784a12213c7ba6375b05",
                          "typeString": "literal_string \"Stop being dumb\""
                        },
                        "value": "Stop being dumb"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_54f9a5f9e9dfa58d8856435ba6e7418b795ac217ba9b784a12213c7ba6375b05",
                          "typeString": "literal_string \"Stop being dumb\""
                        }
                      ],
                      "id": 15333,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "1525:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15339,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1525:55:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15340,
                  "nodeType": "ExpressionStatement",
                  "src": "1525:55:55"
                },
                {
                  "assignments": [
                    15342
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15342,
                      "name": "_genesisDigest",
                      "nodeType": "VariableDeclaration",
                      "scope": 15395,
                      "src": "1590:22:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 15341,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1590:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15346,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 15343,
                        "name": "_genesisHeader",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15326,
                        "src": "1615:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 15344,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11851,
                      "src": "1615:22:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 15345,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1615:24:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1590:49:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 15356,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 15352,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 15348,
                            "name": "_periodStart",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15330,
                            "src": "1671:12:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "307830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030666666666666",
                                "id": 15350,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "1694:66:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_16777215_by_1",
                                  "typeString": "int_const 16777215"
                                },
                                "value": "0x0000000000000000000000000000000000000000000000000000000000ffffff"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_16777215_by_1",
                                  "typeString": "int_const 16777215"
                                }
                              ],
                              "id": 15349,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "1686:7:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_bytes32_$",
                                "typeString": "type(bytes32)"
                              },
                              "typeName": "bytes32"
                            },
                            "id": 15351,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1686:75:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "1671:90:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 15354,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1773:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 15353,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1765:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": "bytes32"
                          },
                          "id": 15355,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1765:10:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "1671:104:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "506572696f64207374617274206861736820646f6573206e6f74206861766520776f726b2e2048696e743a2077726f6e672062797465206f726465723f",
                        "id": 15357,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1789:63:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c63e0adf63c0728a57e27fbecf3408104165ff577e498d3d8684c7fbae01d26d",
                          "typeString": "literal_string \"Period start hash does not have work. Hint: wrong byte order?\""
                        },
                        "value": "Period start hash does not have work. Hint: wrong byte order?"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c63e0adf63c0728a57e27fbecf3408104165ff577e498d3d8684c7fbae01d26d",
                          "typeString": "literal_string \"Period start hash does not have work. Hint: wrong byte order?\""
                        }
                      ],
                      "id": 15347,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "1650:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15358,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1650:203:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15359,
                  "nodeType": "ExpressionStatement",
                  "src": "1650:203:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15362,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 15360,
                      "name": "relayGenesis",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15308,
                      "src": "1864:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 15361,
                      "name": "_genesisDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15342,
                      "src": "1879:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "1864:29:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 15363,
                  "nodeType": "ExpressionStatement",
                  "src": "1864:29:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15366,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 15364,
                      "name": "bestKnownDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15310,
                      "src": "1903:15:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 15365,
                      "name": "_genesisDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15342,
                      "src": "1921:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "1903:32:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 15367,
                  "nodeType": "ExpressionStatement",
                  "src": "1903:32:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15370,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 15368,
                      "name": "lastReorgCommonAncestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15312,
                      "src": "1945:23:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 15369,
                      "name": "_genesisDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15342,
                      "src": "1971:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "1945:40:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 15371,
                  "nodeType": "ExpressionStatement",
                  "src": "1945:40:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15376,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 15372,
                        "name": "blockHeight",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15320,
                        "src": "1995:11:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                          "typeString": "mapping(bytes32 => uint256)"
                        }
                      },
                      "id": 15374,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 15373,
                        "name": "_genesisDigest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15342,
                        "src": "2007:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "1995:27:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 15375,
                      "name": "_height",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15328,
                      "src": "2025:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1995:37:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 15377,
                  "nodeType": "ExpressionStatement",
                  "src": "1995:37:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15387,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 15378,
                        "name": "blockHeight",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15320,
                        "src": "2042:11:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                          "typeString": "mapping(bytes32 => uint256)"
                        }
                      },
                      "id": 15380,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 15379,
                        "name": "_periodStart",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15330,
                        "src": "2054:12:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2042:25:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15385,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 15383,
                            "name": "_height",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15328,
                            "src": "2082:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "%",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "32303136",
                            "id": 15384,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2092:4:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2016_by_1",
                              "typeString": "int_const 2016"
                            },
                            "value": "2016"
                          },
                          "src": "2082:14:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 15381,
                          "name": "_height",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15328,
                          "src": "2070:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15382,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 13895,
                        "src": "2070:11:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 15386,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2070:27:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2042:55:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 15388,
                  "nodeType": "ExpressionStatement",
                  "src": "2042:55:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15393,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 15389,
                      "name": "currentEpochDiff",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15322,
                      "src": "2108:16:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "argumentTypes": null,
                          "id": 15390,
                          "name": "_genesisHeader",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15326,
                          "src": "2127:14:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 15391,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "extractDifficulty",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 12998,
                        "src": "2127:32:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) pure returns (uint256)"
                        }
                      },
                      "id": 15392,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2127:34:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2108:53:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 15394,
                  "nodeType": "ExpressionStatement",
                  "src": "2108:53:55"
                }
              ]
            },
            "documentation": "@notice                   Gives a starting point for the relay\n @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n @param  _genesisHeader    The starting header\n @param  _height           The starting height\n @param  _periodStart      The hash of the first header in the genesis epoch",
            "id": 15396,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15331,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15326,
                  "name": "_genesisHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 15396,
                  "src": "1440:27:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15325,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1440:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15328,
                  "name": "_height",
                  "nodeType": "VariableDeclaration",
                  "scope": 15396,
                  "src": "1469:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15327,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1469:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15330,
                  "name": "_periodStart",
                  "nodeType": "VariableDeclaration",
                  "scope": 15396,
                  "src": "1486:20:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15329,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1486:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1439:68:55"
            },
            "returnParameters": {
              "id": 15332,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1515:0:55"
            },
            "scope": 16343,
            "src": "1428:740:55",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 15403,
              "nodeType": "Block",
              "src": "2426:40:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15401,
                    "name": "currentEpochDiff",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15322,
                    "src": "2443:16:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 15400,
                  "id": 15402,
                  "nodeType": "Return",
                  "src": "2436:23:55"
                }
              ]
            },
            "documentation": "@notice     Getter for currentEpochDiff\n @dev        This is updated when a new heavist header has a new diff\n @return     The difficulty of the bestKnownDigest",
            "id": 15404,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getCurrentEpochDifficulty",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15397,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2391:2:55"
            },
            "returnParameters": {
              "id": 15400,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15399,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15404,
                  "src": "2417:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15398,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2417:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2416:9:55"
            },
            "scope": 16343,
            "src": "2357:109:55",
            "stateMutability": "view",
            "superFunction": 14312,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15411,
              "nodeType": "Block",
              "src": "2712:37:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15409,
                    "name": "prevEpochDiff",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15324,
                    "src": "2729:13:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 15408,
                  "id": 15410,
                  "nodeType": "Return",
                  "src": "2722:20:55"
                }
              ]
            },
            "documentation": "@notice     Getter for prevEpochDiff\n @dev        This is updated when a difficulty change is accepted\n @return     The difficulty of the previous epoch",
            "id": 15412,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getPrevEpochDifficulty",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15405,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2677:2:55"
            },
            "returnParameters": {
              "id": 15408,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15407,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15412,
                  "src": "2703:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15406,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2703:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2702:9:55"
            },
            "scope": 16343,
            "src": "2646:103:55",
            "stateMutability": "view",
            "superFunction": 14317,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15419,
              "nodeType": "Block",
              "src": "2973:36:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15417,
                    "name": "relayGenesis",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15308,
                    "src": "2990:12:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 15416,
                  "id": 15418,
                  "nodeType": "Return",
                  "src": "2983:19:55"
                }
              ]
            },
            "documentation": "@notice     Getter for relayGenesis\n @dev        This is an initialization parameter\n @return     The hash of the first block of the relay",
            "id": 15420,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getRelayGenesis",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15413,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2940:2:55"
            },
            "returnParameters": {
              "id": 15416,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15415,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15420,
                  "src": "2964:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15414,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2964:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2963:9:55"
            },
            "scope": 16343,
            "src": "2916:93:55",
            "stateMutability": "view",
            "superFunction": 14322,
            "visibility": "public"
          },
          {
            "body": {
              "id": 15427,
              "nodeType": "Block",
              "src": "3245:39:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15425,
                    "name": "bestKnownDigest",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15310,
                    "src": "3262:15:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 15424,
                  "id": 15426,
                  "nodeType": "Return",
                  "src": "3255:22:55"
                }
              ]
            },
            "documentation": "@notice     Getter for bestKnownDigest\n @dev        This updated only by calling markNewHeaviest\n @return     The hash of the best marked chain tip",
            "id": 15428,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getBestKnownDigest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15421,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3212:2:55"
            },
            "returnParameters": {
              "id": 15424,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15423,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15428,
                  "src": "3236:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15422,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3236:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3235:9:55"
            },
            "scope": 16343,
            "src": "3185:99:55",
            "stateMutability": "view",
            "superFunction": 14327,
            "visibility": "public"
          },
          {
            "body": {
              "id": 15435,
              "nodeType": "Block",
              "src": "3546:47:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15433,
                    "name": "lastReorgCommonAncestor",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15312,
                    "src": "3563:23:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 15432,
                  "id": 15434,
                  "nodeType": "Return",
                  "src": "3556:30:55"
                }
              ]
            },
            "documentation": "@notice     Getter for relayGenesis\n @dev        This is updated only by calling markNewHeaviest\n @return     The hash of the shared ancestor of the most recent fork",
            "id": 15436,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getLastReorgCommonAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15429,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3513:2:55"
            },
            "returnParameters": {
              "id": 15432,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15431,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15436,
                  "src": "3537:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15430,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3537:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3536:9:55"
            },
            "scope": 16343,
            "src": "3478:115:55",
            "stateMutability": "view",
            "superFunction": 14332,
            "visibility": "public"
          },
          {
            "body": {
              "id": 15447,
              "nodeType": "Block",
              "src": "3920:44:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15444,
                        "name": "_digest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15438,
                        "src": "3949:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 15443,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "3937:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 15445,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3937:20:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 15442,
                  "id": 15446,
                  "nodeType": "Return",
                  "src": "3930:27:55"
                }
              ]
            },
            "documentation": "@notice         Finds the height of a header by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header, or error if unknown",
            "id": 15448,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "findHeight",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15439,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15438,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 15448,
                  "src": "3871:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15437,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3871:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3870:17:55"
            },
            "returnParameters": {
              "id": 15442,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15441,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15448,
                  "src": "3911:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15440,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3911:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3910:9:55"
            },
            "scope": 16343,
            "src": "3851:113:55",
            "stateMutability": "view",
            "superFunction": 14339,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15462,
              "nodeType": "Block",
              "src": "4311:55:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15458,
                        "name": "_digest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15450,
                        "src": "4342:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15459,
                        "name": "_offset",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15452,
                        "src": "4351:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 15457,
                      "name": "_findAncestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15952,
                      "src": "4328:13:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                        "typeString": "function (bytes32,uint256) view returns (bytes32)"
                      }
                    },
                    "id": 15460,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4328:31:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 15456,
                  "id": 15461,
                  "nodeType": "Return",
                  "src": "4321:38:55"
                }
              ]
            },
            "documentation": "@notice         Finds an ancestor for a block by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header, or error if unknown",
            "id": 15463,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "findAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15453,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15450,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 15463,
                  "src": "4245:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15449,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4245:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15452,
                  "name": "_offset",
                  "nodeType": "VariableDeclaration",
                  "scope": 15463,
                  "src": "4262:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15451,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4262:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4244:34:55"
            },
            "returnParameters": {
              "id": 15456,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15455,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15463,
                  "src": "4302:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15454,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4302:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4301:9:55"
            },
            "scope": 16343,
            "src": "4223:143:55",
            "stateMutability": "view",
            "superFunction": 14348,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15480,
              "nodeType": "Block",
              "src": "4926:67:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15475,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15465,
                        "src": "4955:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15476,
                        "name": "_descendant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15467,
                        "src": "4966:11:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15477,
                        "name": "_limit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15469,
                        "src": "4979:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 15474,
                      "name": "_isAncestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15999,
                      "src": "4943:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (bytes32,bytes32,uint256) view returns (bool)"
                      }
                    },
                    "id": 15478,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4943:43:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 15473,
                  "id": 15479,
                  "nodeType": "Return",
                  "src": "4936:50:55"
                }
              ]
            },
            "documentation": "@notice             Checks if a digest is an ancestor of the current one\n @dev                Limit the amount of lookups (and thus gas usage) with _limit\n @param _ancestor    The prospective ancestor\n @param _descendant  The descendant to check\n @param _limit       The maximum number of blocks to check\n @return             true if ancestor is at most limit blocks lower than descendant, otherwise false",
            "id": 15481,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15470,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15465,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 15481,
                  "src": "4841:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15464,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4841:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15467,
                  "name": "_descendant",
                  "nodeType": "VariableDeclaration",
                  "scope": 15481,
                  "src": "4860:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15466,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "4860:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15469,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 15481,
                  "src": "4881:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15468,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4881:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4840:56:55"
            },
            "returnParameters": {
              "id": 15473,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15472,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15481,
                  "src": "4920:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15471,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4920:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4919:6:55"
            },
            "scope": 16343,
            "src": "4821:172:55",
            "stateMutability": "view",
            "superFunction": 14359,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15496,
              "nodeType": "Block",
              "src": "5471:61:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15491,
                        "name": "_anchor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15483,
                        "src": "5500:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15492,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15485,
                        "src": "5509:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "66616c7365",
                        "id": 15493,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "bool",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5519:5:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "value": "false"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 15490,
                      "name": "_addHeaders",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15717,
                      "src": "5488:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bool_$returns$_t_bool_$",
                        "typeString": "function (bytes memory,bytes memory,bool) returns (bool)"
                      }
                    },
                    "id": 15494,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5488:37:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 15489,
                  "id": 15495,
                  "nodeType": "Return",
                  "src": "5481:44:55"
                }
              ]
            },
            "documentation": "@notice             Adds headers to storage after validating\n @dev                We check integrity and consistency of the header chain\n @param  _anchor     The header immediately preceeding the new chain\n @param  _headers    A tightly-packed list of 80-byte Bitcoin headers\n @return             True if successfully written, error otherwise",
            "id": 15497,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addHeaders",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15486,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15483,
                  "name": "_anchor",
                  "nodeType": "VariableDeclaration",
                  "scope": 15497,
                  "src": "5398:22:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15482,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5398:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15485,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 15497,
                  "src": "5422:23:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15484,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "5422:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5397:49:55"
            },
            "returnParameters": {
              "id": 15489,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15488,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15497,
                  "src": "5465:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15487,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5465:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5464:6:55"
            },
            "scope": 16343,
            "src": "5378:154:55",
            "stateMutability": "nonpayable",
            "superFunction": 14368,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15514,
              "nodeType": "Block",
              "src": "6273:101:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15509,
                        "name": "_oldPeriodStartHeader",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15499,
                        "src": "6314:21:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15510,
                        "name": "_oldPeriodEndHeader",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15501,
                        "src": "6337:19:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15511,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15503,
                        "src": "6358:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      ],
                      "id": 15508,
                      "name": "_addHeadersWithRetarget",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15844,
                      "src": "6290:23:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (bytes memory,bytes memory,bytes memory) returns (bool)"
                      }
                    },
                    "id": 15512,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6290:77:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 15507,
                  "id": 15513,
                  "nodeType": "Return",
                  "src": "6283:84:55"
                }
              ]
            },
            "documentation": "@notice                       Adds headers to storage, performs additional validation of retarget\n @dev                          Checks the retarget, the heights, and the linkage\n @param  _oldPeriodStartHeader The first header in the difficulty period being closed\n @param  _oldPeriodEndHeader   The last header in the difficulty period being closed\n @param  _headers              A tightly-packed list of 80-byte Bitcoin headers\n @return                       True if successfully written, error otherwise",
            "id": 15515,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addHeadersWithRetarget",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15504,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15499,
                  "name": "_oldPeriodStartHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 15515,
                  "src": "6129:36:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15498,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "6129:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15501,
                  "name": "_oldPeriodEndHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 15515,
                  "src": "6175:34:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15500,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "6175:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15503,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 15515,
                  "src": "6219:23:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15502,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "6219:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6119:129:55"
            },
            "returnParameters": {
              "id": 15507,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15506,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15515,
                  "src": "6267:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15505,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6267:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6266:6:55"
            },
            "scope": 16343,
            "src": "6088:286:55",
            "stateMutability": "nonpayable",
            "superFunction": 14379,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15535,
              "nodeType": "Block",
              "src": "7143:83:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15529,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15517,
                        "src": "7177:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15530,
                        "name": "_currentBest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15519,
                        "src": "7188:12:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15531,
                        "name": "_newBest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15521,
                        "src": "7202:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15532,
                        "name": "_limit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15523,
                        "src": "7212:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 15528,
                      "name": "_markNewHeaviest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16102,
                      "src": "7160:16:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (bytes32,bytes memory,bytes memory,uint256) returns (bool)"
                      }
                    },
                    "id": 15533,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7160:59:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 15527,
                  "id": 15534,
                  "nodeType": "Return",
                  "src": "7153:66:55"
                }
              ]
            },
            "documentation": "@notice                   Gives a starting point for the relay\n @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n @param  _ancestor         The digest of the most recent common ancestor\n @param  _currentBest      The 80-byte header referenced by bestKnownDigest\n @param  _newBest          The 80-byte header to mark as the new best\n @param  _limit            Limit the amount of traversal of the chain\n @return                   True if successfully updates bestKnownDigest, error otherwise",
            "id": 15536,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "markNewHeaviest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15524,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15517,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 15536,
                  "src": "7001:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15516,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "7001:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15519,
                  "name": "_currentBest",
                  "nodeType": "VariableDeclaration",
                  "scope": 15536,
                  "src": "7028:27:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15518,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "7028:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15521,
                  "name": "_newBest",
                  "nodeType": "VariableDeclaration",
                  "scope": 15536,
                  "src": "7065:23:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15520,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "7065:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15523,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 15536,
                  "src": "7098:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15522,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7098:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6991:127:55"
            },
            "returnParameters": {
              "id": 15527,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15526,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15536,
                  "src": "7137:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15525,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "7137:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7136:6:55"
            },
            "scope": 16343,
            "src": "6967:259:55",
            "stateMutability": "nonpayable",
            "superFunction": 14392,
            "visibility": "external"
          },
          {
            "body": {
              "id": 15716,
              "nodeType": "Block",
              "src": "7830:2176:55",
              "statements": [
                {
                  "assignments": [
                    15548
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15548,
                      "name": "_height",
                      "nodeType": "VariableDeclaration",
                      "scope": 15716,
                      "src": "7840:15:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15547,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7840:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15549,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7840:15:55"
                },
                {
                  "assignments": [
                    15551
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15551,
                      "name": "_header",
                      "nodeType": "VariableDeclaration",
                      "scope": 15716,
                      "src": "7865:20:55",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 15550,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "7865:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15552,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7865:20:55"
                },
                {
                  "assignments": [
                    15554
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15554,
                      "name": "_currentDigest",
                      "nodeType": "VariableDeclaration",
                      "scope": 15716,
                      "src": "7895:22:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 15553,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "7895:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15555,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7895:22:55"
                },
                {
                  "assignments": [
                    15557
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15557,
                      "name": "_previousDigest",
                      "nodeType": "VariableDeclaration",
                      "scope": 15716,
                      "src": "7927:23:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 15556,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "7927:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15561,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 15558,
                        "name": "_anchor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15538,
                        "src": "7953:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 15559,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11851,
                      "src": "7953:15:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 15560,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7953:17:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7927:43:55"
                },
                {
                  "assignments": [
                    15563
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15563,
                      "name": "_target",
                      "nodeType": "VariableDeclaration",
                      "scope": 15716,
                      "src": "7981:15:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15562,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7981:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15571,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 15566,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8014:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          {
                            "argumentTypes": null,
                            "hexValue": "3830",
                            "id": 15567,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8017:2:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_80_by_1",
                              "typeString": "int_const 80"
                            },
                            "value": "80"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            {
                              "typeIdentifier": "t_rational_80_by_1",
                              "typeString": "int_const 80"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15564,
                            "name": "_headers",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15540,
                            "src": "7999:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15565,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "slice",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13281,
                          "src": "7999:14:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                          }
                        },
                        "id": 15568,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7999:21:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 15569,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "extractTarget",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 12925,
                      "src": "7999:35:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (uint256)"
                      }
                    },
                    "id": 15570,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7999:37:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7981:55:55"
                },
                {
                  "assignments": [
                    15573
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15573,
                      "name": "_anchorHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 15716,
                      "src": "8046:21:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15572,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "8046:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15577,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15575,
                        "name": "_previousDigest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15557,
                        "src": "8082:15:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 15574,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "8070:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 15576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8070:28:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8046:52:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 15585,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 15579,
                          "name": "_internal",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15542,
                          "src": "8159:9:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15584,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 15580,
                                "name": "_anchor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15538,
                                "src": "8172:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 15581,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "extractTarget",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 12925,
                              "src": "8172:21:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (uint256)"
                              }
                            },
                            "id": 15582,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8172:23:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 15583,
                            "name": "_target",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15563,
                            "src": "8199:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8172:34:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "8159:47:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "556e6578706563746564207265746172676574206f6e2065787465726e616c2063616c6c",
                        "id": 15586,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8220:38:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c33296853216f4d74abe3a6fbf840e018f81995cd8c40108858eaa3d5148cebc",
                          "typeString": "literal_string \"Unexpected retarget on external call\""
                        },
                        "value": "Unexpected retarget on external call"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c33296853216f4d74abe3a6fbf840e018f81995cd8c40108858eaa3d5148cebc",
                          "typeString": "literal_string \"Unexpected retarget on external call\""
                        }
                      ],
                      "id": 15578,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "8138:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15587,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8138:121:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15588,
                  "nodeType": "ExpressionStatement",
                  "src": "8138:121:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 15595,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15593,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 15590,
                              "name": "_headers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15540,
                              "src": "8277:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 15591,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "8277:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "%",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "3830",
                            "id": 15592,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8295:2:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_80_by_1",
                              "typeString": "int_const 80"
                            },
                            "value": "80"
                          },
                          "src": "8277:20:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 15594,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8301:1:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "8277:25:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "486561646572206172726179206c656e677468206d75737420626520646976697369626c65206279203830",
                        "id": 15596,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8304:45:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_64951f0822ebc61755f01c687a3aabd90c37a5b5a62d0764ef2ec9edb60caca4",
                          "typeString": "literal_string \"Header array length must be divisible by 80\""
                        },
                        "value": "Header array length must be divisible by 80"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_64951f0822ebc61755f01c687a3aabd90c37a5b5a62d0764ef2ec9edb60caca4",
                          "typeString": "literal_string \"Header array length must be divisible by 80\""
                        }
                      ],
                      "id": 15589,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "8269:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15597,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8269:81:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15598,
                  "nodeType": "ExpressionStatement",
                  "src": "8269:81:55"
                },
                {
                  "body": {
                    "id": 15705,
                    "nodeType": "Block",
                    "src": "8660:1234:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15625,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15616,
                            "name": "_header",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15551,
                            "src": "8674:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "hexValue": "3830",
                                    "id": 15621,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "8705:2:55",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_80_by_1",
                                      "typeString": "int_const 80"
                                    },
                                    "value": "80"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_80_by_1",
                                      "typeString": "int_const 80"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 15619,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15600,
                                    "src": "8699:1:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 15620,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mul",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 13860,
                                  "src": "8699:5:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 15622,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8699:9:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "3830",
                                "id": 15623,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "8710:2:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_80_by_1",
                                  "typeString": "int_const 80"
                                },
                                "value": "80"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_rational_80_by_1",
                                  "typeString": "int_const 80"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 15617,
                                "name": "_headers",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15540,
                                "src": "8684:8:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 15618,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "slice",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 13281,
                              "src": "8684:14:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                              }
                            },
                            "id": 15624,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8684:29:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "src": "8674:39:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 15626,
                        "nodeType": "ExpressionStatement",
                        "src": "8674:39:55"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15634,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15627,
                            "name": "_height",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15548,
                            "src": "8727:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 15632,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 15630,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15600,
                                  "src": "8755:1:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "31",
                                  "id": 15631,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "8759:1:55",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "8755:5:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 15628,
                                "name": "_anchorHeight",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15573,
                                "src": "8737:13:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 15629,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 13920,
                              "src": "8737:17:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 15633,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8737:24:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8727:34:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15635,
                        "nodeType": "ExpressionStatement",
                        "src": "8727:34:55"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15640,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15636,
                            "name": "_currentDigest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15554,
                            "src": "8775:14:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 15637,
                                "name": "_header",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15551,
                                "src": "8792:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 15638,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "hash256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11851,
                              "src": "8792:15:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 15639,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8792:17:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "8775:34:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15641,
                        "nodeType": "ExpressionStatement",
                        "src": "8775:34:55"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 15648,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 15642,
                              "name": "previousBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15316,
                              "src": "9010:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                "typeString": "mapping(bytes32 => bytes32)"
                              }
                            },
                            "id": 15644,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 15643,
                              "name": "_currentDigest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15554,
                              "src": "9024:14:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "9010:29:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 15646,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9051:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                }
                              ],
                              "id": 15645,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "9043:7:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_bytes32_$",
                                "typeString": "type(bytes32)"
                              },
                              "typeName": "bytes32"
                            },
                            "id": 15647,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9043:10:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "9010:43:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 15683,
                        "nodeType": "IfStatement",
                        "src": "9006:560:55",
                        "trueBody": {
                          "id": 15682,
                          "nodeType": "Block",
                          "src": "9055:511:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 15659,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "expression": {
                                          "argumentTypes": null,
                                          "arguments": [],
                                          "expression": {
                                            "argumentTypes": [],
                                            "expression": {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 15652,
                                                  "name": "_currentDigest",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 15554,
                                                  "src": "9119:14:55",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_bytes32",
                                                    "typeString": "bytes32"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_bytes32",
                                                    "typeString": "bytes32"
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": null,
                                                  "id": 15650,
                                                  "name": "abi",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 18347,
                                                  "src": "9102:3:55",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_magic_abi",
                                                    "typeString": "abi"
                                                  }
                                                },
                                                "id": 15651,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "memberName": "encodePacked",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": null,
                                                "src": "9102:16:55",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                                  "typeString": "function () pure returns (bytes memory)"
                                                }
                                              },
                                              "id": 15653,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9102:32:55",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bytes_memory_ptr",
                                                "typeString": "bytes memory"
                                              }
                                            },
                                            "id": 15654,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "reverseEndianness",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 11643,
                                            "src": "9102:50:55",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                                              "typeString": "function (bytes memory) pure returns (bytes memory)"
                                            }
                                          },
                                          "id": 15655,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "9102:52:55",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_memory_ptr",
                                            "typeString": "bytes memory"
                                          }
                                        },
                                        "id": 15656,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "bytesToUint",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 11790,
                                        "src": "9102:64:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                                          "typeString": "function (bytes memory) pure returns (uint256)"
                                        }
                                      },
                                      "id": 15657,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "9102:66:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "<=",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 15658,
                                      "name": "_target",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15563,
                                      "src": "9172:7:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9102:77:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "hexValue": "48656164657220776f726b20697320696e73756666696369656e74",
                                    "id": 15660,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "string",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "9201:29:55",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_stringliteral_577a884d824749cadf11f1d13d4dc4655ad406f62456ad5e910541517ce4d497",
                                      "typeString": "literal_string \"Header work is insufficient\""
                                    },
                                    "value": "Header work is insufficient"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_stringliteral_577a884d824749cadf11f1d13d4dc4655ad406f62456ad5e910541517ce4d497",
                                      "typeString": "literal_string \"Header work is insufficient\""
                                    }
                                  ],
                                  "id": 15649,
                                  "name": "require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    18363,
                                    18364
                                  ],
                                  "referencedDeclaration": 18364,
                                  "src": "9073:7:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                                    "typeString": "function (bool,string memory) pure"
                                  }
                                },
                                "id": 15661,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9073:158:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15662,
                              "nodeType": "ExpressionStatement",
                              "src": "9073:158:55"
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 15667,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 15663,
                                    "name": "previousBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15316,
                                    "src": "9249:13:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                      "typeString": "mapping(bytes32 => bytes32)"
                                    }
                                  },
                                  "id": 15665,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 15664,
                                    "name": "_currentDigest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15554,
                                    "src": "9263:14:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "9249:29:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "id": 15666,
                                  "name": "_previousDigest",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15557,
                                  "src": "9281:15:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "9249:47:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15668,
                              "nodeType": "ExpressionStatement",
                              "src": "9249:47:55"
                            },
                            {
                              "condition": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 15673,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 15671,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 15669,
                                    "name": "_height",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15548,
                                    "src": "9318:7:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 15670,
                                    "name": "HEIGHT_INTERVAL",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15306,
                                    "src": "9328:15:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint32",
                                      "typeString": "uint32"
                                    }
                                  },
                                  "src": "9318:25:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 15672,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "9347:1:55",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "9318:30:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": null,
                              "id": 15681,
                              "nodeType": "IfStatement",
                              "src": "9314:238:55",
                              "trueBody": {
                                "id": 15680,
                                "nodeType": "Block",
                                "src": "9350:202:55",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 15678,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "argumentTypes": null,
                                        "baseExpression": {
                                          "argumentTypes": null,
                                          "id": 15674,
                                          "name": "blockHeight",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15320,
                                          "src": "9496:11:55",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                                            "typeString": "mapping(bytes32 => uint256)"
                                          }
                                        },
                                        "id": 15676,
                                        "indexExpression": {
                                          "argumentTypes": null,
                                          "id": 15675,
                                          "name": "_currentDigest",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15554,
                                          "src": "9508:14:55",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": true,
                                        "nodeType": "IndexAccess",
                                        "src": "9496:27:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "argumentTypes": null,
                                        "id": 15677,
                                        "name": "_height",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15548,
                                        "src": "9526:7:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "9496:37:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 15679,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9496:37:55"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 15689,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 15685,
                                    "name": "_header",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15551,
                                    "src": "9658:7:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 15686,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "extractTarget",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 12925,
                                  "src": "9658:21:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                                    "typeString": "function (bytes memory) pure returns (uint256)"
                                  }
                                },
                                "id": 15687,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9658:23:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 15688,
                                "name": "_target",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15563,
                                "src": "9685:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "9658:34:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "546172676574206368616e67656420756e65787065637465646c79",
                              "id": 15690,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "9694:29:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_7512beb8d719892f726a7e4249334e5ee85f327ca3e7b9c917a97c9e30ad0aa4",
                                "typeString": "literal_string \"Target changed unexpectedly\""
                              },
                              "value": "Target changed unexpectedly"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_7512beb8d719892f726a7e4249334e5ee85f327ca3e7b9c917a97c9e30ad0aa4",
                                "typeString": "literal_string \"Target changed unexpectedly\""
                              }
                            ],
                            "id": 15684,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              18363,
                              18364
                            ],
                            "referencedDeclaration": 18364,
                            "src": "9650:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 15691,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9650:74:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15692,
                        "nodeType": "ExpressionStatement",
                        "src": "9650:74:55"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 15696,
                                  "name": "_previousDigest",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15557,
                                  "src": "9777:15:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 15694,
                                  "name": "_header",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15551,
                                  "src": "9746:7:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 15695,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "validateHeaderPrevHash",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 14206,
                                "src": "9746:30:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes memory,bytes32) pure returns (bool)"
                                }
                              },
                              "id": 15697,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9746:47:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4865616465727320646f206e6f7420666f726d206120636f6e73697374656e7420636861696e",
                              "id": 15698,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "9795:40:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_09edac151df9e4894b9dc57d4b428f162596747b62bb7347fd3851a717f60df7",
                                "typeString": "literal_string \"Headers do not form a consistent chain\""
                              },
                              "value": "Headers do not form a consistent chain"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_09edac151df9e4894b9dc57d4b428f162596747b62bb7347fd3851a717f60df7",
                                "typeString": "literal_string \"Headers do not form a consistent chain\""
                              }
                            ],
                            "id": 15693,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              18363,
                              18364
                            ],
                            "referencedDeclaration": 18364,
                            "src": "9738:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 15699,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9738:98:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15700,
                        "nodeType": "ExpressionStatement",
                        "src": "9738:98:55"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15703,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15701,
                            "name": "_previousDigest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15557,
                            "src": "9851:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 15702,
                            "name": "_currentDigest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15554,
                            "src": "9869:14:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "9851:32:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15704,
                        "nodeType": "ExpressionStatement",
                        "src": "9851:32:55"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 15608,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 15603,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15600,
                      "src": "8620:1:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 15607,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 15604,
                          "name": "_headers",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15540,
                          "src": "8624:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 15605,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8624:15:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "/",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 15606,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8642:2:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      },
                      "src": "8624:20:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "8620:24:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 15706,
                  "initializationExpression": {
                    "assignments": [
                      15600
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 15600,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 15706,
                        "src": "8605:9:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15599,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8605:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 15602,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 15601,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "8617:1:55",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "8605:13:55"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 15614,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 15609,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15600,
                        "src": "8646:1:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 15612,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8656:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15610,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15600,
                            "src": "8650:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15611,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "add",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13920,
                          "src": "8650:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 15613,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8650:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "8646:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 15615,
                    "nodeType": "ExpressionStatement",
                    "src": "8646:12:55"
                  },
                  "nodeType": "ForStatement",
                  "src": "8600:1294:55"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15708,
                            "name": "_anchor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15538,
                            "src": "9932:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15709,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "hash256",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11851,
                          "src": "9932:15:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 15710,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9932:17:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15711,
                        "name": "_currentDigest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15554,
                        "src": "9963:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 15707,
                      "name": "Extension",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14299,
                      "src": "9909:9:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$",
                        "typeString": "function (bytes32,bytes32)"
                      }
                    },
                    "id": 15712,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9909:69:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15713,
                  "nodeType": "EmitStatement",
                  "src": "9904:74:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 15714,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9995:4:55",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 15546,
                  "id": 15715,
                  "nodeType": "Return",
                  "src": "9988:11:55"
                }
              ]
            },
            "documentation": "@notice             Adds headers to storage after validating\n @dev                We check integrity and consistency of the header chain\n @param  _anchor     The header immediately preceeding the new chain\n @param  _headers    A tightly-packed list of new 80-byte Bitcoin headers to record\n @param  _internal   True if called internally from addHeadersWithRetarget, false otherwise\n @return             True if successfully written, error otherwise",
            "id": 15717,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_addHeaders",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15543,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15538,
                  "name": "_anchor",
                  "nodeType": "VariableDeclaration",
                  "scope": 15717,
                  "src": "7745:20:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15537,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "7745:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15540,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 15717,
                  "src": "7767:21:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15539,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "7767:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15542,
                  "name": "_internal",
                  "nodeType": "VariableDeclaration",
                  "scope": 15717,
                  "src": "7790:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15541,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "7790:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7744:61:55"
            },
            "returnParameters": {
              "id": 15546,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15545,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15717,
                  "src": "7824:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15544,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "7824:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7823:6:55"
            },
            "scope": 16343,
            "src": "7724:2282:55",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 15843,
              "nodeType": "Block",
              "src": "10742:1815:55",
              "statements": [
                {
                  "assignments": [
                    15729
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15729,
                      "name": "_startHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 15843,
                      "src": "10806:20:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15728,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "10806:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15735,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15731,
                            "name": "_oldPeriodStartHeader",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15719,
                            "src": "10841:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15732,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "hash256",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11851,
                          "src": "10841:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 15733,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "10841:31:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 15730,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "10829:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 15734,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10829:44:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "10806:67:55"
                },
                {
                  "assignments": [
                    15737
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15737,
                      "name": "_endHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 15843,
                      "src": "10883:18:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15736,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "10883:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15743,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15739,
                            "name": "_oldPeriodEndHeader",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15721,
                            "src": "10916:19:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15740,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "hash256",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11851,
                          "src": "10916:27:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 15741,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "10916:29:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 15738,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "10904:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 15742,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10904:42:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "10883:63:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 15749,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15747,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 15745,
                            "name": "_endHeight",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15737,
                            "src": "11044:10:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "%",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "32303136",
                            "id": 15746,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "11057:4:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2016_by_1",
                              "typeString": "int_const 2016"
                            },
                            "value": "2016"
                          },
                          "src": "11044:17:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "32303135",
                          "id": 15748,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "11065:4:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_2015_by_1",
                            "typeString": "int_const 2015"
                          },
                          "value": "2015"
                        },
                        "src": "11044:25:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4d7573742070726f7669646520746865206c61737420686561646572206f662074686520636c6f73696e6720646966666963756c747920706572696f64",
                        "id": 15750,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11083:63:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_7bce8283552532854aff5aeca68cfd1afcae4f19a96f4f0f9a36c4ae487d1db8",
                          "typeString": "literal_string \"Must provide the last header of the closing difficulty period\""
                        },
                        "value": "Must provide the last header of the closing difficulty period"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_7bce8283552532854aff5aeca68cfd1afcae4f19a96f4f0f9a36c4ae487d1db8",
                          "typeString": "literal_string \"Must provide the last header of the closing difficulty period\""
                        }
                      ],
                      "id": 15744,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "11023:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15751,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11023:124:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15752,
                  "nodeType": "ExpressionStatement",
                  "src": "11023:124:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 15759,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 15754,
                          "name": "_endHeight",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15737,
                          "src": "11178:10:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "32303135",
                              "id": 15757,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11209:4:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2015_by_1",
                                "typeString": "int_const 2015"
                              },
                              "value": "2015"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_2015_by_1",
                                "typeString": "int_const 2015"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 15755,
                              "name": "_startHeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15729,
                              "src": "11192:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 15756,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13920,
                            "src": "11192:16:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 15758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11192:22:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "11178:36:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4d7573742070726f766964652065786163746c79203120646966666963756c747920706572696f64",
                        "id": 15760,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11228:42:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_67c7c738a8cf54313c844b3267d6767c493dfc5af7d7c931a36a94b2d81f8e3e",
                          "typeString": "literal_string \"Must provide exactly 1 difficulty period\""
                        },
                        "value": "Must provide exactly 1 difficulty period"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_67c7c738a8cf54313c844b3267d6767c493dfc5af7d7c931a36a94b2d81f8e3e",
                          "typeString": "literal_string \"Must provide exactly 1 difficulty period\""
                        }
                      ],
                      "id": 15753,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "11157:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15761,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11157:114:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15762,
                  "nodeType": "ExpressionStatement",
                  "src": "11157:114:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 15770,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 15764,
                              "name": "_oldPeriodStartHeader",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15719,
                              "src": "11302:21:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 15765,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractDifficulty",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 12998,
                            "src": "11302:39:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 15766,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11302:41:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 15767,
                              "name": "_oldPeriodEndHeader",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15721,
                              "src": "11347:19:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 15768,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "extractDifficulty",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 12998,
                            "src": "11347:37:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 15769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11347:39:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "11302:84:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "506572696f642068656164657220646966666963756c7469657320646f206e6f74206d61746368",
                        "id": 15771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11400:41:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c6456ff224d25c664f0efff0894b66e1bf05b6cd6fdb6e7d6c08db546c000032",
                          "typeString": "literal_string \"Period header difficulties do not match\""
                        },
                        "value": "Period header difficulties do not match"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c6456ff224d25c664f0efff0894b66e1bf05b6cd6fdb6e7d6c08db546c000032",
                          "typeString": "literal_string \"Period header difficulties do not match\""
                        }
                      ],
                      "id": 15763,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "11281:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15772,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11281:161:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15773,
                  "nodeType": "ExpressionStatement",
                  "src": "11281:161:55"
                },
                {
                  "assignments": [
                    15775
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15775,
                      "name": "_newPeriodStart",
                      "nodeType": "VariableDeclaration",
                      "scope": 15843,
                      "src": "11547:28:55",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 15774,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "11547:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15781,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 15778,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11593:1:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3830",
                        "id": 15779,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11596:2:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        },
                        "value": "80"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        {
                          "typeIdentifier": "t_rational_80_by_1",
                          "typeString": "int_const 80"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 15776,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15723,
                        "src": "11578:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 15777,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "slice",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13281,
                      "src": "11578:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                      }
                    },
                    "id": 15780,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11578:21:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "11547:52:55"
                },
                {
                  "assignments": [
                    15783
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15783,
                      "name": "_actualTarget",
                      "nodeType": "VariableDeclaration",
                      "scope": 15843,
                      "src": "11609:21:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15782,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "11609:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15787,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 15784,
                        "name": "_newPeriodStart",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15775,
                        "src": "11633:15:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 15785,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "extractTarget",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 12925,
                      "src": "11633:29:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (uint256)"
                      }
                    },
                    "id": 15786,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11633:31:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "11609:55:55"
                },
                {
                  "assignments": [
                    15789
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15789,
                      "name": "_expectedTarget",
                      "nodeType": "VariableDeclaration",
                      "scope": 15843,
                      "src": "11674:23:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15788,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "11674:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15802,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15792,
                            "name": "_oldPeriodStartHeader",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15719,
                            "src": "11740:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15793,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractTarget",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 12925,
                          "src": "11740:35:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (uint256)"
                          }
                        },
                        "id": 15794,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "11740:37:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15795,
                            "name": "_oldPeriodStartHeader",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15719,
                            "src": "11791:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15796,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractTimestamp",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 12984,
                          "src": "11791:38:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (uint32)"
                          }
                        },
                        "id": 15797,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "11791:40:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15798,
                            "name": "_oldPeriodEndHeader",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15721,
                            "src": "11845:19:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 15799,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "extractTimestamp",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 12984,
                          "src": "11845:36:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (uint32)"
                          }
                        },
                        "id": 15800,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "11845:38:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        },
                        {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 15790,
                        "name": "BTCUtils",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 13216,
                        "src": "11700:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BTCUtils_$13216_$",
                          "typeString": "type(library BTCUtils)"
                        }
                      },
                      "id": 15791,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "retargetAlgorithm",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13215,
                      "src": "11700:26:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 15801,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11700:193:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "11674:219:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 15809,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 15806,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 15804,
                                "name": "_actualTarget",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15783,
                                "src": "11925:13:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 15805,
                                "name": "_expectedTarget",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15789,
                                "src": "11941:15:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "11925:31:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 15807,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "11924:33:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 15808,
                          "name": "_actualTarget",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15783,
                          "src": "11961:13:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "11924:50:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "496e76616c69642072657461726765742070726f7669646564",
                        "id": 15810,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11988:27:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_88fb068d9d9bb4cb430555f47426ce90db05a008971325835664896da5946718",
                          "typeString": "literal_string \"Invalid retarget provided\""
                        },
                        "value": "Invalid retarget provided"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_88fb068d9d9bb4cb430555f47426ce90db05a008971325835664896da5946718",
                          "typeString": "literal_string \"Invalid retarget provided\""
                        }
                      ],
                      "id": 15803,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "11903:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15811,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11903:113:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15812,
                  "nodeType": "ExpressionStatement",
                  "src": "11903:113:55"
                },
                {
                  "assignments": [
                    15814
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15814,
                      "name": "_oldDiff",
                      "nodeType": "VariableDeclaration",
                      "scope": 15843,
                      "src": "12226:16:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15813,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "12226:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15818,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 15815,
                        "name": "_oldPeriodStartHeader",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15719,
                        "src": "12245:21:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 15816,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "extractDifficulty",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 12998,
                      "src": "12245:39:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (uint256)"
                      }
                    },
                    "id": 15817,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "12245:41:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "12226:60:55"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 15830,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 15821,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 15819,
                        "name": "prevEpochDiff",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15324,
                        "src": "12300:13:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 15820,
                        "name": "_oldDiff",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15814,
                        "src": "12317:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "12300:25:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 15829,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 15822,
                        "name": "_endHeight",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15737,
                        "src": "12329:10:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">",
                      "rightExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "32303136",
                            "id": 15827,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "12375:4:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2016_by_1",
                              "typeString": "int_const 2016"
                            },
                            "value": "2016"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_2016_by_1",
                              "typeString": "int_const 2016"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 15824,
                                "name": "bestKnownDigest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15310,
                                "src": "12354:15:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 15823,
                              "name": "_findHeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15905,
                              "src": "12342:11:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                                "typeString": "function (bytes32) view returns (uint256)"
                              }
                            },
                            "id": 15825,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "12342:28:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15826,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sub",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13895,
                          "src": "12342:32:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 15828,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "12342:38:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "12329:51:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "12300:80:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 15836,
                  "nodeType": "IfStatement",
                  "src": "12296:135:55",
                  "trueBody": {
                    "id": 15835,
                    "nodeType": "Block",
                    "src": "12382:49:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15833,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15831,
                            "name": "prevEpochDiff",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15324,
                            "src": "12396:13:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 15832,
                            "name": "_oldDiff",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15814,
                            "src": "12412:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "12396:24:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15834,
                        "nodeType": "ExpressionStatement",
                        "src": "12396:24:55"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 15838,
                        "name": "_oldPeriodEndHeader",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15721,
                        "src": "12514:19:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 15839,
                        "name": "_headers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15723,
                        "src": "12535:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "74727565",
                        "id": 15840,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "bool",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "12545:4:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "value": "true"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 15837,
                      "name": "_addHeaders",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15717,
                      "src": "12502:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bool_$returns$_t_bool_$",
                        "typeString": "function (bytes memory,bytes memory,bool) returns (bool)"
                      }
                    },
                    "id": 15841,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "12502:48:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 15727,
                  "id": 15842,
                  "nodeType": "Return",
                  "src": "12495:55:55"
                }
              ]
            },
            "documentation": "@notice                       Adds headers to storage, performs additional validation of retarget\n @dev                          Checks the retarget, the heights, and the linkage\n @param  _oldPeriodStartHeader The first header in the difficulty period being closed\n @param  _oldPeriodEndHeader   The last header in the difficulty period being closed\n @param  _headers              A tightly-packed list of 80-byte Bitcoin headers\n @return                       True if successfully written, error otherwise",
            "id": 15844,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_addHeadersWithRetarget",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15724,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15719,
                  "name": "_oldPeriodStartHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 15844,
                  "src": "10604:34:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15718,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "10604:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15721,
                  "name": "_oldPeriodEndHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 15844,
                  "src": "10648:32:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15720,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "10648:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15723,
                  "name": "_headers",
                  "nodeType": "VariableDeclaration",
                  "scope": 15844,
                  "src": "10690:21:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 15722,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "10690:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10594:123:55"
            },
            "returnParameters": {
              "id": 15727,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15726,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15844,
                  "src": "10736:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15725,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "10736:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10735:6:55"
            },
            "scope": 16343,
            "src": "10562:1995:55",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 15904,
              "nodeType": "Block",
              "src": "12864:387:55",
              "statements": [
                {
                  "assignments": [
                    15852
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15852,
                      "name": "_height",
                      "nodeType": "VariableDeclaration",
                      "scope": 15904,
                      "src": "12874:15:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 15851,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "12874:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15854,
                  "initialValue": {
                    "argumentTypes": null,
                    "hexValue": "30",
                    "id": 15853,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "12892:1:55",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_0_by_1",
                      "typeString": "int_const 0"
                    },
                    "value": "0"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "12874:19:55"
                },
                {
                  "assignments": [
                    15856
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15856,
                      "name": "_current",
                      "nodeType": "VariableDeclaration",
                      "scope": 15904,
                      "src": "12903:16:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 15855,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "12903:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15858,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 15857,
                    "name": "_digest",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15846,
                    "src": "12922:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "12903:26:55"
                },
                {
                  "body": {
                    "id": 15898,
                    "nodeType": "Block",
                    "src": "12998:214:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15879,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15875,
                            "name": "_height",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15852,
                            "src": "13012:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 15876,
                              "name": "blockHeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15320,
                              "src": "13022:11:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$",
                                "typeString": "mapping(bytes32 => uint256)"
                              }
                            },
                            "id": 15878,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 15877,
                              "name": "_current",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15856,
                              "src": "13034:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "13022:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "13012:31:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15880,
                        "nodeType": "ExpressionStatement",
                        "src": "13012:31:55"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15883,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 15881,
                            "name": "_height",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15852,
                            "src": "13061:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 15882,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "13072:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "13061:12:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 15896,
                          "nodeType": "Block",
                          "src": "13148:54:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 15893,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15860,
                                    "src": "13185:1:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 15891,
                                    "name": "_height",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15852,
                                    "src": "13173:7:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 15892,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "add",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 13920,
                                  "src": "13173:11:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 15894,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "13173:14:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 15850,
                              "id": 15895,
                              "nodeType": "Return",
                              "src": "13166:21:55"
                            }
                          ]
                        },
                        "id": 15897,
                        "nodeType": "IfStatement",
                        "src": "13057:145:55",
                        "trueBody": {
                          "id": 15890,
                          "nodeType": "Block",
                          "src": "13075:67:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 15888,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 15884,
                                  "name": "_current",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15856,
                                  "src": "13093:8:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 15885,
                                    "name": "previousBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15316,
                                    "src": "13104:13:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                      "typeString": "mapping(bytes32 => bytes32)"
                                    }
                                  },
                                  "id": 15887,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 15886,
                                    "name": "_current",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15856,
                                    "src": "13118:8:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "13104:23:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "13093:34:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15889,
                              "nodeType": "ExpressionStatement",
                              "src": "13093:34:55"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 15867,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 15863,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15860,
                      "src": "12959:1:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      },
                      "id": 15866,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 15864,
                        "name": "HEIGHT_INTERVAL",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15306,
                        "src": "12963:15:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "31",
                        "id": 15865,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "12981:1:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "src": "12963:19:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "src": "12959:23:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 15899,
                  "initializationExpression": {
                    "assignments": [
                      15860
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 15860,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 15899,
                        "src": "12944:9:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15859,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12944:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 15862,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 15861,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "12956:1:55",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "12944:13:55"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 15873,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 15868,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15860,
                        "src": "12984:1:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 15871,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "12994:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15869,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15860,
                            "src": "12988:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15870,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "add",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13920,
                          "src": "12988:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 15872,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "12988:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "12984:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 15874,
                    "nodeType": "ExpressionStatement",
                    "src": "12984:12:55"
                  },
                  "nodeType": "ForStatement",
                  "src": "12939:273:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "556e6b6e6f776e20626c6f636b",
                        "id": 15901,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "13228:15:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2fe269f479def214aa4213fc5a3676b42da06f3fe6bec66494b82d7cb74589b0",
                          "typeString": "literal_string \"Unknown block\""
                        },
                        "value": "Unknown block"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_stringliteral_2fe269f479def214aa4213fc5a3676b42da06f3fe6bec66494b82d7cb74589b0",
                          "typeString": "literal_string \"Unknown block\""
                        }
                      ],
                      "id": 15900,
                      "name": "revert",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18365,
                        18366
                      ],
                      "referencedDeclaration": 18366,
                      "src": "13221:6:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (string memory) pure"
                      }
                    },
                    "id": 15902,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "13221:23:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15903,
                  "nodeType": "ExpressionStatement",
                  "src": "13221:23:55"
                }
              ]
            },
            "documentation": "@notice         Finds the height of a header by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header",
            "id": 15905,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_findHeight",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15847,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15846,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 15905,
                  "src": "12815:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15845,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "12815:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "12814:17:55"
            },
            "returnParameters": {
              "id": 15850,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15849,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15905,
                  "src": "12855:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15848,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "12855:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "12854:9:55"
            },
            "scope": 16343,
            "src": "12794:457:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 15951,
              "nodeType": "Block",
              "src": "13599:244:55",
              "statements": [
                {
                  "assignments": [
                    15915
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15915,
                      "name": "_current",
                      "nodeType": "VariableDeclaration",
                      "scope": 15951,
                      "src": "13609:16:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 15914,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "13609:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15917,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 15916,
                    "name": "_digest",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15907,
                    "src": "13628:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "13609:26:55"
                },
                {
                  "body": {
                    "id": 15938,
                    "nodeType": "Block",
                    "src": "13692:59:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15936,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15932,
                            "name": "_current",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15915,
                            "src": "13706:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 15933,
                              "name": "previousBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15316,
                              "src": "13717:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                "typeString": "mapping(bytes32 => bytes32)"
                              }
                            },
                            "id": 15935,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 15934,
                              "name": "_current",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15915,
                              "src": "13731:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "13717:23:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "13706:34:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15937,
                        "nodeType": "ExpressionStatement",
                        "src": "13706:34:55"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 15924,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 15922,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15919,
                      "src": "13665:1:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 15923,
                      "name": "_offset",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15909,
                      "src": "13669:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "13665:11:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 15939,
                  "initializationExpression": {
                    "assignments": [
                      15919
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 15919,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 15939,
                        "src": "13650:9:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15918,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13650:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 15921,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 15920,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "13662:1:55",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "13650:13:55"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 15930,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 15925,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15919,
                        "src": "13678:1:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 15928,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "13688:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15926,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15919,
                            "src": "13682:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15927,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "add",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13920,
                          "src": "13682:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 15929,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "13682:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "13678:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 15931,
                    "nodeType": "ExpressionStatement",
                    "src": "13678:12:55"
                  },
                  "nodeType": "ForStatement",
                  "src": "13645:106:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 15945,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 15941,
                          "name": "_current",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15915,
                          "src": "13768:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 15943,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "13788:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 15942,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "13780:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": "bytes32"
                          },
                          "id": 15944,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13780:10:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "13768:22:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "556e6b6e6f776e20616e636573746f72",
                        "id": 15946,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "13792:18:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c461b76bf1480a8b20105a19184a1758b87ce3c97e130df422cacaf91904c3a2",
                          "typeString": "literal_string \"Unknown ancestor\""
                        },
                        "value": "Unknown ancestor"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c461b76bf1480a8b20105a19184a1758b87ce3c97e130df422cacaf91904c3a2",
                          "typeString": "literal_string \"Unknown ancestor\""
                        }
                      ],
                      "id": 15940,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "13760:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 15947,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "13760:51:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 15948,
                  "nodeType": "ExpressionStatement",
                  "src": "13760:51:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 15949,
                    "name": "_current",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15915,
                    "src": "13828:8:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 15913,
                  "id": 15950,
                  "nodeType": "Return",
                  "src": "13821:15:55"
                }
              ]
            },
            "documentation": "@notice         Finds an ancestor for a block by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header, or error if unknown",
            "id": 15952,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_findAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15910,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15907,
                  "name": "_digest",
                  "nodeType": "VariableDeclaration",
                  "scope": 15952,
                  "src": "13533:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15906,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "13533:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15909,
                  "name": "_offset",
                  "nodeType": "VariableDeclaration",
                  "scope": 15952,
                  "src": "13550:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15908,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "13550:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "13532:34:55"
            },
            "returnParameters": {
              "id": 15913,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15912,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15952,
                  "src": "13590:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15911,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "13590:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "13589:9:55"
            },
            "scope": 16343,
            "src": "13510:333:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 15998,
              "nodeType": "Block",
              "src": "14404:332:55",
              "statements": [
                {
                  "assignments": [
                    15964
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 15964,
                      "name": "_current",
                      "nodeType": "VariableDeclaration",
                      "scope": 15998,
                      "src": "14414:16:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 15963,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "14414:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 15966,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 15965,
                    "name": "_descendant",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 15956,
                    "src": "14433:11:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "14414:30:55"
                },
                {
                  "body": {
                    "id": 15994,
                    "nodeType": "Block",
                    "src": "14565:143:55",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 15983,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 15981,
                            "name": "_current",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15964,
                            "src": "14583:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 15982,
                            "name": "_ancestor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15954,
                            "src": "14595:9:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "14583:21:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 15987,
                        "nodeType": "IfStatement",
                        "src": "14579:71:55",
                        "trueBody": {
                          "id": 15986,
                          "nodeType": "Block",
                          "src": "14606:44:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "hexValue": "74727565",
                                "id": 15984,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "14631:4:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "true"
                              },
                              "functionReturnParameters": 15962,
                              "id": 15985,
                              "nodeType": "Return",
                              "src": "14624:11:55"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 15992,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 15988,
                            "name": "_current",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15964,
                            "src": "14663:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 15989,
                              "name": "previousBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15316,
                              "src": "14674:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                "typeString": "mapping(bytes32 => bytes32)"
                              }
                            },
                            "id": 15991,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 15990,
                              "name": "_current",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15964,
                              "src": "14688:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "14674:23:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "14663:34:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15993,
                        "nodeType": "ExpressionStatement",
                        "src": "14663:34:55"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 15973,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 15971,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15968,
                      "src": "14539:1:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 15972,
                      "name": "_limit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15958,
                      "src": "14543:6:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "14539:10:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 15995,
                  "initializationExpression": {
                    "assignments": [
                      15968
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 15968,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 15995,
                        "src": "14524:9:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15967,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14524:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 15970,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 15969,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "14536:1:55",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "14524:13:55"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 15979,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 15974,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15968,
                        "src": "14551:1:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 15977,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14561:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 15975,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15968,
                            "src": "14555:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15976,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "add",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13920,
                          "src": "14555:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 15978,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "14555:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "14551:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 15980,
                    "nodeType": "ExpressionStatement",
                    "src": "14551:12:55"
                  },
                  "nodeType": "ForStatement",
                  "src": "14519:189:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "66616c7365",
                    "id": 15996,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "14724:5:55",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "functionReturnParameters": 15962,
                  "id": 15997,
                  "nodeType": "Return",
                  "src": "14717:12:55"
                }
              ]
            },
            "documentation": "@notice             Checks if a digest is an ancestor of the current one\n @dev                Limit the amount of lookups (and thus gas usage) with _limit\n @param _ancestor    The prospective ancestor\n @param _descendant  The descendant to check\n @param _limit       The maximum number of blocks to check\n @return             true if ancestor is at most limit blocks lower than descendant, otherwise false",
            "id": 15999,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_isAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 15959,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15954,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 15999,
                  "src": "14319:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15953,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "14319:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15956,
                  "name": "_descendant",
                  "nodeType": "VariableDeclaration",
                  "scope": 15999,
                  "src": "14338:19:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 15955,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "14338:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 15958,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 15999,
                  "src": "14359:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15957,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "14359:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "14318:56:55"
            },
            "returnParameters": {
              "id": 15962,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 15961,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 15999,
                  "src": "14398:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 15960,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "14398:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "14397:6:55"
            },
            "scope": 16343,
            "src": "14298:438:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 16101,
              "nodeType": "Block",
              "src": "15397:1114:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 16015,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 16013,
                          "name": "_limit",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16007,
                          "src": "15415:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "32303136",
                          "id": 16014,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "15425:4:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_2016_by_1",
                            "typeString": "int_const 2016"
                          },
                          "value": "2016"
                        },
                        "src": "15415:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526571756573746564206c696d69742069732067726561746572207468616e203120646966666963756c747920706572696f64",
                        "id": 16016,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "15431:53:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_34b0e8aa7e872c1823abee92749e80e1aaaa8c704daa024b6296520f08dccd95",
                          "typeString": "literal_string \"Requested limit is greater than 1 difficulty period\""
                        },
                        "value": "Requested limit is greater than 1 difficulty period"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_34b0e8aa7e872c1823abee92749e80e1aaaa8c704daa024b6296520f08dccd95",
                          "typeString": "literal_string \"Requested limit is greater than 1 difficulty period\""
                        }
                      ],
                      "id": 16012,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "15407:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 16017,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15407:78:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16018,
                  "nodeType": "ExpressionStatement",
                  "src": "15407:78:55"
                },
                {
                  "assignments": [
                    16020
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16020,
                      "name": "_newBestDigest",
                      "nodeType": "VariableDeclaration",
                      "scope": 16101,
                      "src": "15495:22:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 16019,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "15495:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16024,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 16021,
                        "name": "_newBest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16005,
                        "src": "15520:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 16022,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11851,
                      "src": "15520:16:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 16023,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15520:18:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "15495:43:55"
                },
                {
                  "assignments": [
                    16026
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16026,
                      "name": "_currentBestDigest",
                      "nodeType": "VariableDeclaration",
                      "scope": 16101,
                      "src": "15548:26:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 16025,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "15548:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16030,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 16027,
                        "name": "_currentBest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16003,
                        "src": "15577:12:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 16028,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hash256",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11851,
                      "src": "15577:20:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 16029,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15577:22:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "15548:51:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 16034,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 16032,
                          "name": "_currentBestDigest",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16026,
                          "src": "15617:18:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 16033,
                          "name": "bestKnownDigest",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15310,
                          "src": "15639:15:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "15617:37:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "50617373656420696e2062657374206973206e6f742062657374206b6e6f776e",
                        "id": 16035,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "15656:34:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_08d40782ec860529d1a49d4deccf329d686c48a4affb967e8f3fe896477d9012",
                          "typeString": "literal_string \"Passed in best is not best known\""
                        },
                        "value": "Passed in best is not best known"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_08d40782ec860529d1a49d4deccf329d686c48a4affb967e8f3fe896477d9012",
                          "typeString": "literal_string \"Passed in best is not best known\""
                        }
                      ],
                      "id": 16031,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "15609:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 16036,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15609:82:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16037,
                  "nodeType": "ExpressionStatement",
                  "src": "15609:82:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 16045,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 16039,
                            "name": "previousBlock",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15316,
                            "src": "15722:13:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                              "typeString": "mapping(bytes32 => bytes32)"
                            }
                          },
                          "id": 16041,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 16040,
                            "name": "_newBestDigest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16020,
                            "src": "15736:14:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "15722:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 16043,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "15763:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 16042,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "15755:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": "bytes32"
                          },
                          "id": 16044,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15755:10:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "15722:43:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4e6577206265737420697320756e6b6e6f776e",
                        "id": 16046,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "15779:21:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_21175d40c2ebef79a732817277d464b099ad41722534bb4c1a81ec30c878b42d",
                          "typeString": "literal_string \"New best is unknown\""
                        },
                        "value": "New best is unknown"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_21175d40c2ebef79a732817277d464b099ad41722534bb4c1a81ec30c878b42d",
                          "typeString": "literal_string \"New best is unknown\""
                        }
                      ],
                      "id": 16038,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "15701:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 16047,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15701:100:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16048,
                  "nodeType": "ExpressionStatement",
                  "src": "15701:100:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 16051,
                            "name": "_ancestor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16001,
                            "src": "15854:9:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 16052,
                            "name": "bestKnownDigest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15310,
                            "src": "15865:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 16053,
                            "name": "_newBestDigest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16020,
                            "src": "15882:14:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 16054,
                            "name": "_limit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16007,
                            "src": "15898:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 16050,
                          "name": "_isMostRecentAncestor",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16205,
                          "src": "15832:21:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (bytes32,bytes32,bytes32,uint256) view returns (bool)"
                          }
                        },
                        "id": 16055,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "15832:73:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "416e636573746f72206d75737420626520686561766965737420636f6d6d6f6e20616e636573746f72",
                        "id": 16056,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "15919:43:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_fcaf5361cb1b11aa6567d172fd21d0d1e008d17e89623abf194305ef538c3052",
                          "typeString": "literal_string \"Ancestor must be heaviest common ancestor\""
                        },
                        "value": "Ancestor must be heaviest common ancestor"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_fcaf5361cb1b11aa6567d172fd21d0d1e008d17e89623abf194305ef538c3052",
                          "typeString": "literal_string \"Ancestor must be heaviest common ancestor\""
                        }
                      ],
                      "id": 16049,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "15811:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 16057,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15811:152:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16058,
                  "nodeType": "ExpressionStatement",
                  "src": "15811:152:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "id": 16066,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 16061,
                              "name": "_ancestor",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16001,
                              "src": "16016:9:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 16062,
                              "name": "_currentBest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16003,
                              "src": "16027:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 16063,
                              "name": "_newBest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16005,
                              "src": "16041:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 16060,
                            "name": "_heaviestFromAncestor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16342,
                            "src": "15994:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32,bytes memory,bytes memory) view returns (bytes32)"
                            }
                          },
                          "id": 16064,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15994:56:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 16065,
                          "name": "_newBestDigest",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16020,
                          "src": "16054:14:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "src": "15994:74:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4e65772062657374206861736820646f6573206e6f742068617665206d6f726520776f726b207468616e2070726576696f7573",
                        "id": 16067,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "16082:53:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_9fd7a9403f83332e39cd942cb934228aad1aa94f9f120f93fcbad363acc5034e",
                          "typeString": "literal_string \"New best hash does not have more work than previous\""
                        },
                        "value": "New best hash does not have more work than previous"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_9fd7a9403f83332e39cd942cb934228aad1aa94f9f120f93fcbad363acc5034e",
                          "typeString": "literal_string \"New best hash does not have more work than previous\""
                        }
                      ],
                      "id": 16059,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "15973:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 16068,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "15973:163:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16069,
                  "nodeType": "ExpressionStatement",
                  "src": "15973:163:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 16072,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 16070,
                      "name": "bestKnownDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15310,
                      "src": "16147:15:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 16071,
                      "name": "_newBestDigest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16020,
                      "src": "16165:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "16147:32:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 16073,
                  "nodeType": "ExpressionStatement",
                  "src": "16147:32:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 16076,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 16074,
                      "name": "lastReorgCommonAncestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15312,
                      "src": "16189:23:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 16075,
                      "name": "_ancestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16001,
                      "src": "16215:9:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "16189:35:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 16077,
                  "nodeType": "ExpressionStatement",
                  "src": "16189:35:55"
                },
                {
                  "assignments": [
                    16079
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16079,
                      "name": "_newDiff",
                      "nodeType": "VariableDeclaration",
                      "scope": 16101,
                      "src": "16235:16:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 16078,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "16235:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16083,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 16080,
                        "name": "_newBest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16005,
                        "src": "16254:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 16081,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "extractDifficulty",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 12998,
                      "src": "16254:26:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) pure returns (uint256)"
                      }
                    },
                    "id": 16082,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "16254:28:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "16235:47:55"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 16086,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16084,
                      "name": "_newDiff",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16079,
                      "src": "16296:8:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16085,
                      "name": "currentEpochDiff",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15322,
                      "src": "16308:16:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "16296:28:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 16092,
                  "nodeType": "IfStatement",
                  "src": "16292:86:55",
                  "trueBody": {
                    "id": 16091,
                    "nodeType": "Block",
                    "src": "16326:52:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 16089,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 16087,
                            "name": "currentEpochDiff",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15322,
                            "src": "16340:16:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 16088,
                            "name": "_newDiff",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16079,
                            "src": "16359:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "16340:27:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 16090,
                        "nodeType": "ExpressionStatement",
                        "src": "16340:27:55"
                      }
                    ]
                  }
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 16094,
                        "name": "_currentBestDigest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16026,
                        "src": "16413:18:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16095,
                        "name": "_newBestDigest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16020,
                        "src": "16445:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16096,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16001,
                        "src": "16473:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 16093,
                      "name": "NewTip",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 14307,
                      "src": "16393:6:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$__$",
                        "typeString": "function (bytes32,bytes32,bytes32)"
                      }
                    },
                    "id": 16097,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "16393:90:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16098,
                  "nodeType": "EmitStatement",
                  "src": "16388:95:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 16099,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "16500:4:55",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 16011,
                  "id": 16100,
                  "nodeType": "Return",
                  "src": "16493:11:55"
                }
              ]
            },
            "documentation": "@notice                   Marks the new best-known chain tip\n @param  _ancestor         The digest of the most recent common ancestor\n @param  _currentBest      The 80-byte header referenced by bestKnownDigest\n @param  _newBest          The 80-byte header to mark as the new best\n @param  _limit            Limit the amount of traversal of the chain\n @return                   True if successfully updates bestKnownDigest, error otherwise",
            "id": 16102,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_markNewHeaviest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 16008,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16001,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 16102,
                  "src": "15259:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16000,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "15259:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16003,
                  "name": "_currentBest",
                  "nodeType": "VariableDeclaration",
                  "scope": 16102,
                  "src": "15286:25:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16002,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "15286:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16005,
                  "name": "_newBest",
                  "nodeType": "VariableDeclaration",
                  "scope": 16102,
                  "src": "15321:21:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16004,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "15321:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16007,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 16102,
                  "src": "15352:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16006,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "15352:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "15249:123:55"
            },
            "returnParameters": {
              "id": 16011,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16010,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 16102,
                  "src": "15391:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 16009,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "15391:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "15390:6:55"
            },
            "scope": 16343,
            "src": "15224:1287:55",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 16204,
              "nodeType": "Block",
              "src": "17162:918:55",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 16121,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 16117,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 16115,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16104,
                        "src": "17207:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 16116,
                        "name": "_left",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16106,
                        "src": "17220:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "src": "17207:18:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 16120,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 16118,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16104,
                        "src": "17229:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 16119,
                        "name": "_right",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16108,
                        "src": "17242:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "src": "17229:19:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "17207:41:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 16125,
                  "nodeType": "IfStatement",
                  "src": "17203:83:55",
                  "trueBody": {
                    "id": 16124,
                    "nodeType": "Block",
                    "src": "17250:36:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 16122,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "17271:4:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 16114,
                        "id": 16123,
                        "nodeType": "Return",
                        "src": "17264:11:55"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    16127
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16127,
                      "name": "_leftCurrent",
                      "nodeType": "VariableDeclaration",
                      "scope": 16204,
                      "src": "17296:20:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 16126,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "17296:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16129,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 16128,
                    "name": "_left",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16106,
                    "src": "17319:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "17296:28:55"
                },
                {
                  "assignments": [
                    16131
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16131,
                      "name": "_rightCurrent",
                      "nodeType": "VariableDeclaration",
                      "scope": 16204,
                      "src": "17334:21:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 16130,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "17334:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16133,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 16132,
                    "name": "_right",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16108,
                    "src": "17358:6:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "17334:30:55"
                },
                {
                  "assignments": [
                    16135
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16135,
                      "name": "_leftPrev",
                      "nodeType": "VariableDeclaration",
                      "scope": 16204,
                      "src": "17374:17:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 16134,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "17374:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16137,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 16136,
                    "name": "_left",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16106,
                    "src": "17394:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "17374:25:55"
                },
                {
                  "assignments": [
                    16139
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16139,
                      "name": "_rightPrev",
                      "nodeType": "VariableDeclaration",
                      "scope": 16204,
                      "src": "17409:18:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 16138,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "17409:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16141,
                  "initialValue": {
                    "argumentTypes": null,
                    "id": 16140,
                    "name": "_right",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16108,
                    "src": "17430:6:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "17409:27:55"
                },
                {
                  "body": {
                    "id": 16186,
                    "nodeType": "Block",
                    "src": "17492:368:55",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 16158,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 16156,
                            "name": "_leftPrev",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16135,
                            "src": "17510:9:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 16157,
                            "name": "_ancestor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16104,
                            "src": "17523:9:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "17510:22:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 16170,
                        "nodeType": "IfStatement",
                        "src": "17506:163:55",
                        "trueBody": {
                          "id": 16169,
                          "nodeType": "Block",
                          "src": "17534:135:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 16161,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 16159,
                                  "name": "_leftCurrent",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16127,
                                  "src": "17552:12:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "id": 16160,
                                  "name": "_leftPrev",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16135,
                                  "src": "17567:9:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "17552:24:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 16162,
                              "nodeType": "ExpressionStatement",
                              "src": "17552:24:55"
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 16167,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 16163,
                                  "name": "_leftPrev",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16135,
                                  "src": "17604:9:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 16164,
                                    "name": "previousBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15316,
                                    "src": "17616:13:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                      "typeString": "mapping(bytes32 => bytes32)"
                                    }
                                  },
                                  "id": 16166,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 16165,
                                    "name": "_leftPrev",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16135,
                                    "src": "17630:9:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "17616:24:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "17604:36:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 16168,
                              "nodeType": "ExpressionStatement",
                              "src": "17604:36:55"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 16173,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 16171,
                            "name": "_rightPrev",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16139,
                            "src": "17686:10:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 16172,
                            "name": "_ancestor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16104,
                            "src": "17700:9:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "17686:23:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 16185,
                        "nodeType": "IfStatement",
                        "src": "17682:168:55",
                        "trueBody": {
                          "id": 16184,
                          "nodeType": "Block",
                          "src": "17711:139:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 16176,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 16174,
                                  "name": "_rightCurrent",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16131,
                                  "src": "17729:13:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "id": 16175,
                                  "name": "_rightPrev",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16139,
                                  "src": "17745:10:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "17729:26:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 16177,
                              "nodeType": "ExpressionStatement",
                              "src": "17729:26:55"
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 16182,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 16178,
                                  "name": "_rightPrev",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16139,
                                  "src": "17783:10:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 16179,
                                    "name": "previousBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15316,
                                    "src": "17796:13:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$",
                                      "typeString": "mapping(bytes32 => bytes32)"
                                    }
                                  },
                                  "id": 16181,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 16180,
                                    "name": "_rightPrev",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16139,
                                    "src": "17810:10:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "17796:25:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "17783:38:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 16183,
                              "nodeType": "ExpressionStatement",
                              "src": "17783:38:55"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 16148,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16146,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16143,
                      "src": "17466:1:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16147,
                      "name": "_limit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16110,
                      "src": "17470:6:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "17466:10:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 16187,
                  "initializationExpression": {
                    "assignments": [
                      16143
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 16143,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 16187,
                        "src": "17451:9:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16142,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17451:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 16145,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 16144,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "17463:1:55",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "17451:13:55"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 16154,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 16149,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16143,
                        "src": "17478:1:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 16152,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "17488:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 16150,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16143,
                            "src": "17482:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16151,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "add",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13920,
                          "src": "17482:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 16153,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "17482:8:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "17478:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 16155,
                    "nodeType": "ExpressionStatement",
                    "src": "17478:12:55"
                  },
                  "nodeType": "ForStatement",
                  "src": "17447:413:55"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 16190,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16188,
                      "name": "_leftCurrent",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16127,
                      "src": "17873:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16189,
                      "name": "_rightCurrent",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16131,
                      "src": "17889:13:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "17873:29:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 16194,
                  "nodeType": "IfStatement",
                  "src": "17869:50:55",
                  "trueBody": {
                    "id": 16193,
                    "nodeType": "Block",
                    "src": "17904:15:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 16191,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "17912:5:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 16114,
                        "id": 16192,
                        "nodeType": "Return",
                        "src": "17905:12:55"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    },
                    "id": 16197,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16195,
                      "name": "_leftPrev",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16135,
                      "src": "17981:9:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16196,
                      "name": "_rightPrev",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16139,
                      "src": "17994:10:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "17981:23:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 16201,
                  "nodeType": "IfStatement",
                  "src": "17977:44:55",
                  "trueBody": {
                    "id": 16200,
                    "nodeType": "Block",
                    "src": "18006:15:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 16198,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "18014:5:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 16114,
                        "id": 16199,
                        "nodeType": "Return",
                        "src": "18007:12:55"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 16202,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "18069:4:55",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 16114,
                  "id": 16203,
                  "nodeType": "Return",
                  "src": "18062:11:55"
                }
              ]
            },
            "documentation": "@notice             Checks if a digest is an ancestor of the current one\n @dev                Limit the amount of lookups (and thus gas usage) with _limit\n @param _ancestor    The prospective shared ancestor\n @param _left        A chain tip\n @param _right       A chain tip\n @param _limit       The maximum number of blocks to check\n @return             true if it is the most recent common ancestor within _limit, false otherwise",
            "id": 16205,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_isMostRecentAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 16111,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16104,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 16205,
                  "src": "17038:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16103,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "17038:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16106,
                  "name": "_left",
                  "nodeType": "VariableDeclaration",
                  "scope": 16205,
                  "src": "17065:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16105,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "17065:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16108,
                  "name": "_right",
                  "nodeType": "VariableDeclaration",
                  "scope": 16205,
                  "src": "17088:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16107,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "17088:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16110,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 16205,
                  "src": "17112:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16109,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "17112:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "17028:104:55"
            },
            "returnParameters": {
              "id": 16114,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16113,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 16205,
                  "src": "17156:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 16112,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "17156:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "17155:6:55"
            },
            "scope": 16343,
            "src": "16998:1082:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 16341,
              "nodeType": "Block",
              "src": "18636:1615:55",
              "statements": [
                {
                  "assignments": [
                    16217
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16217,
                      "name": "_ancestorHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 16341,
                      "src": "18646:23:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 16216,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "18646:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16221,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 16219,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16207,
                        "src": "18684:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 16218,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "18672:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 16220,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "18672:22:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "18646:48:55"
                },
                {
                  "assignments": [
                    16223
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16223,
                      "name": "_leftHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 16341,
                      "src": "18704:19:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 16222,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "18704:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16229,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 16225,
                            "name": "_left",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16209,
                            "src": "18738:5:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 16226,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "hash256",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11851,
                          "src": "18738:13:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 16227,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "18738:15:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 16224,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "18726:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 16228,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "18726:28:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "18704:50:55"
                },
                {
                  "assignments": [
                    16231
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16231,
                      "name": "_rightHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 16341,
                      "src": "18764:20:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 16230,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "18764:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16237,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "argumentTypes": null,
                            "id": 16233,
                            "name": "_right",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16211,
                            "src": "18799:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 16234,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "hash256",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11851,
                          "src": "18799:14:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 16235,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "18799:16:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 16232,
                      "name": "_findHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 15905,
                      "src": "18787:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",
                        "typeString": "function (bytes32) view returns (uint256)"
                      }
                    },
                    "id": 16236,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "18787:29:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "18764:52:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 16245,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16241,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 16239,
                            "name": "_leftHeight",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16223,
                            "src": "18848:11:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 16240,
                            "name": "_ancestorHeight",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16217,
                            "src": "18863:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "18848:30:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16244,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 16242,
                            "name": "_rightHeight",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16231,
                            "src": "18882:12:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 16243,
                            "name": "_ancestorHeight",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16217,
                            "src": "18898:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "18882:31:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "18848:65:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "412064657363656e64616e74206865696768742069732062656c6f772074686520616e636573746f7220686569676874",
                        "id": 16246,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "18927:50:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_b58061f6326ff3d0324de253af04d745211e5ff4898fed03b468cbd3387ef7f2",
                          "typeString": "literal_string \"A descendant height is below the ancestor height\""
                        },
                        "value": "A descendant height is below the ancestor height"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_b58061f6326ff3d0324de253af04d745211e5ff4898fed03b468cbd3387ef7f2",
                          "typeString": "literal_string \"A descendant height is below the ancestor height\""
                        }
                      ],
                      "id": 16238,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "18827:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 16247,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "18827:151:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 16248,
                  "nodeType": "ExpressionStatement",
                  "src": "18827:151:55"
                },
                {
                  "assignments": [
                    16250
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16250,
                      "name": "_nextPeriodStartHeight",
                      "nodeType": "VariableDeclaration",
                      "scope": 16341,
                      "src": "19086:30:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 16249,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "19086:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16260,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 16258,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 16256,
                          "name": "_ancestorHeight",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16217,
                          "src": "19149:15:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "%",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "32303136",
                          "id": 16257,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "19167:4:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_2016_by_1",
                            "typeString": "int_const 2016"
                          },
                          "value": "2016"
                        },
                        "src": "19149:22:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "32303136",
                            "id": 16253,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "19139:4:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2016_by_1",
                              "typeString": "int_const 2016"
                            },
                            "value": "2016"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_2016_by_1",
                              "typeString": "int_const 2016"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 16251,
                            "name": "_ancestorHeight",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16217,
                            "src": "19119:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16252,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "add",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 13920,
                          "src": "19119:19:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 16254,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "19119:25:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 16255,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sub",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 13895,
                      "src": "19119:29:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 16259,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "19119:53:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "19086:86:55"
                },
                {
                  "assignments": [
                    16262
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16262,
                      "name": "_leftInPeriod",
                      "nodeType": "VariableDeclaration",
                      "scope": 16341,
                      "src": "19182:18:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 16261,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "19182:4:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16266,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 16265,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16263,
                      "name": "_leftHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16223,
                      "src": "19203:11:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16264,
                      "name": "_nextPeriodStartHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16250,
                      "src": "19217:22:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "19203:36:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "19182:57:55"
                },
                {
                  "assignments": [
                    16268
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 16268,
                      "name": "_rightInPeriod",
                      "nodeType": "VariableDeclaration",
                      "scope": 16341,
                      "src": "19249:19:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 16267,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "19249:4:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 16272,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 16271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16269,
                      "name": "_rightHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16231,
                      "src": "19271:12:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16270,
                      "name": "_nextPeriodStartHeight",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16250,
                      "src": "19286:22:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "19271:37:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "19249:59:55"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 16276,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16274,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "19648:14:55",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 16273,
                        "name": "_leftInPeriod",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16262,
                        "src": "19649:13:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16275,
                      "name": "_rightInPeriod",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16268,
                      "src": "19666:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "19648:32:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 16282,
                  "nodeType": "IfStatement",
                  "src": "19644:63:55",
                  "trueBody": {
                    "id": 16281,
                    "nodeType": "Block",
                    "src": "19682:25:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 16277,
                              "name": "_left",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16209,
                              "src": "19690:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 16278,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "hash256",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11851,
                            "src": "19690:13:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 16279,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19690:15:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 16215,
                        "id": 16280,
                        "nodeType": "Return",
                        "src": "19683:22:55"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 16286,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16283,
                      "name": "_leftInPeriod",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16262,
                      "src": "19720:13:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16285,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "19737:15:55",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 16284,
                        "name": "_rightInPeriod",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16268,
                        "src": "19738:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "19720:32:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 16292,
                  "nodeType": "IfStatement",
                  "src": "19716:64:55",
                  "trueBody": {
                    "id": 16291,
                    "nodeType": "Block",
                    "src": "19754:26:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 16287,
                              "name": "_right",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16211,
                              "src": "19762:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 16288,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "hash256",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11851,
                            "src": "19762:14:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 16289,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19762:16:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 16215,
                        "id": 16290,
                        "nodeType": "Return",
                        "src": "19755:23:55"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 16295,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 16293,
                      "name": "_leftInPeriod",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16262,
                      "src": "19793:13:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 16294,
                      "name": "_rightInPeriod",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16268,
                      "src": "19810:14:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "19793:31:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 16339,
                    "nodeType": "Block",
                    "src": "19928:317:55",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16327,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "components": [
                              {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 16313,
                                        "name": "_left",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16209,
                                        "src": "20017:5:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "id": 16314,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "extractDifficulty",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 12998,
                                      "src": "20017:23:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                                        "typeString": "function (bytes memory) pure returns (uint256)"
                                      }
                                    },
                                    "id": 16315,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "20017:25:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "components": [
                                      {
                                        "argumentTypes": null,
                                        "commonType": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "id": 16310,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "argumentTypes": null,
                                          "id": 16308,
                                          "name": "_leftHeight",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16223,
                                          "src": "19993:11:55",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "%",
                                        "rightExpression": {
                                          "argumentTypes": null,
                                          "hexValue": "32303136",
                                          "id": 16309,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "20007:4:55",
                                          "subdenomination": null,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_2016_by_1",
                                            "typeString": "int_const 2016"
                                          },
                                          "value": "2016"
                                        },
                                        "src": "19993:18:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "id": 16311,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "19992:20:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 16312,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mul",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 13860,
                                  "src": "19992:24:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 16316,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "19992:51:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 16317,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "19991:53:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 16323,
                                    "name": "_right",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16211,
                                    "src": "20089:6:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 16324,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "extractDifficulty",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 12998,
                                  "src": "20089:24:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                                    "typeString": "function (bytes memory) pure returns (uint256)"
                                  }
                                },
                                "id": 16325,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "20089:26:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 16320,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 16318,
                                      "name": "_rightHeight",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16231,
                                      "src": "20064:12:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "%",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "hexValue": "32303136",
                                      "id": 16319,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "20079:4:55",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_2016_by_1",
                                        "typeString": "int_const 2016"
                                      },
                                      "value": "2016"
                                    },
                                    "src": "20064:19:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 16321,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "20063:21:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 16322,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "mul",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 13860,
                              "src": "20063:25:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 16326,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "20063:53:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "19991:125:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 16337,
                          "nodeType": "Block",
                          "src": "20180:55:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 16333,
                                    "name": "_left",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16209,
                                    "src": "20205:5:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 16334,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "hash256",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 11851,
                                  "src": "20205:13:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                    "typeString": "function (bytes memory) pure returns (bytes32)"
                                  }
                                },
                                "id": 16335,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "20205:15:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "functionReturnParameters": 16215,
                              "id": 16336,
                              "nodeType": "Return",
                              "src": "20198:22:55"
                            }
                          ]
                        },
                        "id": 16338,
                        "nodeType": "IfStatement",
                        "src": "19987:248:55",
                        "trueBody": {
                          "id": 16332,
                          "nodeType": "Block",
                          "src": "20118:56:55",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 16328,
                                    "name": "_right",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16211,
                                    "src": "20143:6:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 16329,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "hash256",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 11851,
                                  "src": "20143:14:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                    "typeString": "function (bytes memory) pure returns (bytes32)"
                                  }
                                },
                                "id": 16330,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "20143:16:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "functionReturnParameters": 16215,
                              "id": 16331,
                              "nodeType": "Return",
                              "src": "20136:23:55"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 16340,
                  "nodeType": "IfStatement",
                  "src": "19789:456:55",
                  "trueBody": {
                    "id": 16307,
                    "nodeType": "Block",
                    "src": "19826:96:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "condition": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 16298,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "id": 16296,
                              "name": "_leftHeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16223,
                              "src": "19847:11:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": ">=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 16297,
                              "name": "_rightHeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16231,
                              "src": "19862:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "19847:27:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 16302,
                                "name": "_right",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16211,
                                "src": "19895:6:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 16303,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "hash256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11851,
                              "src": "19895:14:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 16304,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "19895:16:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 16305,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "19847:64:55",
                          "trueExpression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 16299,
                                "name": "_left",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16209,
                                "src": "19877:5:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 16300,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "hash256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11851,
                              "src": "19877:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$bound_to$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 16301,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "19877:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 16215,
                        "id": 16306,
                        "nodeType": "Return",
                        "src": "19840:71:55"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@notice             Decides which header is heaviest from the ancestor\n @dev                Does not support reorgs above 2017 blocks (:\n @param _ancestor    The prospective shared ancestor\n @param _left        A chain tip\n @param _right       A chain tip\n @return             true if it is the most recent common ancestor within _limit, false otherwise",
            "id": 16342,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_heaviestFromAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 16212,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16207,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 16342,
                  "src": "18523:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16206,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "18523:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16209,
                  "name": "_left",
                  "nodeType": "VariableDeclaration",
                  "scope": 16342,
                  "src": "18550:18:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16208,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "18550:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16211,
                  "name": "_right",
                  "nodeType": "VariableDeclaration",
                  "scope": 16342,
                  "src": "18578:19:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16210,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "18578:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "18513:90:55"
            },
            "returnParameters": {
              "id": 16215,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16214,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 16342,
                  "src": "18627:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16213,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "18627:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "18626:9:55"
            },
            "scope": 16343,
            "src": "18483:1768:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 16401,
        "src": "436:19817:55"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 16344,
              "name": "Relay",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 16343,
              "src": "20294:5:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Relay_$16343",
                "typeString": "contract Relay"
              }
            },
            "id": 16345,
            "nodeType": "InheritanceSpecifier",
            "src": "20294:5:55"
          }
        ],
        "contractDependencies": [
          14393,
          16343
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 16400,
        "linearizedBaseContracts": [
          16400,
          16343,
          14393
        ],
        "name": "TestRelay",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 16359,
              "nodeType": "Block",
              "src": "20817:2:55",
              "statements": []
            },
            "documentation": "@notice                   Gives a starting point for the relay\n @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n @param  _genesisHeader    The starting header\n @param  _height           The starting height\n @param  _periodStart      The hash of the first header in the genesis epoch",
            "id": 16360,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 16354,
                    "name": "_genesisHeader",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16347,
                    "src": "20767:14:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  {
                    "argumentTypes": null,
                    "id": 16355,
                    "name": "_height",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16349,
                    "src": "20783:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  {
                    "argumentTypes": null,
                    "id": 16356,
                    "name": "_periodStart",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 16351,
                    "src": "20792:12:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 16357,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 16353,
                  "name": "Relay",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 16343,
                  "src": "20761:5:55",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_Relay_$16343_$",
                    "typeString": "type(contract Relay)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "20761:44:55"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 16352,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16347,
                  "name": "_genesisHeader",
                  "nodeType": "VariableDeclaration",
                  "scope": 16360,
                  "src": "20685:27:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16346,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "20685:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16349,
                  "name": "_height",
                  "nodeType": "VariableDeclaration",
                  "scope": 16360,
                  "src": "20714:15:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16348,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "20714:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16351,
                  "name": "_periodStart",
                  "nodeType": "VariableDeclaration",
                  "scope": 16360,
                  "src": "20731:20:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16350,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "20731:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "20684:68:55"
            },
            "returnParameters": {
              "id": 16358,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "20817:0:55"
            },
            "scope": 16400,
            "src": "20673:146:55",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 16377,
              "nodeType": "Block",
              "src": "20981:71:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 16372,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16362,
                        "src": "21020:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16373,
                        "name": "_left",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16364,
                        "src": "21031:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16374,
                        "name": "_right",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16366,
                        "src": "21038:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        },
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      ],
                      "id": 16371,
                      "name": "_heaviestFromAncestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16342,
                      "src": "20998:21:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                        "typeString": "function (bytes32,bytes memory,bytes memory) view returns (bytes32)"
                      }
                    },
                    "id": 16375,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "20998:47:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 16370,
                  "id": 16376,
                  "nodeType": "Return",
                  "src": "20991:54:55"
                }
              ]
            },
            "documentation": null,
            "id": 16378,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "heaviestFromAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 16367,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16362,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 16378,
                  "src": "20864:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16361,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "20864:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16364,
                  "name": "_left",
                  "nodeType": "VariableDeclaration",
                  "scope": 16378,
                  "src": "20891:20:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16363,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "20891:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16366,
                  "name": "_right",
                  "nodeType": "VariableDeclaration",
                  "scope": 16378,
                  "src": "20921:21:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 16365,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "20921:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "20854:94:55"
            },
            "returnParameters": {
              "id": 16370,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16369,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 16378,
                  "src": "20972:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16368,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "20972:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "20971:9:55"
            },
            "scope": 16400,
            "src": "20825:227:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 16398,
              "nodeType": "Block",
              "src": "21221:79:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 16392,
                        "name": "_ancestor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16380,
                        "src": "21260:9:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16393,
                        "name": "_left",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16382,
                        "src": "21271:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16394,
                        "name": "_right",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16384,
                        "src": "21278:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 16395,
                        "name": "_limit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 16386,
                        "src": "21286:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 16391,
                      "name": "_isMostRecentAncestor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 16205,
                      "src": "21238:21:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (bytes32,bytes32,bytes32,uint256) view returns (bool)"
                      }
                    },
                    "id": 16396,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "21238:55:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 16390,
                  "id": 16397,
                  "nodeType": "Return",
                  "src": "21231:62:55"
                }
              ]
            },
            "documentation": null,
            "id": 16399,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isMostRecentAncestor",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 16387,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16380,
                  "name": "_ancestor",
                  "nodeType": "VariableDeclaration",
                  "scope": 16399,
                  "src": "21097:17:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16379,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "21097:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16382,
                  "name": "_left",
                  "nodeType": "VariableDeclaration",
                  "scope": 16399,
                  "src": "21124:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16381,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "21124:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16384,
                  "name": "_right",
                  "nodeType": "VariableDeclaration",
                  "scope": 16399,
                  "src": "21147:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 16383,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "21147:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 16386,
                  "name": "_limit",
                  "nodeType": "VariableDeclaration",
                  "scope": 16399,
                  "src": "21171:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16385,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "21171:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "21087:104:55"
            },
            "returnParameters": {
              "id": 16390,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 16389,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 16399,
                  "src": "21215:4:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 16388,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "21215:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "21214:6:55"
            },
            "scope": 16400,
            "src": "21058:242:55",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 16401,
        "src": "20272:1030:55"
      }
    ],
    "src": "0:21303:55"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "@summa-tx/relay-sol/contracts/Relay.sol",
      "exportedSymbols": {
        "Relay": [
          16343
        ],
        "TestRelay": [
          16400
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.5",
            ".10"
          ]
        },
        "id": 15279,
        "name": "PragmaDirective",
        "src": "0:24:55"
      },
      {
        "attributes": {
          "SourceUnit": 13922,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
          "file": "@summa-tx/bitcoin-spv-sol/contracts/SafeMath.sol",
          "scope": 16401,
          "symbolAliases": [
            {
              "foreign": 15280,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 15281,
        "name": "ImportDirective",
        "src": "88:74:55"
      },
      {
        "attributes": {
          "SourceUnit": 13433,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
          "file": "@summa-tx/bitcoin-spv-sol/contracts/BytesLib.sol",
          "scope": 16401,
          "symbolAliases": [
            {
              "foreign": 15282,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 15283,
        "name": "ImportDirective",
        "src": "163:74:55"
      },
      {
        "attributes": {
          "SourceUnit": 13217,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
          "file": "@summa-tx/bitcoin-spv-sol/contracts/BTCUtils.sol",
          "scope": 16401,
          "symbolAliases": [
            {
              "foreign": 15284,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 15285,
        "name": "ImportDirective",
        "src": "238:74:55"
      },
      {
        "attributes": {
          "SourceUnit": 14208,
          "absolutePath": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
          "file": "@summa-tx/bitcoin-spv-sol/contracts/ValidateSPV.sol",
          "scope": 16401,
          "symbolAliases": [
            {
              "foreign": 15286,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 15287,
        "name": "ImportDirective",
        "src": "313:80:55"
      },
      {
        "attributes": {
          "SourceUnit": 14394,
          "absolutePath": "@summa-tx/relay-sol/contracts/Interfaces.sol",
          "file": "./Interfaces.sol",
          "scope": 16401,
          "symbolAliases": [
            {
              "foreign": 15288,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 15289,
        "name": "ImportDirective",
        "src": "394:40:55"
      },
      {
        "attributes": {
          "contractDependencies": [
            14393
          ],
          "contractKind": "contract",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            16343,
            14393
          ],
          "name": "Relay",
          "scope": 16401
        },
        "children": [
          {
            "attributes": {
              "arguments": null
            },
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "IRelay",
                  "referencedDeclaration": 14393,
                  "type": "contract IRelay"
                },
                "id": 15290,
                "name": "UserDefinedTypeName",
                "src": "454:6:55"
              }
            ],
            "id": 15291,
            "name": "InheritanceSpecifier",
            "src": "454:6:55"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "SafeMath",
                  "referencedDeclaration": 13921,
                  "type": "library SafeMath"
                },
                "id": 15292,
                "name": "UserDefinedTypeName",
                "src": "473:8:55"
              },
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 15293,
                "name": "ElementaryTypeName",
                "src": "486:7:55"
              }
            ],
            "id": 15294,
            "name": "UsingForDirective",
            "src": "467:27:55"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "BytesLib",
                  "referencedDeclaration": 13432,
                  "type": "library BytesLib"
                },
                "id": 15295,
                "name": "UserDefinedTypeName",
                "src": "505:8:55"
              },
              {
                "attributes": {
                  "name": "bytes",
                  "type": "bytes"
                },
                "id": 15296,
                "name": "ElementaryTypeName",
                "src": "518:5:55"
              }
            ],
            "id": 15297,
            "name": "UsingForDirective",
            "src": "499:25:55"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "BTCUtils",
                  "referencedDeclaration": 13216,
                  "type": "library BTCUtils"
                },
                "id": 15298,
                "name": "UserDefinedTypeName",
                "src": "535:8:55"
              },
              {
                "attributes": {
                  "name": "bytes",
                  "type": "bytes"
                },
                "id": 15299,
                "name": "ElementaryTypeName",
                "src": "548:5:55"
              }
            ],
            "id": 15300,
            "name": "UsingForDirective",
            "src": "529:25:55"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "ValidateSPV",
                  "referencedDeclaration": 14207,
                  "type": "library ValidateSPV"
                },
                "id": 15301,
                "name": "UserDefinedTypeName",
                "src": "565:11:55"
              },
              {
                "attributes": {
                  "name": "bytes",
                  "type": "bytes"
                },
                "id": 15302,
                "name": "ElementaryTypeName",
                "src": "581:5:55"
              }
            ],
            "id": 15303,
            "name": "UsingForDirective",
            "src": "559:28:55"
          },
          {
            "attributes": {
              "constant": true,
              "name": "HEIGHT_INTERVAL",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint32",
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint32",
                  "type": "uint32"
                },
                "id": 15304,
                "name": "ElementaryTypeName",
                "src": "704:6:55"
              },
              {
                "attributes": {
                  "argumentTypes": null,
                  "hexvalue": "34",
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "subdenomination": null,
                  "token": "number",
                  "type": "int_const 4",
                  "value": "4"
                },
                "id": 15305,
                "name": "Literal",
                "src": "745:1:55"
              }
            ],
            "id": 15306,
            "name": "VariableDeclaration",
            "src": "704:42:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "relayGenesis",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "bytes32",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "bytes32",
                  "type": "bytes32"
                },
                "id": 15307,
                "name": "ElementaryTypeName",
                "src": "753:7:55"
              }
            ],
            "id": 15308,
            "name": "VariableDeclaration",
            "src": "753:29:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "bestKnownDigest",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "bytes32",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "bytes32",
                  "type": "bytes32"
                },
                "id": 15309,
                "name": "ElementaryTypeName",
                "src": "788:7:55"
              }
            ],
            "id": 15310,
            "name": "VariableDeclaration",
            "src": "788:32:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "lastReorgCommonAncestor",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "bytes32",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "bytes32",
                  "type": "bytes32"
                },
                "id": 15311,
                "name": "ElementaryTypeName",
                "src": "826:7:55"
              }
            ],
            "id": 15312,
            "name": "VariableDeclaration",
            "src": "826:40:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "previousBlock",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "mapping(bytes32 => bytes32)",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "type": "mapping(bytes32 => bytes32)"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "bytes32",
                      "type": "bytes32"
                    },
                    "id": 15313,
                    "name": "ElementaryTypeName",
                    "src": "881:7:55"
                  },
                  {
                    "attributes": {
                      "name": "bytes32",
                      "type": "bytes32"
                    },
                    "id": 15314,
                    "name": "ElementaryTypeName",
                    "src": "892:7:55"
                  }
                ],
                "id": 15315,
                "name": "Mapping",
                "src": "872:28:55"
              }
            ],
            "id": 15316,
            "name": "VariableDeclaration",
            "src": "872:51:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "blockHeight",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "mapping(bytes32 => uint256)",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "type": "mapping(bytes32 => uint256)"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "bytes32",
                      "type": "bytes32"
                    },
                    "id": 15317,
                    "name": "ElementaryTypeName",
                    "src": "938:7:55"
                  },
                  {
                    "attributes": {
                      "name": "uint256",
                      "type": "uint256"
                    },
                    "id": 15318,
                    "name": "ElementaryTypeName",
                    "src": "949:7:55"
                  }
                ],
                "id": 15319,
                "name": "Mapping",
                "src": "929:28:55"
              }
            ],
            "id": 15320,
            "name": "VariableDeclaration",
            "src": "929:49:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "currentEpochDiff",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 15321,
                "name": "ElementaryTypeName",
                "src": "985:7:55"
              }
            ],
            "id": 15322,
            "name": "VariableDeclaration",
            "src": "985:33:55"
          },
          {
            "attributes": {
              "constant": false,
              "name": "prevEpochDiff",
              "scope": 16343,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 15323,
                "name": "ElementaryTypeName",
                "src": "1024:7:55"
              }
            ],
            "id": 15324,
            "name": "VariableDeclaration",
            "src": "1024:30:55"
          },
          {
            "attributes": {
              "documentation": "@notice                   Gives a starting point for the relay\n @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n @param  _genesisHeader    The starting header\n @param  _height           The starting height\n @param  _periodStart      The hash of the first header in the genesis epoch",
              "implemented": true,
              "isConstructor": true,
              "kind": "constructor",
              "modifiers": [
                null
              ],
              "name": "",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_genesisHeader",
                      "scope": 15396,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15325,
                        "name": "ElementaryTypeName",
                        "src": "1440:5:55"
                      }
                    ],
                    "id": 15326,
                    "name": "VariableDeclaration",
                    "src": "1440:27:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_height",
                      "scope": 15396,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15327,
                        "name": "ElementaryTypeName",
                        "src": "1469:7:55"
                      }
                    ],
                    "id": 15328,
                    "name": "VariableDeclaration",
                    "src": "1469:15:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_periodStart",
                      "scope": 15396,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15329,
                        "name": "ElementaryTypeName",
                        "src": "1486:7:55"
                      }
                    ],
                    "id": 15330,
                    "name": "VariableDeclaration",
                    "src": "1486:20:55"
                  }
                ],
                "id": 15331,
                "name": "ParameterList",
                "src": "1439:68:55"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 15332,
                "name": "ParameterList",
                "src": "1515:0:55"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_54f9a5f9e9dfa58d8856435ba6e7418b795ac217ba9b784a12213c7ba6375b05",
                                  "typeString": "literal_string \"Stop being dumb\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15333,
                            "name": "Identifier",
                            "src": "1525:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "referencedDeclaration": null,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15326,
                                      "type": "bytes memory",
                                      "value": "_genesisHeader"
                                    },
                                    "id": 15334,
                                    "name": "Identifier",
                                    "src": "1533:14:55"
                                  }
                                ],
                                "id": 15335,
                                "name": "MemberAccess",
                                "src": "1533:21:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "3830",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 80",
                                  "value": "80"
                                },
                                "id": 15336,
                                "name": "Literal",
                                "src": "1558:2:55"
                              }
                            ],
                            "id": 15337,
                            "name": "BinaryOperation",
                            "src": "1533:27:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "53746f70206265696e672064756d62",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Stop being dumb\"",
                              "value": "Stop being dumb"
                            },
                            "id": 15338,
                            "name": "Literal",
                            "src": "1562:17:55"
                          }
                        ],
                        "id": 15339,
                        "name": "FunctionCall",
                        "src": "1525:55:55"
                      }
                    ],
                    "id": 15340,
                    "name": "ExpressionStatement",
                    "src": "1525:55:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15342
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_genesisDigest",
                          "scope": 15395,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 15341,
                            "name": "ElementaryTypeName",
                            "src": "1590:7:55"
                          }
                        ],
                        "id": 15342,
                        "name": "VariableDeclaration",
                        "src": "1590:22:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "hash256",
                              "referencedDeclaration": 11851,
                              "type": "function (bytes memory) pure returns (bytes32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15326,
                                  "type": "bytes memory",
                                  "value": "_genesisHeader"
                                },
                                "id": 15343,
                                "name": "Identifier",
                                "src": "1615:14:55"
                              }
                            ],
                            "id": 15344,
                            "name": "MemberAccess",
                            "src": "1615:22:55"
                          }
                        ],
                        "id": 15345,
                        "name": "FunctionCall",
                        "src": "1615:24:55"
                      }
                    ],
                    "id": 15346,
                    "name": "VariableDeclarationStatement",
                    "src": "1590:49:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_c63e0adf63c0728a57e27fbecf3408104165ff577e498d3d8684c7fbae01d26d",
                                  "typeString": "literal_string \"Period start hash does not have work. Hint: wrong byte order?\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15347,
                            "name": "Identifier",
                            "src": "1650:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "&",
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15330,
                                      "type": "bytes32",
                                      "value": "_periodStart"
                                    },
                                    "id": 15348,
                                    "name": "Identifier",
                                    "src": "1671:12:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes32",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_rational_16777215_by_1",
                                              "typeString": "int_const 16777215"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "type": "type(bytes32)",
                                          "value": "bytes32"
                                        },
                                        "id": 15349,
                                        "name": "ElementaryTypeNameExpression",
                                        "src": "1686:7:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "307830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030666666666666",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 16777215",
                                          "value": "0x0000000000000000000000000000000000000000000000000000000000ffffff"
                                        },
                                        "id": 15350,
                                        "name": "Literal",
                                        "src": "1694:66:55"
                                      }
                                    ],
                                    "id": 15351,
                                    "name": "FunctionCall",
                                    "src": "1686:75:55"
                                  }
                                ],
                                "id": 15352,
                                "name": "BinaryOperation",
                                "src": "1671:90:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes32",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(bytes32)",
                                      "value": "bytes32"
                                    },
                                    "id": 15353,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "1765:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 15354,
                                    "name": "Literal",
                                    "src": "1773:1:55"
                                  }
                                ],
                                "id": 15355,
                                "name": "FunctionCall",
                                "src": "1765:10:55"
                              }
                            ],
                            "id": 15356,
                            "name": "BinaryOperation",
                            "src": "1671:104:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "506572696f64207374617274206861736820646f6573206e6f74206861766520776f726b2e2048696e743a2077726f6e672062797465206f726465723f",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Period start hash does not have work. Hint: wrong byte order?\"",
                              "value": "Period start hash does not have work. Hint: wrong byte order?"
                            },
                            "id": 15357,
                            "name": "Literal",
                            "src": "1789:63:55"
                          }
                        ],
                        "id": 15358,
                        "name": "FunctionCall",
                        "src": "1650:203:55"
                      }
                    ],
                    "id": 15359,
                    "name": "ExpressionStatement",
                    "src": "1650:203:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15308,
                              "type": "bytes32",
                              "value": "relayGenesis"
                            },
                            "id": 15360,
                            "name": "Identifier",
                            "src": "1864:12:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15342,
                              "type": "bytes32",
                              "value": "_genesisDigest"
                            },
                            "id": 15361,
                            "name": "Identifier",
                            "src": "1879:14:55"
                          }
                        ],
                        "id": 15362,
                        "name": "Assignment",
                        "src": "1864:29:55"
                      }
                    ],
                    "id": 15363,
                    "name": "ExpressionStatement",
                    "src": "1864:29:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15310,
                              "type": "bytes32",
                              "value": "bestKnownDigest"
                            },
                            "id": 15364,
                            "name": "Identifier",
                            "src": "1903:15:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15342,
                              "type": "bytes32",
                              "value": "_genesisDigest"
                            },
                            "id": 15365,
                            "name": "Identifier",
                            "src": "1921:14:55"
                          }
                        ],
                        "id": 15366,
                        "name": "Assignment",
                        "src": "1903:32:55"
                      }
                    ],
                    "id": 15367,
                    "name": "ExpressionStatement",
                    "src": "1903:32:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15312,
                              "type": "bytes32",
                              "value": "lastReorgCommonAncestor"
                            },
                            "id": 15368,
                            "name": "Identifier",
                            "src": "1945:23:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15342,
                              "type": "bytes32",
                              "value": "_genesisDigest"
                            },
                            "id": 15369,
                            "name": "Identifier",
                            "src": "1971:14:55"
                          }
                        ],
                        "id": 15370,
                        "name": "Assignment",
                        "src": "1945:40:55"
                      }
                    ],
                    "id": 15371,
                    "name": "ExpressionStatement",
                    "src": "1945:40:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15320,
                                  "type": "mapping(bytes32 => uint256)",
                                  "value": "blockHeight"
                                },
                                "id": 15372,
                                "name": "Identifier",
                                "src": "1995:11:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15342,
                                  "type": "bytes32",
                                  "value": "_genesisDigest"
                                },
                                "id": 15373,
                                "name": "Identifier",
                                "src": "2007:14:55"
                              }
                            ],
                            "id": 15374,
                            "name": "IndexAccess",
                            "src": "1995:27:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15328,
                              "type": "uint256",
                              "value": "_height"
                            },
                            "id": 15375,
                            "name": "Identifier",
                            "src": "2025:7:55"
                          }
                        ],
                        "id": 15376,
                        "name": "Assignment",
                        "src": "1995:37:55"
                      }
                    ],
                    "id": 15377,
                    "name": "ExpressionStatement",
                    "src": "1995:37:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15320,
                                  "type": "mapping(bytes32 => uint256)",
                                  "value": "blockHeight"
                                },
                                "id": 15378,
                                "name": "Identifier",
                                "src": "2042:11:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15330,
                                  "type": "bytes32",
                                  "value": "_periodStart"
                                },
                                "id": 15379,
                                "name": "Identifier",
                                "src": "2054:12:55"
                              }
                            ],
                            "id": 15380,
                            "name": "IndexAccess",
                            "src": "2042:25:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "sub",
                                  "referencedDeclaration": 13895,
                                  "type": "function (uint256,uint256) pure returns (uint256)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15328,
                                      "type": "uint256",
                                      "value": "_height"
                                    },
                                    "id": 15381,
                                    "name": "Identifier",
                                    "src": "2070:7:55"
                                  }
                                ],
                                "id": 15382,
                                "name": "MemberAccess",
                                "src": "2070:11:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "%",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15328,
                                      "type": "uint256",
                                      "value": "_height"
                                    },
                                    "id": 15383,
                                    "name": "Identifier",
                                    "src": "2082:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32303136",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2016",
                                      "value": "2016"
                                    },
                                    "id": 15384,
                                    "name": "Literal",
                                    "src": "2092:4:55"
                                  }
                                ],
                                "id": 15385,
                                "name": "BinaryOperation",
                                "src": "2082:14:55"
                              }
                            ],
                            "id": 15386,
                            "name": "FunctionCall",
                            "src": "2070:27:55"
                          }
                        ],
                        "id": 15387,
                        "name": "Assignment",
                        "src": "2042:55:55"
                      }
                    ],
                    "id": 15388,
                    "name": "ExpressionStatement",
                    "src": "2042:55:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15322,
                              "type": "uint256",
                              "value": "currentEpochDiff"
                            },
                            "id": 15389,
                            "name": "Identifier",
                            "src": "2108:16:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "extractDifficulty",
                                  "referencedDeclaration": 12998,
                                  "type": "function (bytes memory) pure returns (uint256)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15326,
                                      "type": "bytes memory",
                                      "value": "_genesisHeader"
                                    },
                                    "id": 15390,
                                    "name": "Identifier",
                                    "src": "2127:14:55"
                                  }
                                ],
                                "id": 15391,
                                "name": "MemberAccess",
                                "src": "2127:32:55"
                              }
                            ],
                            "id": 15392,
                            "name": "FunctionCall",
                            "src": "2127:34:55"
                          }
                        ],
                        "id": 15393,
                        "name": "Assignment",
                        "src": "2108:53:55"
                      }
                    ],
                    "id": 15394,
                    "name": "ExpressionStatement",
                    "src": "2108:53:55"
                  }
                ],
                "id": 15395,
                "name": "Block",
                "src": "1515:653:55"
              }
            ],
            "id": 15396,
            "name": "FunctionDefinition",
            "src": "1428:740:55"
          },
          {
            "attributes": {
              "documentation": "@notice     Getter for currentEpochDiff\n @dev        This is updated when a new heavist header has a new diff\n @return     The difficulty of the bestKnownDigest",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getCurrentEpochDifficulty",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14312,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 15397,
                "name": "ParameterList",
                "src": "2391:2:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15404,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15398,
                        "name": "ElementaryTypeName",
                        "src": "2417:7:55"
                      }
                    ],
                    "id": 15399,
                    "name": "VariableDeclaration",
                    "src": "2417:7:55"
                  }
                ],
                "id": 15400,
                "name": "ParameterList",
                "src": "2416:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15400
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15322,
                          "type": "uint256",
                          "value": "currentEpochDiff"
                        },
                        "id": 15401,
                        "name": "Identifier",
                        "src": "2443:16:55"
                      }
                    ],
                    "id": 15402,
                    "name": "Return",
                    "src": "2436:23:55"
                  }
                ],
                "id": 15403,
                "name": "Block",
                "src": "2426:40:55"
              }
            ],
            "id": 15404,
            "name": "FunctionDefinition",
            "src": "2357:109:55"
          },
          {
            "attributes": {
              "documentation": "@notice     Getter for prevEpochDiff\n @dev        This is updated when a difficulty change is accepted\n @return     The difficulty of the previous epoch",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getPrevEpochDifficulty",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14317,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 15405,
                "name": "ParameterList",
                "src": "2677:2:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15412,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15406,
                        "name": "ElementaryTypeName",
                        "src": "2703:7:55"
                      }
                    ],
                    "id": 15407,
                    "name": "VariableDeclaration",
                    "src": "2703:7:55"
                  }
                ],
                "id": 15408,
                "name": "ParameterList",
                "src": "2702:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15408
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15324,
                          "type": "uint256",
                          "value": "prevEpochDiff"
                        },
                        "id": 15409,
                        "name": "Identifier",
                        "src": "2729:13:55"
                      }
                    ],
                    "id": 15410,
                    "name": "Return",
                    "src": "2722:20:55"
                  }
                ],
                "id": 15411,
                "name": "Block",
                "src": "2712:37:55"
              }
            ],
            "id": 15412,
            "name": "FunctionDefinition",
            "src": "2646:103:55"
          },
          {
            "attributes": {
              "documentation": "@notice     Getter for relayGenesis\n @dev        This is an initialization parameter\n @return     The hash of the first block of the relay",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getRelayGenesis",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14322,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 15413,
                "name": "ParameterList",
                "src": "2940:2:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15420,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15414,
                        "name": "ElementaryTypeName",
                        "src": "2964:7:55"
                      }
                    ],
                    "id": 15415,
                    "name": "VariableDeclaration",
                    "src": "2964:7:55"
                  }
                ],
                "id": 15416,
                "name": "ParameterList",
                "src": "2963:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15416
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15308,
                          "type": "bytes32",
                          "value": "relayGenesis"
                        },
                        "id": 15417,
                        "name": "Identifier",
                        "src": "2990:12:55"
                      }
                    ],
                    "id": 15418,
                    "name": "Return",
                    "src": "2983:19:55"
                  }
                ],
                "id": 15419,
                "name": "Block",
                "src": "2973:36:55"
              }
            ],
            "id": 15420,
            "name": "FunctionDefinition",
            "src": "2916:93:55"
          },
          {
            "attributes": {
              "documentation": "@notice     Getter for bestKnownDigest\n @dev        This updated only by calling markNewHeaviest\n @return     The hash of the best marked chain tip",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getBestKnownDigest",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14327,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 15421,
                "name": "ParameterList",
                "src": "3212:2:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15428,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15422,
                        "name": "ElementaryTypeName",
                        "src": "3236:7:55"
                      }
                    ],
                    "id": 15423,
                    "name": "VariableDeclaration",
                    "src": "3236:7:55"
                  }
                ],
                "id": 15424,
                "name": "ParameterList",
                "src": "3235:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15424
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15310,
                          "type": "bytes32",
                          "value": "bestKnownDigest"
                        },
                        "id": 15425,
                        "name": "Identifier",
                        "src": "3262:15:55"
                      }
                    ],
                    "id": 15426,
                    "name": "Return",
                    "src": "3255:22:55"
                  }
                ],
                "id": 15427,
                "name": "Block",
                "src": "3245:39:55"
              }
            ],
            "id": 15428,
            "name": "FunctionDefinition",
            "src": "3185:99:55"
          },
          {
            "attributes": {
              "documentation": "@notice     Getter for relayGenesis\n @dev        This is updated only by calling markNewHeaviest\n @return     The hash of the shared ancestor of the most recent fork",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getLastReorgCommonAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14332,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 15429,
                "name": "ParameterList",
                "src": "3513:2:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15436,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15430,
                        "name": "ElementaryTypeName",
                        "src": "3537:7:55"
                      }
                    ],
                    "id": 15431,
                    "name": "VariableDeclaration",
                    "src": "3537:7:55"
                  }
                ],
                "id": 15432,
                "name": "ParameterList",
                "src": "3536:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15432
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15312,
                          "type": "bytes32",
                          "value": "lastReorgCommonAncestor"
                        },
                        "id": 15433,
                        "name": "Identifier",
                        "src": "3563:23:55"
                      }
                    ],
                    "id": 15434,
                    "name": "Return",
                    "src": "3556:30:55"
                  }
                ],
                "id": 15435,
                "name": "Block",
                "src": "3546:47:55"
              }
            ],
            "id": 15436,
            "name": "FunctionDefinition",
            "src": "3478:115:55"
          },
          {
            "attributes": {
              "documentation": "@notice         Finds the height of a header by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header, or error if unknown",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "findHeight",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14339,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 15448,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15437,
                        "name": "ElementaryTypeName",
                        "src": "3871:7:55"
                      }
                    ],
                    "id": 15438,
                    "name": "VariableDeclaration",
                    "src": "3871:15:55"
                  }
                ],
                "id": 15439,
                "name": "ParameterList",
                "src": "3870:17:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15448,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15440,
                        "name": "ElementaryTypeName",
                        "src": "3911:7:55"
                      }
                    ],
                    "id": 15441,
                    "name": "VariableDeclaration",
                    "src": "3911:7:55"
                  }
                ],
                "id": 15442,
                "name": "ParameterList",
                "src": "3910:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15442
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 15443,
                            "name": "Identifier",
                            "src": "3937:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15438,
                              "type": "bytes32",
                              "value": "_digest"
                            },
                            "id": 15444,
                            "name": "Identifier",
                            "src": "3949:7:55"
                          }
                        ],
                        "id": 15445,
                        "name": "FunctionCall",
                        "src": "3937:20:55"
                      }
                    ],
                    "id": 15446,
                    "name": "Return",
                    "src": "3930:27:55"
                  }
                ],
                "id": 15447,
                "name": "Block",
                "src": "3920:44:55"
              }
            ],
            "id": 15448,
            "name": "FunctionDefinition",
            "src": "3851:113:55"
          },
          {
            "attributes": {
              "documentation": "@notice         Finds an ancestor for a block by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header, or error if unknown",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "findAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14348,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 15463,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15449,
                        "name": "ElementaryTypeName",
                        "src": "4245:7:55"
                      }
                    ],
                    "id": 15450,
                    "name": "VariableDeclaration",
                    "src": "4245:15:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_offset",
                      "scope": 15463,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15451,
                        "name": "ElementaryTypeName",
                        "src": "4262:7:55"
                      }
                    ],
                    "id": 15452,
                    "name": "VariableDeclaration",
                    "src": "4262:15:55"
                  }
                ],
                "id": 15453,
                "name": "ParameterList",
                "src": "4244:34:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15463,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15454,
                        "name": "ElementaryTypeName",
                        "src": "4302:7:55"
                      }
                    ],
                    "id": 15455,
                    "name": "VariableDeclaration",
                    "src": "4302:7:55"
                  }
                ],
                "id": 15456,
                "name": "ParameterList",
                "src": "4301:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15456
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15952,
                              "type": "function (bytes32,uint256) view returns (bytes32)",
                              "value": "_findAncestor"
                            },
                            "id": 15457,
                            "name": "Identifier",
                            "src": "4328:13:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15450,
                              "type": "bytes32",
                              "value": "_digest"
                            },
                            "id": 15458,
                            "name": "Identifier",
                            "src": "4342:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15452,
                              "type": "uint256",
                              "value": "_offset"
                            },
                            "id": 15459,
                            "name": "Identifier",
                            "src": "4351:7:55"
                          }
                        ],
                        "id": 15460,
                        "name": "FunctionCall",
                        "src": "4328:31:55"
                      }
                    ],
                    "id": 15461,
                    "name": "Return",
                    "src": "4321:38:55"
                  }
                ],
                "id": 15462,
                "name": "Block",
                "src": "4311:55:55"
              }
            ],
            "id": 15463,
            "name": "FunctionDefinition",
            "src": "4223:143:55"
          },
          {
            "attributes": {
              "documentation": "@notice             Checks if a digest is an ancestor of the current one\n @dev                Limit the amount of lookups (and thus gas usage) with _limit\n @param _ancestor    The prospective ancestor\n @param _descendant  The descendant to check\n @param _limit       The maximum number of blocks to check\n @return             true if ancestor is at most limit blocks lower than descendant, otherwise false",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "isAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": 14359,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 15481,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15464,
                        "name": "ElementaryTypeName",
                        "src": "4841:7:55"
                      }
                    ],
                    "id": 15465,
                    "name": "VariableDeclaration",
                    "src": "4841:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_descendant",
                      "scope": 15481,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15466,
                        "name": "ElementaryTypeName",
                        "src": "4860:7:55"
                      }
                    ],
                    "id": 15467,
                    "name": "VariableDeclaration",
                    "src": "4860:19:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 15481,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15468,
                        "name": "ElementaryTypeName",
                        "src": "4881:7:55"
                      }
                    ],
                    "id": 15469,
                    "name": "VariableDeclaration",
                    "src": "4881:14:55"
                  }
                ],
                "id": 15470,
                "name": "ParameterList",
                "src": "4840:56:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15481,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15471,
                        "name": "ElementaryTypeName",
                        "src": "4920:4:55"
                      }
                    ],
                    "id": 15472,
                    "name": "VariableDeclaration",
                    "src": "4920:4:55"
                  }
                ],
                "id": 15473,
                "name": "ParameterList",
                "src": "4919:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15473
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15999,
                              "type": "function (bytes32,bytes32,uint256) view returns (bool)",
                              "value": "_isAncestor"
                            },
                            "id": 15474,
                            "name": "Identifier",
                            "src": "4943:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15465,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 15475,
                            "name": "Identifier",
                            "src": "4955:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15467,
                              "type": "bytes32",
                              "value": "_descendant"
                            },
                            "id": 15476,
                            "name": "Identifier",
                            "src": "4966:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15469,
                              "type": "uint256",
                              "value": "_limit"
                            },
                            "id": 15477,
                            "name": "Identifier",
                            "src": "4979:6:55"
                          }
                        ],
                        "id": 15478,
                        "name": "FunctionCall",
                        "src": "4943:43:55"
                      }
                    ],
                    "id": 15479,
                    "name": "Return",
                    "src": "4936:50:55"
                  }
                ],
                "id": 15480,
                "name": "Block",
                "src": "4926:67:55"
              }
            ],
            "id": 15481,
            "name": "FunctionDefinition",
            "src": "4821:172:55"
          },
          {
            "attributes": {
              "documentation": "@notice             Adds headers to storage after validating\n @dev                We check integrity and consistency of the header chain\n @param  _anchor     The header immediately preceeding the new chain\n @param  _headers    A tightly-packed list of 80-byte Bitcoin headers\n @return             True if successfully written, error otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "addHeaders",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": 14368,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_anchor",
                      "scope": 15497,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15482,
                        "name": "ElementaryTypeName",
                        "src": "5398:5:55"
                      }
                    ],
                    "id": 15483,
                    "name": "VariableDeclaration",
                    "src": "5398:22:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 15497,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15484,
                        "name": "ElementaryTypeName",
                        "src": "5422:5:55"
                      }
                    ],
                    "id": 15485,
                    "name": "VariableDeclaration",
                    "src": "5422:23:55"
                  }
                ],
                "id": 15486,
                "name": "ParameterList",
                "src": "5397:49:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15497,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15487,
                        "name": "ElementaryTypeName",
                        "src": "5465:4:55"
                      }
                    ],
                    "id": 15488,
                    "name": "VariableDeclaration",
                    "src": "5465:4:55"
                  }
                ],
                "id": 15489,
                "name": "ParameterList",
                "src": "5464:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15489
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15717,
                              "type": "function (bytes memory,bytes memory,bool) returns (bool)",
                              "value": "_addHeaders"
                            },
                            "id": 15490,
                            "name": "Identifier",
                            "src": "5488:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15483,
                              "type": "bytes calldata",
                              "value": "_anchor"
                            },
                            "id": 15491,
                            "name": "Identifier",
                            "src": "5500:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15485,
                              "type": "bytes calldata",
                              "value": "_headers"
                            },
                            "id": 15492,
                            "name": "Identifier",
                            "src": "5509:8:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "66616c7365",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "bool",
                              "type": "bool",
                              "value": "false"
                            },
                            "id": 15493,
                            "name": "Literal",
                            "src": "5519:5:55"
                          }
                        ],
                        "id": 15494,
                        "name": "FunctionCall",
                        "src": "5488:37:55"
                      }
                    ],
                    "id": 15495,
                    "name": "Return",
                    "src": "5481:44:55"
                  }
                ],
                "id": 15496,
                "name": "Block",
                "src": "5471:61:55"
              }
            ],
            "id": 15497,
            "name": "FunctionDefinition",
            "src": "5378:154:55"
          },
          {
            "attributes": {
              "documentation": "@notice                       Adds headers to storage, performs additional validation of retarget\n @dev                          Checks the retarget, the heights, and the linkage\n @param  _oldPeriodStartHeader The first header in the difficulty period being closed\n @param  _oldPeriodEndHeader   The last header in the difficulty period being closed\n @param  _headers              A tightly-packed list of 80-byte Bitcoin headers\n @return                       True if successfully written, error otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "addHeadersWithRetarget",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": 14379,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_oldPeriodStartHeader",
                      "scope": 15515,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15498,
                        "name": "ElementaryTypeName",
                        "src": "6129:5:55"
                      }
                    ],
                    "id": 15499,
                    "name": "VariableDeclaration",
                    "src": "6129:36:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_oldPeriodEndHeader",
                      "scope": 15515,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15500,
                        "name": "ElementaryTypeName",
                        "src": "6175:5:55"
                      }
                    ],
                    "id": 15501,
                    "name": "VariableDeclaration",
                    "src": "6175:34:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 15515,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15502,
                        "name": "ElementaryTypeName",
                        "src": "6219:5:55"
                      }
                    ],
                    "id": 15503,
                    "name": "VariableDeclaration",
                    "src": "6219:23:55"
                  }
                ],
                "id": 15504,
                "name": "ParameterList",
                "src": "6119:129:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15515,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15505,
                        "name": "ElementaryTypeName",
                        "src": "6267:4:55"
                      }
                    ],
                    "id": 15506,
                    "name": "VariableDeclaration",
                    "src": "6267:4:55"
                  }
                ],
                "id": 15507,
                "name": "ParameterList",
                "src": "6266:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15507
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15844,
                              "type": "function (bytes memory,bytes memory,bytes memory) returns (bool)",
                              "value": "_addHeadersWithRetarget"
                            },
                            "id": 15508,
                            "name": "Identifier",
                            "src": "6290:23:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15499,
                              "type": "bytes calldata",
                              "value": "_oldPeriodStartHeader"
                            },
                            "id": 15509,
                            "name": "Identifier",
                            "src": "6314:21:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15501,
                              "type": "bytes calldata",
                              "value": "_oldPeriodEndHeader"
                            },
                            "id": 15510,
                            "name": "Identifier",
                            "src": "6337:19:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15503,
                              "type": "bytes calldata",
                              "value": "_headers"
                            },
                            "id": 15511,
                            "name": "Identifier",
                            "src": "6358:8:55"
                          }
                        ],
                        "id": 15512,
                        "name": "FunctionCall",
                        "src": "6290:77:55"
                      }
                    ],
                    "id": 15513,
                    "name": "Return",
                    "src": "6283:84:55"
                  }
                ],
                "id": 15514,
                "name": "Block",
                "src": "6273:101:55"
              }
            ],
            "id": 15515,
            "name": "FunctionDefinition",
            "src": "6088:286:55"
          },
          {
            "attributes": {
              "documentation": "@notice                   Gives a starting point for the relay\n @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n @param  _ancestor         The digest of the most recent common ancestor\n @param  _currentBest      The 80-byte header referenced by bestKnownDigest\n @param  _newBest          The 80-byte header to mark as the new best\n @param  _limit            Limit the amount of traversal of the chain\n @return                   True if successfully updates bestKnownDigest, error otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "markNewHeaviest",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": 14392,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 15536,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15516,
                        "name": "ElementaryTypeName",
                        "src": "7001:7:55"
                      }
                    ],
                    "id": 15517,
                    "name": "VariableDeclaration",
                    "src": "7001:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_currentBest",
                      "scope": 15536,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15518,
                        "name": "ElementaryTypeName",
                        "src": "7028:5:55"
                      }
                    ],
                    "id": 15519,
                    "name": "VariableDeclaration",
                    "src": "7028:27:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_newBest",
                      "scope": 15536,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15520,
                        "name": "ElementaryTypeName",
                        "src": "7065:5:55"
                      }
                    ],
                    "id": 15521,
                    "name": "VariableDeclaration",
                    "src": "7065:23:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 15536,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15522,
                        "name": "ElementaryTypeName",
                        "src": "7098:7:55"
                      }
                    ],
                    "id": 15523,
                    "name": "VariableDeclaration",
                    "src": "7098:14:55"
                  }
                ],
                "id": 15524,
                "name": "ParameterList",
                "src": "6991:127:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15536,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15525,
                        "name": "ElementaryTypeName",
                        "src": "7137:4:55"
                      }
                    ],
                    "id": 15526,
                    "name": "VariableDeclaration",
                    "src": "7137:4:55"
                  }
                ],
                "id": 15527,
                "name": "ParameterList",
                "src": "7136:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 15527
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16102,
                              "type": "function (bytes32,bytes memory,bytes memory,uint256) returns (bool)",
                              "value": "_markNewHeaviest"
                            },
                            "id": 15528,
                            "name": "Identifier",
                            "src": "7160:16:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15517,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 15529,
                            "name": "Identifier",
                            "src": "7177:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15519,
                              "type": "bytes calldata",
                              "value": "_currentBest"
                            },
                            "id": 15530,
                            "name": "Identifier",
                            "src": "7188:12:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15521,
                              "type": "bytes calldata",
                              "value": "_newBest"
                            },
                            "id": 15531,
                            "name": "Identifier",
                            "src": "7202:8:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15523,
                              "type": "uint256",
                              "value": "_limit"
                            },
                            "id": 15532,
                            "name": "Identifier",
                            "src": "7212:6:55"
                          }
                        ],
                        "id": 15533,
                        "name": "FunctionCall",
                        "src": "7160:59:55"
                      }
                    ],
                    "id": 15534,
                    "name": "Return",
                    "src": "7153:66:55"
                  }
                ],
                "id": 15535,
                "name": "Block",
                "src": "7143:83:55"
              }
            ],
            "id": 15536,
            "name": "FunctionDefinition",
            "src": "6967:259:55"
          },
          {
            "attributes": {
              "documentation": "@notice             Adds headers to storage after validating\n @dev                We check integrity and consistency of the header chain\n @param  _anchor     The header immediately preceeding the new chain\n @param  _headers    A tightly-packed list of new 80-byte Bitcoin headers to record\n @param  _internal   True if called internally from addHeadersWithRetarget, false otherwise\n @return             True if successfully written, error otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_addHeaders",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_anchor",
                      "scope": 15717,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15537,
                        "name": "ElementaryTypeName",
                        "src": "7745:5:55"
                      }
                    ],
                    "id": 15538,
                    "name": "VariableDeclaration",
                    "src": "7745:20:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 15717,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15539,
                        "name": "ElementaryTypeName",
                        "src": "7767:5:55"
                      }
                    ],
                    "id": 15540,
                    "name": "VariableDeclaration",
                    "src": "7767:21:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_internal",
                      "scope": 15717,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15541,
                        "name": "ElementaryTypeName",
                        "src": "7790:4:55"
                      }
                    ],
                    "id": 15542,
                    "name": "VariableDeclaration",
                    "src": "7790:14:55"
                  }
                ],
                "id": 15543,
                "name": "ParameterList",
                "src": "7744:61:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15717,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15544,
                        "name": "ElementaryTypeName",
                        "src": "7824:4:55"
                      }
                    ],
                    "id": 15545,
                    "name": "VariableDeclaration",
                    "src": "7824:4:55"
                  }
                ],
                "id": 15546,
                "name": "ParameterList",
                "src": "7823:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        15548
                      ],
                      "initialValue": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_height",
                          "scope": 15716,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15547,
                            "name": "ElementaryTypeName",
                            "src": "7840:7:55"
                          }
                        ],
                        "id": 15548,
                        "name": "VariableDeclaration",
                        "src": "7840:15:55"
                      }
                    ],
                    "id": 15549,
                    "name": "VariableDeclarationStatement",
                    "src": "7840:15:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15551
                      ],
                      "initialValue": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_header",
                          "scope": 15716,
                          "stateVariable": false,
                          "storageLocation": "memory",
                          "type": "bytes",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes",
                              "type": "bytes"
                            },
                            "id": 15550,
                            "name": "ElementaryTypeName",
                            "src": "7865:5:55"
                          }
                        ],
                        "id": 15551,
                        "name": "VariableDeclaration",
                        "src": "7865:20:55"
                      }
                    ],
                    "id": 15552,
                    "name": "VariableDeclarationStatement",
                    "src": "7865:20:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15554
                      ],
                      "initialValue": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_currentDigest",
                          "scope": 15716,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 15553,
                            "name": "ElementaryTypeName",
                            "src": "7895:7:55"
                          }
                        ],
                        "id": 15554,
                        "name": "VariableDeclaration",
                        "src": "7895:22:55"
                      }
                    ],
                    "id": 15555,
                    "name": "VariableDeclarationStatement",
                    "src": "7895:22:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15557
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_previousDigest",
                          "scope": 15716,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 15556,
                            "name": "ElementaryTypeName",
                            "src": "7927:7:55"
                          }
                        ],
                        "id": 15557,
                        "name": "VariableDeclaration",
                        "src": "7927:23:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "hash256",
                              "referencedDeclaration": 11851,
                              "type": "function (bytes memory) pure returns (bytes32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15538,
                                  "type": "bytes memory",
                                  "value": "_anchor"
                                },
                                "id": 15558,
                                "name": "Identifier",
                                "src": "7953:7:55"
                              }
                            ],
                            "id": 15559,
                            "name": "MemberAccess",
                            "src": "7953:15:55"
                          }
                        ],
                        "id": 15560,
                        "name": "FunctionCall",
                        "src": "7953:17:55"
                      }
                    ],
                    "id": 15561,
                    "name": "VariableDeclarationStatement",
                    "src": "7927:43:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15563
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_target",
                          "scope": 15716,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15562,
                            "name": "ElementaryTypeName",
                            "src": "7981:7:55"
                          }
                        ],
                        "id": 15563,
                        "name": "VariableDeclaration",
                        "src": "7981:15:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "extractTarget",
                              "referencedDeclaration": 12925,
                              "type": "function (bytes memory) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes memory",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_80_by_1",
                                          "typeString": "int_const 80"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "slice",
                                      "referencedDeclaration": 13281,
                                      "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15540,
                                          "type": "bytes memory",
                                          "value": "_headers"
                                        },
                                        "id": 15564,
                                        "name": "Identifier",
                                        "src": "7999:8:55"
                                      }
                                    ],
                                    "id": 15565,
                                    "name": "MemberAccess",
                                    "src": "7999:14:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 15566,
                                    "name": "Literal",
                                    "src": "8014:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "3830",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 80",
                                      "value": "80"
                                    },
                                    "id": 15567,
                                    "name": "Literal",
                                    "src": "8017:2:55"
                                  }
                                ],
                                "id": 15568,
                                "name": "FunctionCall",
                                "src": "7999:21:55"
                              }
                            ],
                            "id": 15569,
                            "name": "MemberAccess",
                            "src": "7999:35:55"
                          }
                        ],
                        "id": 15570,
                        "name": "FunctionCall",
                        "src": "7999:37:55"
                      }
                    ],
                    "id": 15571,
                    "name": "VariableDeclarationStatement",
                    "src": "7981:55:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15573
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_anchorHeight",
                          "scope": 15716,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15572,
                            "name": "ElementaryTypeName",
                            "src": "8046:7:55"
                          }
                        ],
                        "id": 15573,
                        "name": "VariableDeclaration",
                        "src": "8046:21:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 15574,
                            "name": "Identifier",
                            "src": "8070:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15557,
                              "type": "bytes32",
                              "value": "_previousDigest"
                            },
                            "id": 15575,
                            "name": "Identifier",
                            "src": "8082:15:55"
                          }
                        ],
                        "id": 15576,
                        "name": "FunctionCall",
                        "src": "8070:28:55"
                      }
                    ],
                    "id": 15577,
                    "name": "VariableDeclarationStatement",
                    "src": "8046:52:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_c33296853216f4d74abe3a6fbf840e018f81995cd8c40108858eaa3d5148cebc",
                                  "typeString": "literal_string \"Unexpected retarget on external call\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15578,
                            "name": "Identifier",
                            "src": "8138:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "||",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15542,
                                  "type": "bool",
                                  "value": "_internal"
                                },
                                "id": 15579,
                                "name": "Identifier",
                                "src": "8159:9:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "extractTarget",
                                          "referencedDeclaration": 12925,
                                          "type": "function (bytes memory) pure returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15538,
                                              "type": "bytes memory",
                                              "value": "_anchor"
                                            },
                                            "id": 15580,
                                            "name": "Identifier",
                                            "src": "8172:7:55"
                                          }
                                        ],
                                        "id": 15581,
                                        "name": "MemberAccess",
                                        "src": "8172:21:55"
                                      }
                                    ],
                                    "id": 15582,
                                    "name": "FunctionCall",
                                    "src": "8172:23:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15563,
                                      "type": "uint256",
                                      "value": "_target"
                                    },
                                    "id": 15583,
                                    "name": "Identifier",
                                    "src": "8199:7:55"
                                  }
                                ],
                                "id": 15584,
                                "name": "BinaryOperation",
                                "src": "8172:34:55"
                              }
                            ],
                            "id": 15585,
                            "name": "BinaryOperation",
                            "src": "8159:47:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "556e6578706563746564207265746172676574206f6e2065787465726e616c2063616c6c",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Unexpected retarget on external call\"",
                              "value": "Unexpected retarget on external call"
                            },
                            "id": 15586,
                            "name": "Literal",
                            "src": "8220:38:55"
                          }
                        ],
                        "id": 15587,
                        "name": "FunctionCall",
                        "src": "8138:121:55"
                      }
                    ],
                    "id": 15588,
                    "name": "ExpressionStatement",
                    "src": "8138:121:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_64951f0822ebc61755f01c687a3aabd90c37a5b5a62d0764ef2ec9edb60caca4",
                                  "typeString": "literal_string \"Header array length must be divisible by 80\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15589,
                            "name": "Identifier",
                            "src": "8269:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "%",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "length",
                                      "referencedDeclaration": null,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15540,
                                          "type": "bytes memory",
                                          "value": "_headers"
                                        },
                                        "id": 15590,
                                        "name": "Identifier",
                                        "src": "8277:8:55"
                                      }
                                    ],
                                    "id": 15591,
                                    "name": "MemberAccess",
                                    "src": "8277:15:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "3830",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 80",
                                      "value": "80"
                                    },
                                    "id": 15592,
                                    "name": "Literal",
                                    "src": "8295:2:55"
                                  }
                                ],
                                "id": 15593,
                                "name": "BinaryOperation",
                                "src": "8277:20:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 15594,
                                "name": "Literal",
                                "src": "8301:1:55"
                              }
                            ],
                            "id": 15595,
                            "name": "BinaryOperation",
                            "src": "8277:25:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "486561646572206172726179206c656e677468206d75737420626520646976697369626c65206279203830",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Header array length must be divisible by 80\"",
                              "value": "Header array length must be divisible by 80"
                            },
                            "id": 15596,
                            "name": "Literal",
                            "src": "8304:45:55"
                          }
                        ],
                        "id": 15597,
                        "name": "FunctionCall",
                        "src": "8269:81:55"
                      }
                    ],
                    "id": 15598,
                    "name": "ExpressionStatement",
                    "src": "8269:81:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "assignments": [
                            15600
                          ]
                        },
                        "children": [
                          {
                            "attributes": {
                              "constant": false,
                              "name": "i",
                              "scope": 15706,
                              "stateVariable": false,
                              "storageLocation": "default",
                              "type": "uint256",
                              "value": null,
                              "visibility": "internal"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint256",
                                  "type": "uint256"
                                },
                                "id": 15599,
                                "name": "ElementaryTypeName",
                                "src": "8605:7:55"
                              }
                            ],
                            "id": 15600,
                            "name": "VariableDeclaration",
                            "src": "8605:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 15601,
                            "name": "Literal",
                            "src": "8617:1:55"
                          }
                        ],
                        "id": 15602,
                        "name": "VariableDeclarationStatement",
                        "src": "8605:13:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15600,
                              "type": "uint256",
                              "value": "i"
                            },
                            "id": 15603,
                            "name": "Identifier",
                            "src": "8620:1:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "/",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "referencedDeclaration": null,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15540,
                                      "type": "bytes memory",
                                      "value": "_headers"
                                    },
                                    "id": 15604,
                                    "name": "Identifier",
                                    "src": "8624:8:55"
                                  }
                                ],
                                "id": 15605,
                                "name": "MemberAccess",
                                "src": "8624:15:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "3830",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 80",
                                  "value": "80"
                                },
                                "id": 15606,
                                "name": "Literal",
                                "src": "8642:2:55"
                              }
                            ],
                            "id": 15607,
                            "name": "BinaryOperation",
                            "src": "8624:20:55"
                          }
                        ],
                        "id": 15608,
                        "name": "BinaryOperation",
                        "src": "8620:24:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15600,
                                  "type": "uint256",
                                  "value": "i"
                                },
                                "id": 15609,
                                "name": "Identifier",
                                "src": "8646:1:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15600,
                                          "type": "uint256",
                                          "value": "i"
                                        },
                                        "id": 15610,
                                        "name": "Identifier",
                                        "src": "8650:1:55"
                                      }
                                    ],
                                    "id": 15611,
                                    "name": "MemberAccess",
                                    "src": "8650:5:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 15612,
                                    "name": "Literal",
                                    "src": "8656:1:55"
                                  }
                                ],
                                "id": 15613,
                                "name": "FunctionCall",
                                "src": "8650:8:55"
                              }
                            ],
                            "id": 15614,
                            "name": "Assignment",
                            "src": "8646:12:55"
                          }
                        ],
                        "id": 15615,
                        "name": "ExpressionStatement",
                        "src": "8646:12:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "bytes memory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15551,
                                      "type": "bytes memory",
                                      "value": "_header"
                                    },
                                    "id": 15616,
                                    "name": "Identifier",
                                    "src": "8674:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes memory",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_80_by_1",
                                              "typeString": "int_const 80"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "slice",
                                          "referencedDeclaration": 13281,
                                          "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15540,
                                              "type": "bytes memory",
                                              "value": "_headers"
                                            },
                                            "id": 15617,
                                            "name": "Identifier",
                                            "src": "8684:8:55"
                                          }
                                        ],
                                        "id": 15618,
                                        "name": "MemberAccess",
                                        "src": "8684:14:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_rational_80_by_1",
                                                  "typeString": "int_const 80"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "mul",
                                              "referencedDeclaration": 13860,
                                              "type": "function (uint256,uint256) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15600,
                                                  "type": "uint256",
                                                  "value": "i"
                                                },
                                                "id": 15619,
                                                "name": "Identifier",
                                                "src": "8699:1:55"
                                              }
                                            ],
                                            "id": 15620,
                                            "name": "MemberAccess",
                                            "src": "8699:5:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "3830",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "number",
                                              "type": "int_const 80",
                                              "value": "80"
                                            },
                                            "id": 15621,
                                            "name": "Literal",
                                            "src": "8705:2:55"
                                          }
                                        ],
                                        "id": 15622,
                                        "name": "FunctionCall",
                                        "src": "8699:9:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "3830",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 80",
                                          "value": "80"
                                        },
                                        "id": 15623,
                                        "name": "Literal",
                                        "src": "8710:2:55"
                                      }
                                    ],
                                    "id": 15624,
                                    "name": "FunctionCall",
                                    "src": "8684:29:55"
                                  }
                                ],
                                "id": 15625,
                                "name": "Assignment",
                                "src": "8674:39:55"
                              }
                            ],
                            "id": 15626,
                            "name": "ExpressionStatement",
                            "src": "8674:39:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15548,
                                      "type": "uint256",
                                      "value": "_height"
                                    },
                                    "id": 15627,
                                    "name": "Identifier",
                                    "src": "8727:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "add",
                                          "referencedDeclaration": 13920,
                                          "type": "function (uint256,uint256) pure returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15573,
                                              "type": "uint256",
                                              "value": "_anchorHeight"
                                            },
                                            "id": 15628,
                                            "name": "Identifier",
                                            "src": "8737:13:55"
                                          }
                                        ],
                                        "id": 15629,
                                        "name": "MemberAccess",
                                        "src": "8737:17:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "+",
                                          "type": "uint256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15600,
                                              "type": "uint256",
                                              "value": "i"
                                            },
                                            "id": 15630,
                                            "name": "Identifier",
                                            "src": "8755:1:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "31",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "number",
                                              "type": "int_const 1",
                                              "value": "1"
                                            },
                                            "id": 15631,
                                            "name": "Literal",
                                            "src": "8759:1:55"
                                          }
                                        ],
                                        "id": 15632,
                                        "name": "BinaryOperation",
                                        "src": "8755:5:55"
                                      }
                                    ],
                                    "id": 15633,
                                    "name": "FunctionCall",
                                    "src": "8737:24:55"
                                  }
                                ],
                                "id": 15634,
                                "name": "Assignment",
                                "src": "8727:34:55"
                              }
                            ],
                            "id": 15635,
                            "name": "ExpressionStatement",
                            "src": "8727:34:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15554,
                                      "type": "bytes32",
                                      "value": "_currentDigest"
                                    },
                                    "id": 15636,
                                    "name": "Identifier",
                                    "src": "8775:14:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes32",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "hash256",
                                          "referencedDeclaration": 11851,
                                          "type": "function (bytes memory) pure returns (bytes32)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15551,
                                              "type": "bytes memory",
                                              "value": "_header"
                                            },
                                            "id": 15637,
                                            "name": "Identifier",
                                            "src": "8792:7:55"
                                          }
                                        ],
                                        "id": 15638,
                                        "name": "MemberAccess",
                                        "src": "8792:15:55"
                                      }
                                    ],
                                    "id": 15639,
                                    "name": "FunctionCall",
                                    "src": "8792:17:55"
                                  }
                                ],
                                "id": 15640,
                                "name": "Assignment",
                                "src": "8775:34:55"
                              }
                            ],
                            "id": 15641,
                            "name": "ExpressionStatement",
                            "src": "8775:34:55"
                          },
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "bytes32"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15316,
                                          "type": "mapping(bytes32 => bytes32)",
                                          "value": "previousBlock"
                                        },
                                        "id": 15642,
                                        "name": "Identifier",
                                        "src": "9010:13:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15554,
                                          "type": "bytes32",
                                          "value": "_currentDigest"
                                        },
                                        "id": 15643,
                                        "name": "Identifier",
                                        "src": "9024:14:55"
                                      }
                                    ],
                                    "id": 15644,
                                    "name": "IndexAccess",
                                    "src": "9010:29:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes32",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "type": "type(bytes32)",
                                          "value": "bytes32"
                                        },
                                        "id": 15645,
                                        "name": "ElementaryTypeNameExpression",
                                        "src": "9043:7:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "30",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 0",
                                          "value": "0"
                                        },
                                        "id": 15646,
                                        "name": "Literal",
                                        "src": "9051:1:55"
                                      }
                                    ],
                                    "id": 15647,
                                    "name": "FunctionCall",
                                    "src": "9043:10:55"
                                  }
                                ],
                                "id": 15648,
                                "name": "BinaryOperation",
                                "src": "9010:43:55"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "tuple()",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                },
                                                {
                                                  "typeIdentifier": "t_stringliteral_577a884d824749cadf11f1d13d4dc4655ad406f62456ad5e910541517ce4d497",
                                                  "typeString": "literal_string \"Header work is insufficient\""
                                                }
                                              ],
                                              "overloadedDeclarations": [
                                                18363,
                                                18364
                                              ],
                                              "referencedDeclaration": 18364,
                                              "type": "function (bool,string memory) pure",
                                              "value": "require"
                                            },
                                            "id": 15649,
                                            "name": "Identifier",
                                            "src": "9073:7:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "<=",
                                              "type": "bool"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "arguments": [
                                                    null
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "isStructConstructorCall": false,
                                                  "lValueRequested": false,
                                                  "names": [
                                                    null
                                                  ],
                                                  "type": "uint256",
                                                  "type_conversion": false
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": [
                                                        null
                                                      ],
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "member_name": "bytesToUint",
                                                      "referencedDeclaration": 11790,
                                                      "type": "function (bytes memory) pure returns (uint256)"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "arguments": [
                                                            null
                                                          ],
                                                          "isConstant": false,
                                                          "isLValue": false,
                                                          "isPure": false,
                                                          "isStructConstructorCall": false,
                                                          "lValueRequested": false,
                                                          "names": [
                                                            null
                                                          ],
                                                          "type": "bytes memory",
                                                          "type_conversion": false
                                                        },
                                                        "children": [
                                                          {
                                                            "attributes": {
                                                              "argumentTypes": [
                                                                null
                                                              ],
                                                              "isConstant": false,
                                                              "isLValue": false,
                                                              "isPure": false,
                                                              "lValueRequested": false,
                                                              "member_name": "reverseEndianness",
                                                              "referencedDeclaration": 11643,
                                                              "type": "function (bytes memory) pure returns (bytes memory)"
                                                            },
                                                            "children": [
                                                              {
                                                                "attributes": {
                                                                  "argumentTypes": null,
                                                                  "isConstant": false,
                                                                  "isLValue": false,
                                                                  "isPure": false,
                                                                  "isStructConstructorCall": false,
                                                                  "lValueRequested": false,
                                                                  "names": [
                                                                    null
                                                                  ],
                                                                  "type": "bytes memory",
                                                                  "type_conversion": false
                                                                },
                                                                "children": [
                                                                  {
                                                                    "attributes": {
                                                                      "argumentTypes": [
                                                                        {
                                                                          "typeIdentifier": "t_bytes32",
                                                                          "typeString": "bytes32"
                                                                        }
                                                                      ],
                                                                      "isConstant": false,
                                                                      "isLValue": false,
                                                                      "isPure": true,
                                                                      "lValueRequested": false,
                                                                      "member_name": "encodePacked",
                                                                      "referencedDeclaration": null,
                                                                      "type": "function () pure returns (bytes memory)"
                                                                    },
                                                                    "children": [
                                                                      {
                                                                        "attributes": {
                                                                          "argumentTypes": null,
                                                                          "overloadedDeclarations": [
                                                                            null
                                                                          ],
                                                                          "referencedDeclaration": 18347,
                                                                          "type": "abi",
                                                                          "value": "abi"
                                                                        },
                                                                        "id": 15650,
                                                                        "name": "Identifier",
                                                                        "src": "9102:3:55"
                                                                      }
                                                                    ],
                                                                    "id": 15651,
                                                                    "name": "MemberAccess",
                                                                    "src": "9102:16:55"
                                                                  },
                                                                  {
                                                                    "attributes": {
                                                                      "argumentTypes": null,
                                                                      "overloadedDeclarations": [
                                                                        null
                                                                      ],
                                                                      "referencedDeclaration": 15554,
                                                                      "type": "bytes32",
                                                                      "value": "_currentDigest"
                                                                    },
                                                                    "id": 15652,
                                                                    "name": "Identifier",
                                                                    "src": "9119:14:55"
                                                                  }
                                                                ],
                                                                "id": 15653,
                                                                "name": "FunctionCall",
                                                                "src": "9102:32:55"
                                                              }
                                                            ],
                                                            "id": 15654,
                                                            "name": "MemberAccess",
                                                            "src": "9102:50:55"
                                                          }
                                                        ],
                                                        "id": 15655,
                                                        "name": "FunctionCall",
                                                        "src": "9102:52:55"
                                                      }
                                                    ],
                                                    "id": 15656,
                                                    "name": "MemberAccess",
                                                    "src": "9102:64:55"
                                                  }
                                                ],
                                                "id": 15657,
                                                "name": "FunctionCall",
                                                "src": "9102:66:55"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15563,
                                                  "type": "uint256",
                                                  "value": "_target"
                                                },
                                                "id": 15658,
                                                "name": "Identifier",
                                                "src": "9172:7:55"
                                              }
                                            ],
                                            "id": 15659,
                                            "name": "BinaryOperation",
                                            "src": "9102:77:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "48656164657220776f726b20697320696e73756666696369656e74",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "string",
                                              "type": "literal_string \"Header work is insufficient\"",
                                              "value": "Header work is insufficient"
                                            },
                                            "id": 15660,
                                            "name": "Literal",
                                            "src": "9201:29:55"
                                          }
                                        ],
                                        "id": 15661,
                                        "name": "FunctionCall",
                                        "src": "9073:158:55"
                                      }
                                    ],
                                    "id": 15662,
                                    "name": "ExpressionStatement",
                                    "src": "9073:158:55"
                                  },
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "bytes32"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": true,
                                              "type": "bytes32"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15316,
                                                  "type": "mapping(bytes32 => bytes32)",
                                                  "value": "previousBlock"
                                                },
                                                "id": 15663,
                                                "name": "Identifier",
                                                "src": "9249:13:55"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15554,
                                                  "type": "bytes32",
                                                  "value": "_currentDigest"
                                                },
                                                "id": 15664,
                                                "name": "Identifier",
                                                "src": "9263:14:55"
                                              }
                                            ],
                                            "id": 15665,
                                            "name": "IndexAccess",
                                            "src": "9249:29:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15557,
                                              "type": "bytes32",
                                              "value": "_previousDigest"
                                            },
                                            "id": 15666,
                                            "name": "Identifier",
                                            "src": "9281:15:55"
                                          }
                                        ],
                                        "id": 15667,
                                        "name": "Assignment",
                                        "src": "9249:47:55"
                                      }
                                    ],
                                    "id": 15668,
                                    "name": "ExpressionStatement",
                                    "src": "9249:47:55"
                                  },
                                  {
                                    "attributes": {
                                      "falseBody": null
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "==",
                                          "type": "bool"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "%",
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15548,
                                                  "type": "uint256",
                                                  "value": "_height"
                                                },
                                                "id": 15669,
                                                "name": "Identifier",
                                                "src": "9318:7:55"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15306,
                                                  "type": "uint32",
                                                  "value": "HEIGHT_INTERVAL"
                                                },
                                                "id": 15670,
                                                "name": "Identifier",
                                                "src": "9328:15:55"
                                              }
                                            ],
                                            "id": 15671,
                                            "name": "BinaryOperation",
                                            "src": "9318:25:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "30",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "number",
                                              "type": "int_const 0",
                                              "value": "0"
                                            },
                                            "id": 15672,
                                            "name": "Literal",
                                            "src": "9347:1:55"
                                          }
                                        ],
                                        "id": 15673,
                                        "name": "BinaryOperation",
                                        "src": "9318:30:55"
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "operator": "=",
                                                  "type": "uint256"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "isConstant": false,
                                                      "isLValue": true,
                                                      "isPure": false,
                                                      "lValueRequested": true,
                                                      "type": "uint256"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 15320,
                                                          "type": "mapping(bytes32 => uint256)",
                                                          "value": "blockHeight"
                                                        },
                                                        "id": 15674,
                                                        "name": "Identifier",
                                                        "src": "9496:11:55"
                                                      },
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 15554,
                                                          "type": "bytes32",
                                                          "value": "_currentDigest"
                                                        },
                                                        "id": 15675,
                                                        "name": "Identifier",
                                                        "src": "9508:14:55"
                                                      }
                                                    ],
                                                    "id": 15676,
                                                    "name": "IndexAccess",
                                                    "src": "9496:27:55"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 15548,
                                                      "type": "uint256",
                                                      "value": "_height"
                                                    },
                                                    "id": 15677,
                                                    "name": "Identifier",
                                                    "src": "9526:7:55"
                                                  }
                                                ],
                                                "id": 15678,
                                                "name": "Assignment",
                                                "src": "9496:37:55"
                                              }
                                            ],
                                            "id": 15679,
                                            "name": "ExpressionStatement",
                                            "src": "9496:37:55"
                                          }
                                        ],
                                        "id": 15680,
                                        "name": "Block",
                                        "src": "9350:202:55"
                                      }
                                    ],
                                    "id": 15681,
                                    "name": "IfStatement",
                                    "src": "9314:238:55"
                                  }
                                ],
                                "id": 15682,
                                "name": "Block",
                                "src": "9055:511:55"
                              }
                            ],
                            "id": 15683,
                            "name": "IfStatement",
                            "src": "9006:560:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        {
                                          "typeIdentifier": "t_stringliteral_7512beb8d719892f726a7e4249334e5ee85f327ca3e7b9c917a97c9e30ad0aa4",
                                          "typeString": "literal_string \"Target changed unexpectedly\""
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        18363,
                                        18364
                                      ],
                                      "referencedDeclaration": 18364,
                                      "type": "function (bool,string memory) pure",
                                      "value": "require"
                                    },
                                    "id": 15684,
                                    "name": "Identifier",
                                    "src": "9650:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "==",
                                      "type": "bool"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "arguments": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "extractTarget",
                                              "referencedDeclaration": 12925,
                                              "type": "function (bytes memory) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15551,
                                                  "type": "bytes memory",
                                                  "value": "_header"
                                                },
                                                "id": 15685,
                                                "name": "Identifier",
                                                "src": "9658:7:55"
                                              }
                                            ],
                                            "id": 15686,
                                            "name": "MemberAccess",
                                            "src": "9658:21:55"
                                          }
                                        ],
                                        "id": 15687,
                                        "name": "FunctionCall",
                                        "src": "9658:23:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15563,
                                          "type": "uint256",
                                          "value": "_target"
                                        },
                                        "id": 15688,
                                        "name": "Identifier",
                                        "src": "9685:7:55"
                                      }
                                    ],
                                    "id": 15689,
                                    "name": "BinaryOperation",
                                    "src": "9658:34:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "546172676574206368616e67656420756e65787065637465646c79",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "string",
                                      "type": "literal_string \"Target changed unexpectedly\"",
                                      "value": "Target changed unexpectedly"
                                    },
                                    "id": 15690,
                                    "name": "Literal",
                                    "src": "9694:29:55"
                                  }
                                ],
                                "id": 15691,
                                "name": "FunctionCall",
                                "src": "9650:74:55"
                              }
                            ],
                            "id": 15692,
                            "name": "ExpressionStatement",
                            "src": "9650:74:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        {
                                          "typeIdentifier": "t_stringliteral_09edac151df9e4894b9dc57d4b428f162596747b62bb7347fd3851a717f60df7",
                                          "typeString": "literal_string \"Headers do not form a consistent chain\""
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        18363,
                                        18364
                                      ],
                                      "referencedDeclaration": 18364,
                                      "type": "function (bool,string memory) pure",
                                      "value": "require"
                                    },
                                    "id": 15693,
                                    "name": "Identifier",
                                    "src": "9738:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bool",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_bytes32",
                                              "typeString": "bytes32"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "validateHeaderPrevHash",
                                          "referencedDeclaration": 14206,
                                          "type": "function (bytes memory,bytes32) pure returns (bool)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15551,
                                              "type": "bytes memory",
                                              "value": "_header"
                                            },
                                            "id": 15694,
                                            "name": "Identifier",
                                            "src": "9746:7:55"
                                          }
                                        ],
                                        "id": 15695,
                                        "name": "MemberAccess",
                                        "src": "9746:30:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15557,
                                          "type": "bytes32",
                                          "value": "_previousDigest"
                                        },
                                        "id": 15696,
                                        "name": "Identifier",
                                        "src": "9777:15:55"
                                      }
                                    ],
                                    "id": 15697,
                                    "name": "FunctionCall",
                                    "src": "9746:47:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "4865616465727320646f206e6f7420666f726d206120636f6e73697374656e7420636861696e",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "string",
                                      "type": "literal_string \"Headers do not form a consistent chain\"",
                                      "value": "Headers do not form a consistent chain"
                                    },
                                    "id": 15698,
                                    "name": "Literal",
                                    "src": "9795:40:55"
                                  }
                                ],
                                "id": 15699,
                                "name": "FunctionCall",
                                "src": "9738:98:55"
                              }
                            ],
                            "id": 15700,
                            "name": "ExpressionStatement",
                            "src": "9738:98:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15557,
                                      "type": "bytes32",
                                      "value": "_previousDigest"
                                    },
                                    "id": 15701,
                                    "name": "Identifier",
                                    "src": "9851:15:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15554,
                                      "type": "bytes32",
                                      "value": "_currentDigest"
                                    },
                                    "id": 15702,
                                    "name": "Identifier",
                                    "src": "9869:14:55"
                                  }
                                ],
                                "id": 15703,
                                "name": "Assignment",
                                "src": "9851:32:55"
                              }
                            ],
                            "id": 15704,
                            "name": "ExpressionStatement",
                            "src": "9851:32:55"
                          }
                        ],
                        "id": 15705,
                        "name": "Block",
                        "src": "8660:1234:55"
                      }
                    ],
                    "id": 15706,
                    "name": "ForStatement",
                    "src": "8600:1294:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14299,
                              "type": "function (bytes32,bytes32)",
                              "value": "Extension"
                            },
                            "id": 15707,
                            "name": "Identifier",
                            "src": "9909:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "hash256",
                                  "referencedDeclaration": 11851,
                                  "type": "function (bytes memory) pure returns (bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15538,
                                      "type": "bytes memory",
                                      "value": "_anchor"
                                    },
                                    "id": 15708,
                                    "name": "Identifier",
                                    "src": "9932:7:55"
                                  }
                                ],
                                "id": 15709,
                                "name": "MemberAccess",
                                "src": "9932:15:55"
                              }
                            ],
                            "id": 15710,
                            "name": "FunctionCall",
                            "src": "9932:17:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15554,
                              "type": "bytes32",
                              "value": "_currentDigest"
                            },
                            "id": 15711,
                            "name": "Identifier",
                            "src": "9963:14:55"
                          }
                        ],
                        "id": 15712,
                        "name": "FunctionCall",
                        "src": "9909:69:55"
                      }
                    ],
                    "id": 15713,
                    "name": "EmitStatement",
                    "src": "9904:74:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 15546
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 15714,
                        "name": "Literal",
                        "src": "9995:4:55"
                      }
                    ],
                    "id": 15715,
                    "name": "Return",
                    "src": "9988:11:55"
                  }
                ],
                "id": 15716,
                "name": "Block",
                "src": "7830:2176:55"
              }
            ],
            "id": 15717,
            "name": "FunctionDefinition",
            "src": "7724:2282:55"
          },
          {
            "attributes": {
              "documentation": "@notice                       Adds headers to storage, performs additional validation of retarget\n @dev                          Checks the retarget, the heights, and the linkage\n @param  _oldPeriodStartHeader The first header in the difficulty period being closed\n @param  _oldPeriodEndHeader   The last header in the difficulty period being closed\n @param  _headers              A tightly-packed list of 80-byte Bitcoin headers\n @return                       True if successfully written, error otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_addHeadersWithRetarget",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_oldPeriodStartHeader",
                      "scope": 15844,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15718,
                        "name": "ElementaryTypeName",
                        "src": "10604:5:55"
                      }
                    ],
                    "id": 15719,
                    "name": "VariableDeclaration",
                    "src": "10604:34:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_oldPeriodEndHeader",
                      "scope": 15844,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15720,
                        "name": "ElementaryTypeName",
                        "src": "10648:5:55"
                      }
                    ],
                    "id": 15721,
                    "name": "VariableDeclaration",
                    "src": "10648:32:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_headers",
                      "scope": 15844,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 15722,
                        "name": "ElementaryTypeName",
                        "src": "10690:5:55"
                      }
                    ],
                    "id": 15723,
                    "name": "VariableDeclaration",
                    "src": "10690:21:55"
                  }
                ],
                "id": 15724,
                "name": "ParameterList",
                "src": "10594:123:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15844,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15725,
                        "name": "ElementaryTypeName",
                        "src": "10736:4:55"
                      }
                    ],
                    "id": 15726,
                    "name": "VariableDeclaration",
                    "src": "10736:4:55"
                  }
                ],
                "id": 15727,
                "name": "ParameterList",
                "src": "10735:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        15729
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_startHeight",
                          "scope": 15843,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15728,
                            "name": "ElementaryTypeName",
                            "src": "10806:7:55"
                          }
                        ],
                        "id": 15729,
                        "name": "VariableDeclaration",
                        "src": "10806:20:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 15730,
                            "name": "Identifier",
                            "src": "10829:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "hash256",
                                  "referencedDeclaration": 11851,
                                  "type": "function (bytes memory) pure returns (bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15719,
                                      "type": "bytes memory",
                                      "value": "_oldPeriodStartHeader"
                                    },
                                    "id": 15731,
                                    "name": "Identifier",
                                    "src": "10841:21:55"
                                  }
                                ],
                                "id": 15732,
                                "name": "MemberAccess",
                                "src": "10841:29:55"
                              }
                            ],
                            "id": 15733,
                            "name": "FunctionCall",
                            "src": "10841:31:55"
                          }
                        ],
                        "id": 15734,
                        "name": "FunctionCall",
                        "src": "10829:44:55"
                      }
                    ],
                    "id": 15735,
                    "name": "VariableDeclarationStatement",
                    "src": "10806:67:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15737
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_endHeight",
                          "scope": 15843,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15736,
                            "name": "ElementaryTypeName",
                            "src": "10883:7:55"
                          }
                        ],
                        "id": 15737,
                        "name": "VariableDeclaration",
                        "src": "10883:18:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 15738,
                            "name": "Identifier",
                            "src": "10904:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "hash256",
                                  "referencedDeclaration": 11851,
                                  "type": "function (bytes memory) pure returns (bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15721,
                                      "type": "bytes memory",
                                      "value": "_oldPeriodEndHeader"
                                    },
                                    "id": 15739,
                                    "name": "Identifier",
                                    "src": "10916:19:55"
                                  }
                                ],
                                "id": 15740,
                                "name": "MemberAccess",
                                "src": "10916:27:55"
                              }
                            ],
                            "id": 15741,
                            "name": "FunctionCall",
                            "src": "10916:29:55"
                          }
                        ],
                        "id": 15742,
                        "name": "FunctionCall",
                        "src": "10904:42:55"
                      }
                    ],
                    "id": 15743,
                    "name": "VariableDeclarationStatement",
                    "src": "10883:63:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_7bce8283552532854aff5aeca68cfd1afcae4f19a96f4f0f9a36c4ae487d1db8",
                                  "typeString": "literal_string \"Must provide the last header of the closing difficulty period\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15744,
                            "name": "Identifier",
                            "src": "11023:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "%",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15737,
                                      "type": "uint256",
                                      "value": "_endHeight"
                                    },
                                    "id": 15745,
                                    "name": "Identifier",
                                    "src": "11044:10:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32303136",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2016",
                                      "value": "2016"
                                    },
                                    "id": 15746,
                                    "name": "Literal",
                                    "src": "11057:4:55"
                                  }
                                ],
                                "id": 15747,
                                "name": "BinaryOperation",
                                "src": "11044:17:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "32303135",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 2015",
                                  "value": "2015"
                                },
                                "id": 15748,
                                "name": "Literal",
                                "src": "11065:4:55"
                              }
                            ],
                            "id": 15749,
                            "name": "BinaryOperation",
                            "src": "11044:25:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "4d7573742070726f7669646520746865206c61737420686561646572206f662074686520636c6f73696e6720646966666963756c747920706572696f64",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Must provide the last header of the closing difficulty period\"",
                              "value": "Must provide the last header of the closing difficulty period"
                            },
                            "id": 15750,
                            "name": "Literal",
                            "src": "11083:63:55"
                          }
                        ],
                        "id": 15751,
                        "name": "FunctionCall",
                        "src": "11023:124:55"
                      }
                    ],
                    "id": 15752,
                    "name": "ExpressionStatement",
                    "src": "11023:124:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_67c7c738a8cf54313c844b3267d6767c493dfc5af7d7c931a36a94b2d81f8e3e",
                                  "typeString": "literal_string \"Must provide exactly 1 difficulty period\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15753,
                            "name": "Identifier",
                            "src": "11157:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15737,
                                  "type": "uint256",
                                  "value": "_endHeight"
                                },
                                "id": 15754,
                                "name": "Identifier",
                                "src": "11178:10:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_2015_by_1",
                                          "typeString": "int_const 2015"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15729,
                                          "type": "uint256",
                                          "value": "_startHeight"
                                        },
                                        "id": 15755,
                                        "name": "Identifier",
                                        "src": "11192:12:55"
                                      }
                                    ],
                                    "id": 15756,
                                    "name": "MemberAccess",
                                    "src": "11192:16:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32303135",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2015",
                                      "value": "2015"
                                    },
                                    "id": 15757,
                                    "name": "Literal",
                                    "src": "11209:4:55"
                                  }
                                ],
                                "id": 15758,
                                "name": "FunctionCall",
                                "src": "11192:22:55"
                              }
                            ],
                            "id": 15759,
                            "name": "BinaryOperation",
                            "src": "11178:36:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "4d7573742070726f766964652065786163746c79203120646966666963756c747920706572696f64",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Must provide exactly 1 difficulty period\"",
                              "value": "Must provide exactly 1 difficulty period"
                            },
                            "id": 15760,
                            "name": "Literal",
                            "src": "11228:42:55"
                          }
                        ],
                        "id": 15761,
                        "name": "FunctionCall",
                        "src": "11157:114:55"
                      }
                    ],
                    "id": 15762,
                    "name": "ExpressionStatement",
                    "src": "11157:114:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_c6456ff224d25c664f0efff0894b66e1bf05b6cd6fdb6e7d6c08db546c000032",
                                  "typeString": "literal_string \"Period header difficulties do not match\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15763,
                            "name": "Identifier",
                            "src": "11281:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "extractDifficulty",
                                      "referencedDeclaration": 12998,
                                      "type": "function (bytes memory) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15719,
                                          "type": "bytes memory",
                                          "value": "_oldPeriodStartHeader"
                                        },
                                        "id": 15764,
                                        "name": "Identifier",
                                        "src": "11302:21:55"
                                      }
                                    ],
                                    "id": 15765,
                                    "name": "MemberAccess",
                                    "src": "11302:39:55"
                                  }
                                ],
                                "id": 15766,
                                "name": "FunctionCall",
                                "src": "11302:41:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "extractDifficulty",
                                      "referencedDeclaration": 12998,
                                      "type": "function (bytes memory) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15721,
                                          "type": "bytes memory",
                                          "value": "_oldPeriodEndHeader"
                                        },
                                        "id": 15767,
                                        "name": "Identifier",
                                        "src": "11347:19:55"
                                      }
                                    ],
                                    "id": 15768,
                                    "name": "MemberAccess",
                                    "src": "11347:37:55"
                                  }
                                ],
                                "id": 15769,
                                "name": "FunctionCall",
                                "src": "11347:39:55"
                              }
                            ],
                            "id": 15770,
                            "name": "BinaryOperation",
                            "src": "11302:84:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "506572696f642068656164657220646966666963756c7469657320646f206e6f74206d61746368",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Period header difficulties do not match\"",
                              "value": "Period header difficulties do not match"
                            },
                            "id": 15771,
                            "name": "Literal",
                            "src": "11400:41:55"
                          }
                        ],
                        "id": 15772,
                        "name": "FunctionCall",
                        "src": "11281:161:55"
                      }
                    ],
                    "id": 15773,
                    "name": "ExpressionStatement",
                    "src": "11281:161:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15775
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_newPeriodStart",
                          "scope": 15843,
                          "stateVariable": false,
                          "storageLocation": "memory",
                          "type": "bytes",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes",
                              "type": "bytes"
                            },
                            "id": 15774,
                            "name": "ElementaryTypeName",
                            "src": "11547:5:55"
                          }
                        ],
                        "id": 15775,
                        "name": "VariableDeclaration",
                        "src": "11547:28:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_rational_80_by_1",
                                  "typeString": "int_const 80"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "slice",
                              "referencedDeclaration": 13281,
                              "type": "function (bytes memory,uint256,uint256) pure returns (bytes memory)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15723,
                                  "type": "bytes memory",
                                  "value": "_headers"
                                },
                                "id": 15776,
                                "name": "Identifier",
                                "src": "11578:8:55"
                              }
                            ],
                            "id": 15777,
                            "name": "MemberAccess",
                            "src": "11578:14:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 15778,
                            "name": "Literal",
                            "src": "11593:1:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "3830",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 80",
                              "value": "80"
                            },
                            "id": 15779,
                            "name": "Literal",
                            "src": "11596:2:55"
                          }
                        ],
                        "id": 15780,
                        "name": "FunctionCall",
                        "src": "11578:21:55"
                      }
                    ],
                    "id": 15781,
                    "name": "VariableDeclarationStatement",
                    "src": "11547:52:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15783
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_actualTarget",
                          "scope": 15843,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15782,
                            "name": "ElementaryTypeName",
                            "src": "11609:7:55"
                          }
                        ],
                        "id": 15783,
                        "name": "VariableDeclaration",
                        "src": "11609:21:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "extractTarget",
                              "referencedDeclaration": 12925,
                              "type": "function (bytes memory) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15775,
                                  "type": "bytes memory",
                                  "value": "_newPeriodStart"
                                },
                                "id": 15784,
                                "name": "Identifier",
                                "src": "11633:15:55"
                              }
                            ],
                            "id": 15785,
                            "name": "MemberAccess",
                            "src": "11633:29:55"
                          }
                        ],
                        "id": 15786,
                        "name": "FunctionCall",
                        "src": "11633:31:55"
                      }
                    ],
                    "id": 15787,
                    "name": "VariableDeclarationStatement",
                    "src": "11609:55:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15789
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_expectedTarget",
                          "scope": 15843,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15788,
                            "name": "ElementaryTypeName",
                            "src": "11674:7:55"
                          }
                        ],
                        "id": 15789,
                        "name": "VariableDeclaration",
                        "src": "11674:23:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint32",
                                  "typeString": "uint32"
                                },
                                {
                                  "typeIdentifier": "t_uint32",
                                  "typeString": "uint32"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "retargetAlgorithm",
                              "referencedDeclaration": 13215,
                              "type": "function (uint256,uint256,uint256) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 13216,
                                  "type": "type(library BTCUtils)",
                                  "value": "BTCUtils"
                                },
                                "id": 15790,
                                "name": "Identifier",
                                "src": "11700:8:55"
                              }
                            ],
                            "id": 15791,
                            "name": "MemberAccess",
                            "src": "11700:26:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "extractTarget",
                                  "referencedDeclaration": 12925,
                                  "type": "function (bytes memory) pure returns (uint256)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15719,
                                      "type": "bytes memory",
                                      "value": "_oldPeriodStartHeader"
                                    },
                                    "id": 15792,
                                    "name": "Identifier",
                                    "src": "11740:21:55"
                                  }
                                ],
                                "id": 15793,
                                "name": "MemberAccess",
                                "src": "11740:35:55"
                              }
                            ],
                            "id": 15794,
                            "name": "FunctionCall",
                            "src": "11740:37:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "uint32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "extractTimestamp",
                                  "referencedDeclaration": 12984,
                                  "type": "function (bytes memory) pure returns (uint32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15719,
                                      "type": "bytes memory",
                                      "value": "_oldPeriodStartHeader"
                                    },
                                    "id": 15795,
                                    "name": "Identifier",
                                    "src": "11791:21:55"
                                  }
                                ],
                                "id": 15796,
                                "name": "MemberAccess",
                                "src": "11791:38:55"
                              }
                            ],
                            "id": 15797,
                            "name": "FunctionCall",
                            "src": "11791:40:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "uint32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "extractTimestamp",
                                  "referencedDeclaration": 12984,
                                  "type": "function (bytes memory) pure returns (uint32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15721,
                                      "type": "bytes memory",
                                      "value": "_oldPeriodEndHeader"
                                    },
                                    "id": 15798,
                                    "name": "Identifier",
                                    "src": "11845:19:55"
                                  }
                                ],
                                "id": 15799,
                                "name": "MemberAccess",
                                "src": "11845:36:55"
                              }
                            ],
                            "id": 15800,
                            "name": "FunctionCall",
                            "src": "11845:38:55"
                          }
                        ],
                        "id": 15801,
                        "name": "FunctionCall",
                        "src": "11700:193:55"
                      }
                    ],
                    "id": 15802,
                    "name": "VariableDeclarationStatement",
                    "src": "11674:219:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_88fb068d9d9bb4cb430555f47426ce90db05a008971325835664896da5946718",
                                  "typeString": "literal_string \"Invalid retarget provided\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15803,
                            "name": "Identifier",
                            "src": "11903:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "&",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15783,
                                          "type": "uint256",
                                          "value": "_actualTarget"
                                        },
                                        "id": 15804,
                                        "name": "Identifier",
                                        "src": "11925:13:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15789,
                                          "type": "uint256",
                                          "value": "_expectedTarget"
                                        },
                                        "id": 15805,
                                        "name": "Identifier",
                                        "src": "11941:15:55"
                                      }
                                    ],
                                    "id": 15806,
                                    "name": "BinaryOperation",
                                    "src": "11925:31:55"
                                  }
                                ],
                                "id": 15807,
                                "name": "TupleExpression",
                                "src": "11924:33:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15783,
                                  "type": "uint256",
                                  "value": "_actualTarget"
                                },
                                "id": 15808,
                                "name": "Identifier",
                                "src": "11961:13:55"
                              }
                            ],
                            "id": 15809,
                            "name": "BinaryOperation",
                            "src": "11924:50:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "496e76616c69642072657461726765742070726f7669646564",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Invalid retarget provided\"",
                              "value": "Invalid retarget provided"
                            },
                            "id": 15810,
                            "name": "Literal",
                            "src": "11988:27:55"
                          }
                        ],
                        "id": 15811,
                        "name": "FunctionCall",
                        "src": "11903:113:55"
                      }
                    ],
                    "id": 15812,
                    "name": "ExpressionStatement",
                    "src": "11903:113:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15814
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_oldDiff",
                          "scope": 15843,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15813,
                            "name": "ElementaryTypeName",
                            "src": "12226:7:55"
                          }
                        ],
                        "id": 15814,
                        "name": "VariableDeclaration",
                        "src": "12226:16:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "extractDifficulty",
                              "referencedDeclaration": 12998,
                              "type": "function (bytes memory) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15719,
                                  "type": "bytes memory",
                                  "value": "_oldPeriodStartHeader"
                                },
                                "id": 15815,
                                "name": "Identifier",
                                "src": "12245:21:55"
                              }
                            ],
                            "id": 15816,
                            "name": "MemberAccess",
                            "src": "12245:39:55"
                          }
                        ],
                        "id": 15817,
                        "name": "FunctionCall",
                        "src": "12245:41:55"
                      }
                    ],
                    "id": 15818,
                    "name": "VariableDeclarationStatement",
                    "src": "12226:60:55"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15324,
                                  "type": "uint256",
                                  "value": "prevEpochDiff"
                                },
                                "id": 15819,
                                "name": "Identifier",
                                "src": "12300:13:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15814,
                                  "type": "uint256",
                                  "value": "_oldDiff"
                                },
                                "id": 15820,
                                "name": "Identifier",
                                "src": "12317:8:55"
                              }
                            ],
                            "id": 15821,
                            "name": "BinaryOperation",
                            "src": "12300:25:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": ">",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15737,
                                  "type": "uint256",
                                  "value": "_endHeight"
                                },
                                "id": 15822,
                                "name": "Identifier",
                                "src": "12329:10:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_2016_by_1",
                                          "typeString": "int_const 2016"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "sub",
                                      "referencedDeclaration": 13895,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_bytes32",
                                                  "typeString": "bytes32"
                                                }
                                              ],
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15905,
                                              "type": "function (bytes32) view returns (uint256)",
                                              "value": "_findHeight"
                                            },
                                            "id": 15823,
                                            "name": "Identifier",
                                            "src": "12342:11:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15310,
                                              "type": "bytes32",
                                              "value": "bestKnownDigest"
                                            },
                                            "id": 15824,
                                            "name": "Identifier",
                                            "src": "12354:15:55"
                                          }
                                        ],
                                        "id": 15825,
                                        "name": "FunctionCall",
                                        "src": "12342:28:55"
                                      }
                                    ],
                                    "id": 15826,
                                    "name": "MemberAccess",
                                    "src": "12342:32:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32303136",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2016",
                                      "value": "2016"
                                    },
                                    "id": 15827,
                                    "name": "Literal",
                                    "src": "12375:4:55"
                                  }
                                ],
                                "id": 15828,
                                "name": "FunctionCall",
                                "src": "12342:38:55"
                              }
                            ],
                            "id": 15829,
                            "name": "BinaryOperation",
                            "src": "12329:51:55"
                          }
                        ],
                        "id": 15830,
                        "name": "BinaryOperation",
                        "src": "12300:80:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15324,
                                      "type": "uint256",
                                      "value": "prevEpochDiff"
                                    },
                                    "id": 15831,
                                    "name": "Identifier",
                                    "src": "12396:13:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15814,
                                      "type": "uint256",
                                      "value": "_oldDiff"
                                    },
                                    "id": 15832,
                                    "name": "Identifier",
                                    "src": "12412:8:55"
                                  }
                                ],
                                "id": 15833,
                                "name": "Assignment",
                                "src": "12396:24:55"
                              }
                            ],
                            "id": 15834,
                            "name": "ExpressionStatement",
                            "src": "12396:24:55"
                          }
                        ],
                        "id": 15835,
                        "name": "Block",
                        "src": "12382:49:55"
                      }
                    ],
                    "id": 15836,
                    "name": "IfStatement",
                    "src": "12296:135:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 15727
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15717,
                              "type": "function (bytes memory,bytes memory,bool) returns (bool)",
                              "value": "_addHeaders"
                            },
                            "id": 15837,
                            "name": "Identifier",
                            "src": "12502:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15721,
                              "type": "bytes memory",
                              "value": "_oldPeriodEndHeader"
                            },
                            "id": 15838,
                            "name": "Identifier",
                            "src": "12514:19:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15723,
                              "type": "bytes memory",
                              "value": "_headers"
                            },
                            "id": 15839,
                            "name": "Identifier",
                            "src": "12535:8:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "74727565",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "bool",
                              "type": "bool",
                              "value": "true"
                            },
                            "id": 15840,
                            "name": "Literal",
                            "src": "12545:4:55"
                          }
                        ],
                        "id": 15841,
                        "name": "FunctionCall",
                        "src": "12502:48:55"
                      }
                    ],
                    "id": 15842,
                    "name": "Return",
                    "src": "12495:55:55"
                  }
                ],
                "id": 15843,
                "name": "Block",
                "src": "10742:1815:55"
              }
            ],
            "id": 15844,
            "name": "FunctionDefinition",
            "src": "10562:1995:55"
          },
          {
            "attributes": {
              "documentation": "@notice         Finds the height of a header by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_findHeight",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 15905,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15845,
                        "name": "ElementaryTypeName",
                        "src": "12815:7:55"
                      }
                    ],
                    "id": 15846,
                    "name": "VariableDeclaration",
                    "src": "12815:15:55"
                  }
                ],
                "id": 15847,
                "name": "ParameterList",
                "src": "12814:17:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15905,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15848,
                        "name": "ElementaryTypeName",
                        "src": "12855:7:55"
                      }
                    ],
                    "id": 15849,
                    "name": "VariableDeclaration",
                    "src": "12855:7:55"
                  }
                ],
                "id": 15850,
                "name": "ParameterList",
                "src": "12854:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        15852
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_height",
                          "scope": 15904,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 15851,
                            "name": "ElementaryTypeName",
                            "src": "12874:7:55"
                          }
                        ],
                        "id": 15852,
                        "name": "VariableDeclaration",
                        "src": "12874:15:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "30",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "number",
                          "type": "int_const 0",
                          "value": "0"
                        },
                        "id": 15853,
                        "name": "Literal",
                        "src": "12892:1:55"
                      }
                    ],
                    "id": 15854,
                    "name": "VariableDeclarationStatement",
                    "src": "12874:19:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        15856
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_current",
                          "scope": 15904,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 15855,
                            "name": "ElementaryTypeName",
                            "src": "12903:7:55"
                          }
                        ],
                        "id": 15856,
                        "name": "VariableDeclaration",
                        "src": "12903:16:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15846,
                          "type": "bytes32",
                          "value": "_digest"
                        },
                        "id": 15857,
                        "name": "Identifier",
                        "src": "12922:7:55"
                      }
                    ],
                    "id": 15858,
                    "name": "VariableDeclarationStatement",
                    "src": "12903:26:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "assignments": [
                            15860
                          ]
                        },
                        "children": [
                          {
                            "attributes": {
                              "constant": false,
                              "name": "i",
                              "scope": 15899,
                              "stateVariable": false,
                              "storageLocation": "default",
                              "type": "uint256",
                              "value": null,
                              "visibility": "internal"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint256",
                                  "type": "uint256"
                                },
                                "id": 15859,
                                "name": "ElementaryTypeName",
                                "src": "12944:7:55"
                              }
                            ],
                            "id": 15860,
                            "name": "VariableDeclaration",
                            "src": "12944:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 15861,
                            "name": "Literal",
                            "src": "12956:1:55"
                          }
                        ],
                        "id": 15862,
                        "name": "VariableDeclarationStatement",
                        "src": "12944:13:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15860,
                              "type": "uint256",
                              "value": "i"
                            },
                            "id": 15863,
                            "name": "Identifier",
                            "src": "12959:1:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "operator": "+",
                              "type": "uint32"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15306,
                                  "type": "uint32",
                                  "value": "HEIGHT_INTERVAL"
                                },
                                "id": 15864,
                                "name": "Identifier",
                                "src": "12963:15:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "31",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 1",
                                  "value": "1"
                                },
                                "id": 15865,
                                "name": "Literal",
                                "src": "12981:1:55"
                              }
                            ],
                            "id": 15866,
                            "name": "BinaryOperation",
                            "src": "12963:19:55"
                          }
                        ],
                        "id": 15867,
                        "name": "BinaryOperation",
                        "src": "12959:23:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15860,
                                  "type": "uint256",
                                  "value": "i"
                                },
                                "id": 15868,
                                "name": "Identifier",
                                "src": "12984:1:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15860,
                                          "type": "uint256",
                                          "value": "i"
                                        },
                                        "id": 15869,
                                        "name": "Identifier",
                                        "src": "12988:1:55"
                                      }
                                    ],
                                    "id": 15870,
                                    "name": "MemberAccess",
                                    "src": "12988:5:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 15871,
                                    "name": "Literal",
                                    "src": "12994:1:55"
                                  }
                                ],
                                "id": 15872,
                                "name": "FunctionCall",
                                "src": "12988:8:55"
                              }
                            ],
                            "id": 15873,
                            "name": "Assignment",
                            "src": "12984:12:55"
                          }
                        ],
                        "id": 15874,
                        "name": "ExpressionStatement",
                        "src": "12984:12:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15852,
                                      "type": "uint256",
                                      "value": "_height"
                                    },
                                    "id": 15875,
                                    "name": "Identifier",
                                    "src": "13012:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15320,
                                          "type": "mapping(bytes32 => uint256)",
                                          "value": "blockHeight"
                                        },
                                        "id": 15876,
                                        "name": "Identifier",
                                        "src": "13022:11:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15856,
                                          "type": "bytes32",
                                          "value": "_current"
                                        },
                                        "id": 15877,
                                        "name": "Identifier",
                                        "src": "13034:8:55"
                                      }
                                    ],
                                    "id": 15878,
                                    "name": "IndexAccess",
                                    "src": "13022:21:55"
                                  }
                                ],
                                "id": 15879,
                                "name": "Assignment",
                                "src": "13012:31:55"
                              }
                            ],
                            "id": 15880,
                            "name": "ExpressionStatement",
                            "src": "13012:31:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15852,
                                      "type": "uint256",
                                      "value": "_height"
                                    },
                                    "id": 15881,
                                    "name": "Identifier",
                                    "src": "13061:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 15882,
                                    "name": "Literal",
                                    "src": "13072:1:55"
                                  }
                                ],
                                "id": 15883,
                                "name": "BinaryOperation",
                                "src": "13061:12:55"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "bytes32"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15856,
                                              "type": "bytes32",
                                              "value": "_current"
                                            },
                                            "id": 15884,
                                            "name": "Identifier",
                                            "src": "13093:8:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "type": "bytes32"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15316,
                                                  "type": "mapping(bytes32 => bytes32)",
                                                  "value": "previousBlock"
                                                },
                                                "id": 15885,
                                                "name": "Identifier",
                                                "src": "13104:13:55"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15856,
                                                  "type": "bytes32",
                                                  "value": "_current"
                                                },
                                                "id": 15886,
                                                "name": "Identifier",
                                                "src": "13118:8:55"
                                              }
                                            ],
                                            "id": 15887,
                                            "name": "IndexAccess",
                                            "src": "13104:23:55"
                                          }
                                        ],
                                        "id": 15888,
                                        "name": "Assignment",
                                        "src": "13093:34:55"
                                      }
                                    ],
                                    "id": 15889,
                                    "name": "ExpressionStatement",
                                    "src": "13093:34:55"
                                  }
                                ],
                                "id": 15890,
                                "name": "Block",
                                "src": "13075:67:55"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "functionReturnParameters": 15850
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "add",
                                              "referencedDeclaration": 13920,
                                              "type": "function (uint256,uint256) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15852,
                                                  "type": "uint256",
                                                  "value": "_height"
                                                },
                                                "id": 15891,
                                                "name": "Identifier",
                                                "src": "13173:7:55"
                                              }
                                            ],
                                            "id": 15892,
                                            "name": "MemberAccess",
                                            "src": "13173:11:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 15860,
                                              "type": "uint256",
                                              "value": "i"
                                            },
                                            "id": 15893,
                                            "name": "Identifier",
                                            "src": "13185:1:55"
                                          }
                                        ],
                                        "id": 15894,
                                        "name": "FunctionCall",
                                        "src": "13173:14:55"
                                      }
                                    ],
                                    "id": 15895,
                                    "name": "Return",
                                    "src": "13166:21:55"
                                  }
                                ],
                                "id": 15896,
                                "name": "Block",
                                "src": "13148:54:55"
                              }
                            ],
                            "id": 15897,
                            "name": "IfStatement",
                            "src": "13057:145:55"
                          }
                        ],
                        "id": 15898,
                        "name": "Block",
                        "src": "12998:214:55"
                      }
                    ],
                    "id": 15899,
                    "name": "ForStatement",
                    "src": "12939:273:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_2fe269f479def214aa4213fc5a3676b42da06f3fe6bec66494b82d7cb74589b0",
                                  "typeString": "literal_string \"Unknown block\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18365,
                                18366
                              ],
                              "referencedDeclaration": 18366,
                              "type": "function (string memory) pure",
                              "value": "revert"
                            },
                            "id": 15900,
                            "name": "Identifier",
                            "src": "13221:6:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "556e6b6e6f776e20626c6f636b",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Unknown block\"",
                              "value": "Unknown block"
                            },
                            "id": 15901,
                            "name": "Literal",
                            "src": "13228:15:55"
                          }
                        ],
                        "id": 15902,
                        "name": "FunctionCall",
                        "src": "13221:23:55"
                      }
                    ],
                    "id": 15903,
                    "name": "ExpressionStatement",
                    "src": "13221:23:55"
                  }
                ],
                "id": 15904,
                "name": "Block",
                "src": "12864:387:55"
              }
            ],
            "id": 15905,
            "name": "FunctionDefinition",
            "src": "12794:457:55"
          },
          {
            "attributes": {
              "documentation": "@notice         Finds an ancestor for a block by its digest\n @dev            Will fail if the header is unknown\n @param _digest  The header digest to search for\n @return         The height of the header, or error if unknown",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_findAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_digest",
                      "scope": 15952,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15906,
                        "name": "ElementaryTypeName",
                        "src": "13533:7:55"
                      }
                    ],
                    "id": 15907,
                    "name": "VariableDeclaration",
                    "src": "13533:15:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_offset",
                      "scope": 15952,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15908,
                        "name": "ElementaryTypeName",
                        "src": "13550:7:55"
                      }
                    ],
                    "id": 15909,
                    "name": "VariableDeclaration",
                    "src": "13550:15:55"
                  }
                ],
                "id": 15910,
                "name": "ParameterList",
                "src": "13532:34:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15952,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15911,
                        "name": "ElementaryTypeName",
                        "src": "13590:7:55"
                      }
                    ],
                    "id": 15912,
                    "name": "VariableDeclaration",
                    "src": "13590:7:55"
                  }
                ],
                "id": 15913,
                "name": "ParameterList",
                "src": "13589:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        15915
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_current",
                          "scope": 15951,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 15914,
                            "name": "ElementaryTypeName",
                            "src": "13609:7:55"
                          }
                        ],
                        "id": 15915,
                        "name": "VariableDeclaration",
                        "src": "13609:16:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15907,
                          "type": "bytes32",
                          "value": "_digest"
                        },
                        "id": 15916,
                        "name": "Identifier",
                        "src": "13628:7:55"
                      }
                    ],
                    "id": 15917,
                    "name": "VariableDeclarationStatement",
                    "src": "13609:26:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "assignments": [
                            15919
                          ]
                        },
                        "children": [
                          {
                            "attributes": {
                              "constant": false,
                              "name": "i",
                              "scope": 15939,
                              "stateVariable": false,
                              "storageLocation": "default",
                              "type": "uint256",
                              "value": null,
                              "visibility": "internal"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint256",
                                  "type": "uint256"
                                },
                                "id": 15918,
                                "name": "ElementaryTypeName",
                                "src": "13650:7:55"
                              }
                            ],
                            "id": 15919,
                            "name": "VariableDeclaration",
                            "src": "13650:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 15920,
                            "name": "Literal",
                            "src": "13662:1:55"
                          }
                        ],
                        "id": 15921,
                        "name": "VariableDeclarationStatement",
                        "src": "13650:13:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15919,
                              "type": "uint256",
                              "value": "i"
                            },
                            "id": 15922,
                            "name": "Identifier",
                            "src": "13665:1:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15909,
                              "type": "uint256",
                              "value": "_offset"
                            },
                            "id": 15923,
                            "name": "Identifier",
                            "src": "13669:7:55"
                          }
                        ],
                        "id": 15924,
                        "name": "BinaryOperation",
                        "src": "13665:11:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15919,
                                  "type": "uint256",
                                  "value": "i"
                                },
                                "id": 15925,
                                "name": "Identifier",
                                "src": "13678:1:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15919,
                                          "type": "uint256",
                                          "value": "i"
                                        },
                                        "id": 15926,
                                        "name": "Identifier",
                                        "src": "13682:1:55"
                                      }
                                    ],
                                    "id": 15927,
                                    "name": "MemberAccess",
                                    "src": "13682:5:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 15928,
                                    "name": "Literal",
                                    "src": "13688:1:55"
                                  }
                                ],
                                "id": 15929,
                                "name": "FunctionCall",
                                "src": "13682:8:55"
                              }
                            ],
                            "id": 15930,
                            "name": "Assignment",
                            "src": "13678:12:55"
                          }
                        ],
                        "id": 15931,
                        "name": "ExpressionStatement",
                        "src": "13678:12:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15915,
                                      "type": "bytes32",
                                      "value": "_current"
                                    },
                                    "id": 15932,
                                    "name": "Identifier",
                                    "src": "13706:8:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "bytes32"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15316,
                                          "type": "mapping(bytes32 => bytes32)",
                                          "value": "previousBlock"
                                        },
                                        "id": 15933,
                                        "name": "Identifier",
                                        "src": "13717:13:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15915,
                                          "type": "bytes32",
                                          "value": "_current"
                                        },
                                        "id": 15934,
                                        "name": "Identifier",
                                        "src": "13731:8:55"
                                      }
                                    ],
                                    "id": 15935,
                                    "name": "IndexAccess",
                                    "src": "13717:23:55"
                                  }
                                ],
                                "id": 15936,
                                "name": "Assignment",
                                "src": "13706:34:55"
                              }
                            ],
                            "id": 15937,
                            "name": "ExpressionStatement",
                            "src": "13706:34:55"
                          }
                        ],
                        "id": 15938,
                        "name": "Block",
                        "src": "13692:59:55"
                      }
                    ],
                    "id": 15939,
                    "name": "ForStatement",
                    "src": "13645:106:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_c461b76bf1480a8b20105a19184a1758b87ce3c97e130df422cacaf91904c3a2",
                                  "typeString": "literal_string \"Unknown ancestor\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 15940,
                            "name": "Identifier",
                            "src": "13760:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15915,
                                  "type": "bytes32",
                                  "value": "_current"
                                },
                                "id": 15941,
                                "name": "Identifier",
                                "src": "13768:8:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes32",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(bytes32)",
                                      "value": "bytes32"
                                    },
                                    "id": 15942,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "13780:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 15943,
                                    "name": "Literal",
                                    "src": "13788:1:55"
                                  }
                                ],
                                "id": 15944,
                                "name": "FunctionCall",
                                "src": "13780:10:55"
                              }
                            ],
                            "id": 15945,
                            "name": "BinaryOperation",
                            "src": "13768:22:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "556e6b6e6f776e20616e636573746f72",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Unknown ancestor\"",
                              "value": "Unknown ancestor"
                            },
                            "id": 15946,
                            "name": "Literal",
                            "src": "13792:18:55"
                          }
                        ],
                        "id": 15947,
                        "name": "FunctionCall",
                        "src": "13760:51:55"
                      }
                    ],
                    "id": 15948,
                    "name": "ExpressionStatement",
                    "src": "13760:51:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 15913
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15915,
                          "type": "bytes32",
                          "value": "_current"
                        },
                        "id": 15949,
                        "name": "Identifier",
                        "src": "13828:8:55"
                      }
                    ],
                    "id": 15950,
                    "name": "Return",
                    "src": "13821:15:55"
                  }
                ],
                "id": 15951,
                "name": "Block",
                "src": "13599:244:55"
              }
            ],
            "id": 15952,
            "name": "FunctionDefinition",
            "src": "13510:333:55"
          },
          {
            "attributes": {
              "documentation": "@notice             Checks if a digest is an ancestor of the current one\n @dev                Limit the amount of lookups (and thus gas usage) with _limit\n @param _ancestor    The prospective ancestor\n @param _descendant  The descendant to check\n @param _limit       The maximum number of blocks to check\n @return             true if ancestor is at most limit blocks lower than descendant, otherwise false",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_isAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 15999,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15953,
                        "name": "ElementaryTypeName",
                        "src": "14319:7:55"
                      }
                    ],
                    "id": 15954,
                    "name": "VariableDeclaration",
                    "src": "14319:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_descendant",
                      "scope": 15999,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 15955,
                        "name": "ElementaryTypeName",
                        "src": "14338:7:55"
                      }
                    ],
                    "id": 15956,
                    "name": "VariableDeclaration",
                    "src": "14338:19:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 15999,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 15957,
                        "name": "ElementaryTypeName",
                        "src": "14359:7:55"
                      }
                    ],
                    "id": 15958,
                    "name": "VariableDeclaration",
                    "src": "14359:14:55"
                  }
                ],
                "id": 15959,
                "name": "ParameterList",
                "src": "14318:56:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 15999,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 15960,
                        "name": "ElementaryTypeName",
                        "src": "14398:4:55"
                      }
                    ],
                    "id": 15961,
                    "name": "VariableDeclaration",
                    "src": "14398:4:55"
                  }
                ],
                "id": 15962,
                "name": "ParameterList",
                "src": "14397:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        15964
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_current",
                          "scope": 15998,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 15963,
                            "name": "ElementaryTypeName",
                            "src": "14414:7:55"
                          }
                        ],
                        "id": 15964,
                        "name": "VariableDeclaration",
                        "src": "14414:16:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 15956,
                          "type": "bytes32",
                          "value": "_descendant"
                        },
                        "id": 15965,
                        "name": "Identifier",
                        "src": "14433:11:55"
                      }
                    ],
                    "id": 15966,
                    "name": "VariableDeclarationStatement",
                    "src": "14414:30:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "assignments": [
                            15968
                          ]
                        },
                        "children": [
                          {
                            "attributes": {
                              "constant": false,
                              "name": "i",
                              "scope": 15995,
                              "stateVariable": false,
                              "storageLocation": "default",
                              "type": "uint256",
                              "value": null,
                              "visibility": "internal"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint256",
                                  "type": "uint256"
                                },
                                "id": 15967,
                                "name": "ElementaryTypeName",
                                "src": "14524:7:55"
                              }
                            ],
                            "id": 15968,
                            "name": "VariableDeclaration",
                            "src": "14524:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 15969,
                            "name": "Literal",
                            "src": "14536:1:55"
                          }
                        ],
                        "id": 15970,
                        "name": "VariableDeclarationStatement",
                        "src": "14524:13:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15968,
                              "type": "uint256",
                              "value": "i"
                            },
                            "id": 15971,
                            "name": "Identifier",
                            "src": "14539:1:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15958,
                              "type": "uint256",
                              "value": "_limit"
                            },
                            "id": 15972,
                            "name": "Identifier",
                            "src": "14543:6:55"
                          }
                        ],
                        "id": 15973,
                        "name": "BinaryOperation",
                        "src": "14539:10:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15968,
                                  "type": "uint256",
                                  "value": "i"
                                },
                                "id": 15974,
                                "name": "Identifier",
                                "src": "14551:1:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15968,
                                          "type": "uint256",
                                          "value": "i"
                                        },
                                        "id": 15975,
                                        "name": "Identifier",
                                        "src": "14555:1:55"
                                      }
                                    ],
                                    "id": 15976,
                                    "name": "MemberAccess",
                                    "src": "14555:5:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 15977,
                                    "name": "Literal",
                                    "src": "14561:1:55"
                                  }
                                ],
                                "id": 15978,
                                "name": "FunctionCall",
                                "src": "14555:8:55"
                              }
                            ],
                            "id": 15979,
                            "name": "Assignment",
                            "src": "14551:12:55"
                          }
                        ],
                        "id": 15980,
                        "name": "ExpressionStatement",
                        "src": "14551:12:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15964,
                                      "type": "bytes32",
                                      "value": "_current"
                                    },
                                    "id": 15981,
                                    "name": "Identifier",
                                    "src": "14583:8:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15954,
                                      "type": "bytes32",
                                      "value": "_ancestor"
                                    },
                                    "id": 15982,
                                    "name": "Identifier",
                                    "src": "14595:9:55"
                                  }
                                ],
                                "id": 15983,
                                "name": "BinaryOperation",
                                "src": "14583:21:55"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "functionReturnParameters": 15962
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "74727565",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "bool",
                                          "type": "bool",
                                          "value": "true"
                                        },
                                        "id": 15984,
                                        "name": "Literal",
                                        "src": "14631:4:55"
                                      }
                                    ],
                                    "id": 15985,
                                    "name": "Return",
                                    "src": "14624:11:55"
                                  }
                                ],
                                "id": 15986,
                                "name": "Block",
                                "src": "14606:44:55"
                              }
                            ],
                            "id": 15987,
                            "name": "IfStatement",
                            "src": "14579:71:55"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15964,
                                      "type": "bytes32",
                                      "value": "_current"
                                    },
                                    "id": 15988,
                                    "name": "Identifier",
                                    "src": "14663:8:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "bytes32"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15316,
                                          "type": "mapping(bytes32 => bytes32)",
                                          "value": "previousBlock"
                                        },
                                        "id": 15989,
                                        "name": "Identifier",
                                        "src": "14674:13:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 15964,
                                          "type": "bytes32",
                                          "value": "_current"
                                        },
                                        "id": 15990,
                                        "name": "Identifier",
                                        "src": "14688:8:55"
                                      }
                                    ],
                                    "id": 15991,
                                    "name": "IndexAccess",
                                    "src": "14674:23:55"
                                  }
                                ],
                                "id": 15992,
                                "name": "Assignment",
                                "src": "14663:34:55"
                              }
                            ],
                            "id": 15993,
                            "name": "ExpressionStatement",
                            "src": "14663:34:55"
                          }
                        ],
                        "id": 15994,
                        "name": "Block",
                        "src": "14565:143:55"
                      }
                    ],
                    "id": 15995,
                    "name": "ForStatement",
                    "src": "14519:189:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 15962
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "66616c7365",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "false"
                        },
                        "id": 15996,
                        "name": "Literal",
                        "src": "14724:5:55"
                      }
                    ],
                    "id": 15997,
                    "name": "Return",
                    "src": "14717:12:55"
                  }
                ],
                "id": 15998,
                "name": "Block",
                "src": "14404:332:55"
              }
            ],
            "id": 15999,
            "name": "FunctionDefinition",
            "src": "14298:438:55"
          },
          {
            "attributes": {
              "documentation": "@notice                   Marks the new best-known chain tip\n @param  _ancestor         The digest of the most recent common ancestor\n @param  _currentBest      The 80-byte header referenced by bestKnownDigest\n @param  _newBest          The 80-byte header to mark as the new best\n @param  _limit            Limit the amount of traversal of the chain\n @return                   True if successfully updates bestKnownDigest, error otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_markNewHeaviest",
              "scope": 16343,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 16102,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16000,
                        "name": "ElementaryTypeName",
                        "src": "15259:7:55"
                      }
                    ],
                    "id": 16001,
                    "name": "VariableDeclaration",
                    "src": "15259:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_currentBest",
                      "scope": 16102,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16002,
                        "name": "ElementaryTypeName",
                        "src": "15286:5:55"
                      }
                    ],
                    "id": 16003,
                    "name": "VariableDeclaration",
                    "src": "15286:25:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_newBest",
                      "scope": 16102,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16004,
                        "name": "ElementaryTypeName",
                        "src": "15321:5:55"
                      }
                    ],
                    "id": 16005,
                    "name": "VariableDeclaration",
                    "src": "15321:21:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 16102,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 16006,
                        "name": "ElementaryTypeName",
                        "src": "15352:7:55"
                      }
                    ],
                    "id": 16007,
                    "name": "VariableDeclaration",
                    "src": "15352:14:55"
                  }
                ],
                "id": 16008,
                "name": "ParameterList",
                "src": "15249:123:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 16102,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 16009,
                        "name": "ElementaryTypeName",
                        "src": "15391:4:55"
                      }
                    ],
                    "id": 16010,
                    "name": "VariableDeclaration",
                    "src": "15391:4:55"
                  }
                ],
                "id": 16011,
                "name": "ParameterList",
                "src": "15390:6:55"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_34b0e8aa7e872c1823abee92749e80e1aaaa8c704daa024b6296520f08dccd95",
                                  "typeString": "literal_string \"Requested limit is greater than 1 difficulty period\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 16012,
                            "name": "Identifier",
                            "src": "15407:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16007,
                                  "type": "uint256",
                                  "value": "_limit"
                                },
                                "id": 16013,
                                "name": "Identifier",
                                "src": "15415:6:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "32303136",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 2016",
                                  "value": "2016"
                                },
                                "id": 16014,
                                "name": "Literal",
                                "src": "15425:4:55"
                              }
                            ],
                            "id": 16015,
                            "name": "BinaryOperation",
                            "src": "15415:14:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "526571756573746564206c696d69742069732067726561746572207468616e203120646966666963756c747920706572696f64",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Requested limit is greater than 1 difficulty period\"",
                              "value": "Requested limit is greater than 1 difficulty period"
                            },
                            "id": 16016,
                            "name": "Literal",
                            "src": "15431:53:55"
                          }
                        ],
                        "id": 16017,
                        "name": "FunctionCall",
                        "src": "15407:78:55"
                      }
                    ],
                    "id": 16018,
                    "name": "ExpressionStatement",
                    "src": "15407:78:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16020
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_newBestDigest",
                          "scope": 16101,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 16019,
                            "name": "ElementaryTypeName",
                            "src": "15495:7:55"
                          }
                        ],
                        "id": 16020,
                        "name": "VariableDeclaration",
                        "src": "15495:22:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "hash256",
                              "referencedDeclaration": 11851,
                              "type": "function (bytes memory) pure returns (bytes32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16005,
                                  "type": "bytes memory",
                                  "value": "_newBest"
                                },
                                "id": 16021,
                                "name": "Identifier",
                                "src": "15520:8:55"
                              }
                            ],
                            "id": 16022,
                            "name": "MemberAccess",
                            "src": "15520:16:55"
                          }
                        ],
                        "id": 16023,
                        "name": "FunctionCall",
                        "src": "15520:18:55"
                      }
                    ],
                    "id": 16024,
                    "name": "VariableDeclarationStatement",
                    "src": "15495:43:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16026
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_currentBestDigest",
                          "scope": 16101,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 16025,
                            "name": "ElementaryTypeName",
                            "src": "15548:7:55"
                          }
                        ],
                        "id": 16026,
                        "name": "VariableDeclaration",
                        "src": "15548:26:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "hash256",
                              "referencedDeclaration": 11851,
                              "type": "function (bytes memory) pure returns (bytes32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16003,
                                  "type": "bytes memory",
                                  "value": "_currentBest"
                                },
                                "id": 16027,
                                "name": "Identifier",
                                "src": "15577:12:55"
                              }
                            ],
                            "id": 16028,
                            "name": "MemberAccess",
                            "src": "15577:20:55"
                          }
                        ],
                        "id": 16029,
                        "name": "FunctionCall",
                        "src": "15577:22:55"
                      }
                    ],
                    "id": 16030,
                    "name": "VariableDeclarationStatement",
                    "src": "15548:51:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_08d40782ec860529d1a49d4deccf329d686c48a4affb967e8f3fe896477d9012",
                                  "typeString": "literal_string \"Passed in best is not best known\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 16031,
                            "name": "Identifier",
                            "src": "15609:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16026,
                                  "type": "bytes32",
                                  "value": "_currentBestDigest"
                                },
                                "id": 16032,
                                "name": "Identifier",
                                "src": "15617:18:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15310,
                                  "type": "bytes32",
                                  "value": "bestKnownDigest"
                                },
                                "id": 16033,
                                "name": "Identifier",
                                "src": "15639:15:55"
                              }
                            ],
                            "id": 16034,
                            "name": "BinaryOperation",
                            "src": "15617:37:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "50617373656420696e2062657374206973206e6f742062657374206b6e6f776e",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Passed in best is not best known\"",
                              "value": "Passed in best is not best known"
                            },
                            "id": 16035,
                            "name": "Literal",
                            "src": "15656:34:55"
                          }
                        ],
                        "id": 16036,
                        "name": "FunctionCall",
                        "src": "15609:82:55"
                      }
                    ],
                    "id": 16037,
                    "name": "ExpressionStatement",
                    "src": "15609:82:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_21175d40c2ebef79a732817277d464b099ad41722534bb4c1a81ec30c878b42d",
                                  "typeString": "literal_string \"New best is unknown\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 16038,
                            "name": "Identifier",
                            "src": "15701:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15316,
                                      "type": "mapping(bytes32 => bytes32)",
                                      "value": "previousBlock"
                                    },
                                    "id": 16039,
                                    "name": "Identifier",
                                    "src": "15722:13:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16020,
                                      "type": "bytes32",
                                      "value": "_newBestDigest"
                                    },
                                    "id": 16040,
                                    "name": "Identifier",
                                    "src": "15736:14:55"
                                  }
                                ],
                                "id": 16041,
                                "name": "IndexAccess",
                                "src": "15722:29:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes32",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(bytes32)",
                                      "value": "bytes32"
                                    },
                                    "id": 16042,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "15755:7:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 16043,
                                    "name": "Literal",
                                    "src": "15763:1:55"
                                  }
                                ],
                                "id": 16044,
                                "name": "FunctionCall",
                                "src": "15755:10:55"
                              }
                            ],
                            "id": 16045,
                            "name": "BinaryOperation",
                            "src": "15722:43:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "4e6577206265737420697320756e6b6e6f776e",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"New best is unknown\"",
                              "value": "New best is unknown"
                            },
                            "id": 16046,
                            "name": "Literal",
                            "src": "15779:21:55"
                          }
                        ],
                        "id": 16047,
                        "name": "FunctionCall",
                        "src": "15701:100:55"
                      }
                    ],
                    "id": 16048,
                    "name": "ExpressionStatement",
                    "src": "15701:100:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_fcaf5361cb1b11aa6567d172fd21d0d1e008d17e89623abf194305ef538c3052",
                                  "typeString": "literal_string \"Ancestor must be heaviest common ancestor\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 16049,
                            "name": "Identifier",
                            "src": "15811:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bool",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16205,
                                  "type": "function (bytes32,bytes32,bytes32,uint256) view returns (bool)",
                                  "value": "_isMostRecentAncestor"
                                },
                                "id": 16050,
                                "name": "Identifier",
                                "src": "15832:21:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16001,
                                  "type": "bytes32",
                                  "value": "_ancestor"
                                },
                                "id": 16051,
                                "name": "Identifier",
                                "src": "15854:9:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 15310,
                                  "type": "bytes32",
                                  "value": "bestKnownDigest"
                                },
                                "id": 16052,
                                "name": "Identifier",
                                "src": "15865:15:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16020,
                                  "type": "bytes32",
                                  "value": "_newBestDigest"
                                },
                                "id": 16053,
                                "name": "Identifier",
                                "src": "15882:14:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16007,
                                  "type": "uint256",
                                  "value": "_limit"
                                },
                                "id": 16054,
                                "name": "Identifier",
                                "src": "15898:6:55"
                              }
                            ],
                            "id": 16055,
                            "name": "FunctionCall",
                            "src": "15832:73:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "416e636573746f72206d75737420626520686561766965737420636f6d6d6f6e20616e636573746f72",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Ancestor must be heaviest common ancestor\"",
                              "value": "Ancestor must be heaviest common ancestor"
                            },
                            "id": 16056,
                            "name": "Literal",
                            "src": "15919:43:55"
                          }
                        ],
                        "id": 16057,
                        "name": "FunctionCall",
                        "src": "15811:152:55"
                      }
                    ],
                    "id": 16058,
                    "name": "ExpressionStatement",
                    "src": "15811:152:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_9fd7a9403f83332e39cd942cb934228aad1aa94f9f120f93fcbad363acc5034e",
                                  "typeString": "literal_string \"New best hash does not have more work than previous\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 16059,
                            "name": "Identifier",
                            "src": "15973:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes32",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        },
                                        {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        },
                                        {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16342,
                                      "type": "function (bytes32,bytes memory,bytes memory) view returns (bytes32)",
                                      "value": "_heaviestFromAncestor"
                                    },
                                    "id": 16060,
                                    "name": "Identifier",
                                    "src": "15994:21:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16001,
                                      "type": "bytes32",
                                      "value": "_ancestor"
                                    },
                                    "id": 16061,
                                    "name": "Identifier",
                                    "src": "16016:9:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16003,
                                      "type": "bytes memory",
                                      "value": "_currentBest"
                                    },
                                    "id": 16062,
                                    "name": "Identifier",
                                    "src": "16027:12:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16005,
                                      "type": "bytes memory",
                                      "value": "_newBest"
                                    },
                                    "id": 16063,
                                    "name": "Identifier",
                                    "src": "16041:8:55"
                                  }
                                ],
                                "id": 16064,
                                "name": "FunctionCall",
                                "src": "15994:56:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16020,
                                  "type": "bytes32",
                                  "value": "_newBestDigest"
                                },
                                "id": 16065,
                                "name": "Identifier",
                                "src": "16054:14:55"
                              }
                            ],
                            "id": 16066,
                            "name": "BinaryOperation",
                            "src": "15994:74:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "4e65772062657374206861736820646f6573206e6f742068617665206d6f726520776f726b207468616e2070726576696f7573",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"New best hash does not have more work than previous\"",
                              "value": "New best hash does not have more work than previous"
                            },
                            "id": 16067,
                            "name": "Literal",
                            "src": "16082:53:55"
                          }
                        ],
                        "id": 16068,
                        "name": "FunctionCall",
                        "src": "15973:163:55"
                      }
                    ],
                    "id": 16069,
                    "name": "ExpressionStatement",
                    "src": "15973:163:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15310,
                              "type": "bytes32",
                              "value": "bestKnownDigest"
                            },
                            "id": 16070,
                            "name": "Identifier",
                            "src": "16147:15:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16020,
                              "type": "bytes32",
                              "value": "_newBestDigest"
                            },
                            "id": 16071,
                            "name": "Identifier",
                            "src": "16165:14:55"
                          }
                        ],
                        "id": 16072,
                        "name": "Assignment",
                        "src": "16147:32:55"
                      }
                    ],
                    "id": 16073,
                    "name": "ExpressionStatement",
                    "src": "16147:32:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15312,
                              "type": "bytes32",
                              "value": "lastReorgCommonAncestor"
                            },
                            "id": 16074,
                            "name": "Identifier",
                            "src": "16189:23:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16001,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 16075,
                            "name": "Identifier",
                            "src": "16215:9:55"
                          }
                        ],
                        "id": 16076,
                        "name": "Assignment",
                        "src": "16189:35:55"
                      }
                    ],
                    "id": 16077,
                    "name": "ExpressionStatement",
                    "src": "16189:35:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16079
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_newDiff",
                          "scope": 16101,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 16078,
                            "name": "ElementaryTypeName",
                            "src": "16235:7:55"
                          }
                        ],
                        "id": 16079,
                        "name": "VariableDeclaration",
                        "src": "16235:16:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "arguments": [
                            null
                          ],
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "extractDifficulty",
                              "referencedDeclaration": 12998,
                              "type": "function (bytes memory) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16005,
                                  "type": "bytes memory",
                                  "value": "_newBest"
                                },
                                "id": 16080,
                                "name": "Identifier",
                                "src": "16254:8:55"
                              }
                            ],
                            "id": 16081,
                            "name": "MemberAccess",
                            "src": "16254:26:55"
                          }
                        ],
                        "id": 16082,
                        "name": "FunctionCall",
                        "src": "16254:28:55"
                      }
                    ],
                    "id": 16083,
                    "name": "VariableDeclarationStatement",
                    "src": "16235:47:55"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16079,
                              "type": "uint256",
                              "value": "_newDiff"
                            },
                            "id": 16084,
                            "name": "Identifier",
                            "src": "16296:8:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15322,
                              "type": "uint256",
                              "value": "currentEpochDiff"
                            },
                            "id": 16085,
                            "name": "Identifier",
                            "src": "16308:16:55"
                          }
                        ],
                        "id": 16086,
                        "name": "BinaryOperation",
                        "src": "16296:28:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 15322,
                                      "type": "uint256",
                                      "value": "currentEpochDiff"
                                    },
                                    "id": 16087,
                                    "name": "Identifier",
                                    "src": "16340:16:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16079,
                                      "type": "uint256",
                                      "value": "_newDiff"
                                    },
                                    "id": 16088,
                                    "name": "Identifier",
                                    "src": "16359:8:55"
                                  }
                                ],
                                "id": 16089,
                                "name": "Assignment",
                                "src": "16340:27:55"
                              }
                            ],
                            "id": 16090,
                            "name": "ExpressionStatement",
                            "src": "16340:27:55"
                          }
                        ],
                        "id": 16091,
                        "name": "Block",
                        "src": "16326:52:55"
                      }
                    ],
                    "id": 16092,
                    "name": "IfStatement",
                    "src": "16292:86:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 14307,
                              "type": "function (bytes32,bytes32,bytes32)",
                              "value": "NewTip"
                            },
                            "id": 16093,
                            "name": "Identifier",
                            "src": "16393:6:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16026,
                              "type": "bytes32",
                              "value": "_currentBestDigest"
                            },
                            "id": 16094,
                            "name": "Identifier",
                            "src": "16413:18:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16020,
                              "type": "bytes32",
                              "value": "_newBestDigest"
                            },
                            "id": 16095,
                            "name": "Identifier",
                            "src": "16445:14:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16001,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 16096,
                            "name": "Identifier",
                            "src": "16473:9:55"
                          }
                        ],
                        "id": 16097,
                        "name": "FunctionCall",
                        "src": "16393:90:55"
                      }
                    ],
                    "id": 16098,
                    "name": "EmitStatement",
                    "src": "16388:95:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 16011
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 16099,
                        "name": "Literal",
                        "src": "16500:4:55"
                      }
                    ],
                    "id": 16100,
                    "name": "Return",
                    "src": "16493:11:55"
                  }
                ],
                "id": 16101,
                "name": "Block",
                "src": "15397:1114:55"
              }
            ],
            "id": 16102,
            "name": "FunctionDefinition",
            "src": "15224:1287:55"
          },
          {
            "attributes": {
              "documentation": "@notice             Checks if a digest is an ancestor of the current one\n @dev                Limit the amount of lookups (and thus gas usage) with _limit\n @param _ancestor    The prospective shared ancestor\n @param _left        A chain tip\n @param _right       A chain tip\n @param _limit       The maximum number of blocks to check\n @return             true if it is the most recent common ancestor within _limit, false otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_isMostRecentAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 16205,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16103,
                        "name": "ElementaryTypeName",
                        "src": "17038:7:55"
                      }
                    ],
                    "id": 16104,
                    "name": "VariableDeclaration",
                    "src": "17038:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_left",
                      "scope": 16205,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16105,
                        "name": "ElementaryTypeName",
                        "src": "17065:7:55"
                      }
                    ],
                    "id": 16106,
                    "name": "VariableDeclaration",
                    "src": "17065:13:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_right",
                      "scope": 16205,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16107,
                        "name": "ElementaryTypeName",
                        "src": "17088:7:55"
                      }
                    ],
                    "id": 16108,
                    "name": "VariableDeclaration",
                    "src": "17088:14:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 16205,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 16109,
                        "name": "ElementaryTypeName",
                        "src": "17112:7:55"
                      }
                    ],
                    "id": 16110,
                    "name": "VariableDeclaration",
                    "src": "17112:14:55"
                  }
                ],
                "id": 16111,
                "name": "ParameterList",
                "src": "17028:104:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 16205,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 16112,
                        "name": "ElementaryTypeName",
                        "src": "17156:4:55"
                      }
                    ],
                    "id": 16113,
                    "name": "VariableDeclaration",
                    "src": "17156:4:55"
                  }
                ],
                "id": 16114,
                "name": "ParameterList",
                "src": "17155:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16104,
                                  "type": "bytes32",
                                  "value": "_ancestor"
                                },
                                "id": 16115,
                                "name": "Identifier",
                                "src": "17207:9:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16106,
                                  "type": "bytes32",
                                  "value": "_left"
                                },
                                "id": 16116,
                                "name": "Identifier",
                                "src": "17220:5:55"
                              }
                            ],
                            "id": 16117,
                            "name": "BinaryOperation",
                            "src": "17207:18:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16104,
                                  "type": "bytes32",
                                  "value": "_ancestor"
                                },
                                "id": 16118,
                                "name": "Identifier",
                                "src": "17229:9:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16108,
                                  "type": "bytes32",
                                  "value": "_right"
                                },
                                "id": 16119,
                                "name": "Identifier",
                                "src": "17242:6:55"
                              }
                            ],
                            "id": 16120,
                            "name": "BinaryOperation",
                            "src": "17229:19:55"
                          }
                        ],
                        "id": 16121,
                        "name": "BinaryOperation",
                        "src": "17207:41:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 16114
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "74727565",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "true"
                                },
                                "id": 16122,
                                "name": "Literal",
                                "src": "17271:4:55"
                              }
                            ],
                            "id": 16123,
                            "name": "Return",
                            "src": "17264:11:55"
                          }
                        ],
                        "id": 16124,
                        "name": "Block",
                        "src": "17250:36:55"
                      }
                    ],
                    "id": 16125,
                    "name": "IfStatement",
                    "src": "17203:83:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16127
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_leftCurrent",
                          "scope": 16204,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 16126,
                            "name": "ElementaryTypeName",
                            "src": "17296:7:55"
                          }
                        ],
                        "id": 16127,
                        "name": "VariableDeclaration",
                        "src": "17296:20:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 16106,
                          "type": "bytes32",
                          "value": "_left"
                        },
                        "id": 16128,
                        "name": "Identifier",
                        "src": "17319:5:55"
                      }
                    ],
                    "id": 16129,
                    "name": "VariableDeclarationStatement",
                    "src": "17296:28:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16131
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_rightCurrent",
                          "scope": 16204,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 16130,
                            "name": "ElementaryTypeName",
                            "src": "17334:7:55"
                          }
                        ],
                        "id": 16131,
                        "name": "VariableDeclaration",
                        "src": "17334:21:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 16108,
                          "type": "bytes32",
                          "value": "_right"
                        },
                        "id": 16132,
                        "name": "Identifier",
                        "src": "17358:6:55"
                      }
                    ],
                    "id": 16133,
                    "name": "VariableDeclarationStatement",
                    "src": "17334:30:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16135
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_leftPrev",
                          "scope": 16204,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 16134,
                            "name": "ElementaryTypeName",
                            "src": "17374:7:55"
                          }
                        ],
                        "id": 16135,
                        "name": "VariableDeclaration",
                        "src": "17374:17:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 16106,
                          "type": "bytes32",
                          "value": "_left"
                        },
                        "id": 16136,
                        "name": "Identifier",
                        "src": "17394:5:55"
                      }
                    ],
                    "id": 16137,
                    "name": "VariableDeclarationStatement",
                    "src": "17374:25:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16139
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_rightPrev",
                          "scope": 16204,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bytes32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes32",
                              "type": "bytes32"
                            },
                            "id": 16138,
                            "name": "ElementaryTypeName",
                            "src": "17409:7:55"
                          }
                        ],
                        "id": 16139,
                        "name": "VariableDeclaration",
                        "src": "17409:18:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 16108,
                          "type": "bytes32",
                          "value": "_right"
                        },
                        "id": 16140,
                        "name": "Identifier",
                        "src": "17430:6:55"
                      }
                    ],
                    "id": 16141,
                    "name": "VariableDeclarationStatement",
                    "src": "17409:27:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "assignments": [
                            16143
                          ]
                        },
                        "children": [
                          {
                            "attributes": {
                              "constant": false,
                              "name": "i",
                              "scope": 16187,
                              "stateVariable": false,
                              "storageLocation": "default",
                              "type": "uint256",
                              "value": null,
                              "visibility": "internal"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint256",
                                  "type": "uint256"
                                },
                                "id": 16142,
                                "name": "ElementaryTypeName",
                                "src": "17451:7:55"
                              }
                            ],
                            "id": 16143,
                            "name": "VariableDeclaration",
                            "src": "17451:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 16144,
                            "name": "Literal",
                            "src": "17463:1:55"
                          }
                        ],
                        "id": 16145,
                        "name": "VariableDeclarationStatement",
                        "src": "17451:13:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16143,
                              "type": "uint256",
                              "value": "i"
                            },
                            "id": 16146,
                            "name": "Identifier",
                            "src": "17466:1:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16110,
                              "type": "uint256",
                              "value": "_limit"
                            },
                            "id": 16147,
                            "name": "Identifier",
                            "src": "17470:6:55"
                          }
                        ],
                        "id": 16148,
                        "name": "BinaryOperation",
                        "src": "17466:10:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16143,
                                  "type": "uint256",
                                  "value": "i"
                                },
                                "id": 16149,
                                "name": "Identifier",
                                "src": "17478:1:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 16143,
                                          "type": "uint256",
                                          "value": "i"
                                        },
                                        "id": 16150,
                                        "name": "Identifier",
                                        "src": "17482:1:55"
                                      }
                                    ],
                                    "id": 16151,
                                    "name": "MemberAccess",
                                    "src": "17482:5:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 16152,
                                    "name": "Literal",
                                    "src": "17488:1:55"
                                  }
                                ],
                                "id": 16153,
                                "name": "FunctionCall",
                                "src": "17482:8:55"
                              }
                            ],
                            "id": 16154,
                            "name": "Assignment",
                            "src": "17478:12:55"
                          }
                        ],
                        "id": 16155,
                        "name": "ExpressionStatement",
                        "src": "17478:12:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "!=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16135,
                                      "type": "bytes32",
                                      "value": "_leftPrev"
                                    },
                                    "id": 16156,
                                    "name": "Identifier",
                                    "src": "17510:9:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16104,
                                      "type": "bytes32",
                                      "value": "_ancestor"
                                    },
                                    "id": 16157,
                                    "name": "Identifier",
                                    "src": "17523:9:55"
                                  }
                                ],
                                "id": 16158,
                                "name": "BinaryOperation",
                                "src": "17510:22:55"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "bytes32"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16127,
                                              "type": "bytes32",
                                              "value": "_leftCurrent"
                                            },
                                            "id": 16159,
                                            "name": "Identifier",
                                            "src": "17552:12:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16135,
                                              "type": "bytes32",
                                              "value": "_leftPrev"
                                            },
                                            "id": 16160,
                                            "name": "Identifier",
                                            "src": "17567:9:55"
                                          }
                                        ],
                                        "id": 16161,
                                        "name": "Assignment",
                                        "src": "17552:24:55"
                                      }
                                    ],
                                    "id": 16162,
                                    "name": "ExpressionStatement",
                                    "src": "17552:24:55"
                                  },
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "bytes32"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16135,
                                              "type": "bytes32",
                                              "value": "_leftPrev"
                                            },
                                            "id": 16163,
                                            "name": "Identifier",
                                            "src": "17604:9:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "type": "bytes32"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15316,
                                                  "type": "mapping(bytes32 => bytes32)",
                                                  "value": "previousBlock"
                                                },
                                                "id": 16164,
                                                "name": "Identifier",
                                                "src": "17616:13:55"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 16135,
                                                  "type": "bytes32",
                                                  "value": "_leftPrev"
                                                },
                                                "id": 16165,
                                                "name": "Identifier",
                                                "src": "17630:9:55"
                                              }
                                            ],
                                            "id": 16166,
                                            "name": "IndexAccess",
                                            "src": "17616:24:55"
                                          }
                                        ],
                                        "id": 16167,
                                        "name": "Assignment",
                                        "src": "17604:36:55"
                                      }
                                    ],
                                    "id": 16168,
                                    "name": "ExpressionStatement",
                                    "src": "17604:36:55"
                                  }
                                ],
                                "id": 16169,
                                "name": "Block",
                                "src": "17534:135:55"
                              }
                            ],
                            "id": 16170,
                            "name": "IfStatement",
                            "src": "17506:163:55"
                          },
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "!=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16139,
                                      "type": "bytes32",
                                      "value": "_rightPrev"
                                    },
                                    "id": 16171,
                                    "name": "Identifier",
                                    "src": "17686:10:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16104,
                                      "type": "bytes32",
                                      "value": "_ancestor"
                                    },
                                    "id": 16172,
                                    "name": "Identifier",
                                    "src": "17700:9:55"
                                  }
                                ],
                                "id": 16173,
                                "name": "BinaryOperation",
                                "src": "17686:23:55"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "bytes32"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16131,
                                              "type": "bytes32",
                                              "value": "_rightCurrent"
                                            },
                                            "id": 16174,
                                            "name": "Identifier",
                                            "src": "17729:13:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16139,
                                              "type": "bytes32",
                                              "value": "_rightPrev"
                                            },
                                            "id": 16175,
                                            "name": "Identifier",
                                            "src": "17745:10:55"
                                          }
                                        ],
                                        "id": 16176,
                                        "name": "Assignment",
                                        "src": "17729:26:55"
                                      }
                                    ],
                                    "id": 16177,
                                    "name": "ExpressionStatement",
                                    "src": "17729:26:55"
                                  },
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "bytes32"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16139,
                                              "type": "bytes32",
                                              "value": "_rightPrev"
                                            },
                                            "id": 16178,
                                            "name": "Identifier",
                                            "src": "17783:10:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "type": "bytes32"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 15316,
                                                  "type": "mapping(bytes32 => bytes32)",
                                                  "value": "previousBlock"
                                                },
                                                "id": 16179,
                                                "name": "Identifier",
                                                "src": "17796:13:55"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 16139,
                                                  "type": "bytes32",
                                                  "value": "_rightPrev"
                                                },
                                                "id": 16180,
                                                "name": "Identifier",
                                                "src": "17810:10:55"
                                              }
                                            ],
                                            "id": 16181,
                                            "name": "IndexAccess",
                                            "src": "17796:25:55"
                                          }
                                        ],
                                        "id": 16182,
                                        "name": "Assignment",
                                        "src": "17783:38:55"
                                      }
                                    ],
                                    "id": 16183,
                                    "name": "ExpressionStatement",
                                    "src": "17783:38:55"
                                  }
                                ],
                                "id": 16184,
                                "name": "Block",
                                "src": "17711:139:55"
                              }
                            ],
                            "id": 16185,
                            "name": "IfStatement",
                            "src": "17682:168:55"
                          }
                        ],
                        "id": 16186,
                        "name": "Block",
                        "src": "17492:368:55"
                      }
                    ],
                    "id": 16187,
                    "name": "ForStatement",
                    "src": "17447:413:55"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16127,
                              "type": "bytes32",
                              "value": "_leftCurrent"
                            },
                            "id": 16188,
                            "name": "Identifier",
                            "src": "17873:12:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16131,
                              "type": "bytes32",
                              "value": "_rightCurrent"
                            },
                            "id": 16189,
                            "name": "Identifier",
                            "src": "17889:13:55"
                          }
                        ],
                        "id": 16190,
                        "name": "BinaryOperation",
                        "src": "17873:29:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 16114
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "66616c7365",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "false"
                                },
                                "id": 16191,
                                "name": "Literal",
                                "src": "17912:5:55"
                              }
                            ],
                            "id": 16192,
                            "name": "Return",
                            "src": "17905:12:55"
                          }
                        ],
                        "id": 16193,
                        "name": "Block",
                        "src": "17904:15:55"
                      }
                    ],
                    "id": 16194,
                    "name": "IfStatement",
                    "src": "17869:50:55"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16135,
                              "type": "bytes32",
                              "value": "_leftPrev"
                            },
                            "id": 16195,
                            "name": "Identifier",
                            "src": "17981:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16139,
                              "type": "bytes32",
                              "value": "_rightPrev"
                            },
                            "id": 16196,
                            "name": "Identifier",
                            "src": "17994:10:55"
                          }
                        ],
                        "id": 16197,
                        "name": "BinaryOperation",
                        "src": "17981:23:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 16114
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "66616c7365",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "false"
                                },
                                "id": 16198,
                                "name": "Literal",
                                "src": "18014:5:55"
                              }
                            ],
                            "id": 16199,
                            "name": "Return",
                            "src": "18007:12:55"
                          }
                        ],
                        "id": 16200,
                        "name": "Block",
                        "src": "18006:15:55"
                      }
                    ],
                    "id": 16201,
                    "name": "IfStatement",
                    "src": "17977:44:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 16114
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "subdenomination": null,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 16202,
                        "name": "Literal",
                        "src": "18069:4:55"
                      }
                    ],
                    "id": 16203,
                    "name": "Return",
                    "src": "18062:11:55"
                  }
                ],
                "id": 16204,
                "name": "Block",
                "src": "17162:918:55"
              }
            ],
            "id": 16205,
            "name": "FunctionDefinition",
            "src": "16998:1082:55"
          },
          {
            "attributes": {
              "documentation": "@notice             Decides which header is heaviest from the ancestor\n @dev                Does not support reorgs above 2017 blocks (:\n @param _ancestor    The prospective shared ancestor\n @param _left        A chain tip\n @param _right       A chain tip\n @return             true if it is the most recent common ancestor within _limit, false otherwise",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "_heaviestFromAncestor",
              "scope": 16343,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 16342,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16206,
                        "name": "ElementaryTypeName",
                        "src": "18523:7:55"
                      }
                    ],
                    "id": 16207,
                    "name": "VariableDeclaration",
                    "src": "18523:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_left",
                      "scope": 16342,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16208,
                        "name": "ElementaryTypeName",
                        "src": "18550:5:55"
                      }
                    ],
                    "id": 16209,
                    "name": "VariableDeclaration",
                    "src": "18550:18:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_right",
                      "scope": 16342,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16210,
                        "name": "ElementaryTypeName",
                        "src": "18578:5:55"
                      }
                    ],
                    "id": 16211,
                    "name": "VariableDeclaration",
                    "src": "18578:19:55"
                  }
                ],
                "id": 16212,
                "name": "ParameterList",
                "src": "18513:90:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 16342,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16213,
                        "name": "ElementaryTypeName",
                        "src": "18627:7:55"
                      }
                    ],
                    "id": 16214,
                    "name": "VariableDeclaration",
                    "src": "18627:7:55"
                  }
                ],
                "id": 16215,
                "name": "ParameterList",
                "src": "18626:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        16217
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_ancestorHeight",
                          "scope": 16341,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 16216,
                            "name": "ElementaryTypeName",
                            "src": "18646:7:55"
                          }
                        ],
                        "id": 16217,
                        "name": "VariableDeclaration",
                        "src": "18646:23:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 16218,
                            "name": "Identifier",
                            "src": "18672:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16207,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 16219,
                            "name": "Identifier",
                            "src": "18684:9:55"
                          }
                        ],
                        "id": 16220,
                        "name": "FunctionCall",
                        "src": "18672:22:55"
                      }
                    ],
                    "id": 16221,
                    "name": "VariableDeclarationStatement",
                    "src": "18646:48:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16223
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_leftHeight",
                          "scope": 16341,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 16222,
                            "name": "ElementaryTypeName",
                            "src": "18704:7:55"
                          }
                        ],
                        "id": 16223,
                        "name": "VariableDeclaration",
                        "src": "18704:19:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 16224,
                            "name": "Identifier",
                            "src": "18726:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "hash256",
                                  "referencedDeclaration": 11851,
                                  "type": "function (bytes memory) pure returns (bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16209,
                                      "type": "bytes memory",
                                      "value": "_left"
                                    },
                                    "id": 16225,
                                    "name": "Identifier",
                                    "src": "18738:5:55"
                                  }
                                ],
                                "id": 16226,
                                "name": "MemberAccess",
                                "src": "18738:13:55"
                              }
                            ],
                            "id": 16227,
                            "name": "FunctionCall",
                            "src": "18738:15:55"
                          }
                        ],
                        "id": 16228,
                        "name": "FunctionCall",
                        "src": "18726:28:55"
                      }
                    ],
                    "id": 16229,
                    "name": "VariableDeclarationStatement",
                    "src": "18704:50:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16231
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_rightHeight",
                          "scope": 16341,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 16230,
                            "name": "ElementaryTypeName",
                            "src": "18764:7:55"
                          }
                        ],
                        "id": 16231,
                        "name": "VariableDeclaration",
                        "src": "18764:20:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 15905,
                              "type": "function (bytes32) view returns (uint256)",
                              "value": "_findHeight"
                            },
                            "id": 16232,
                            "name": "Identifier",
                            "src": "18787:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "hash256",
                                  "referencedDeclaration": 11851,
                                  "type": "function (bytes memory) pure returns (bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16211,
                                      "type": "bytes memory",
                                      "value": "_right"
                                    },
                                    "id": 16233,
                                    "name": "Identifier",
                                    "src": "18799:6:55"
                                  }
                                ],
                                "id": 16234,
                                "name": "MemberAccess",
                                "src": "18799:14:55"
                              }
                            ],
                            "id": 16235,
                            "name": "FunctionCall",
                            "src": "18799:16:55"
                          }
                        ],
                        "id": 16236,
                        "name": "FunctionCall",
                        "src": "18787:29:55"
                      }
                    ],
                    "id": 16237,
                    "name": "VariableDeclarationStatement",
                    "src": "18764:52:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_b58061f6326ff3d0324de253af04d745211e5ff4898fed03b468cbd3387ef7f2",
                                  "typeString": "literal_string \"A descendant height is below the ancestor height\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 16238,
                            "name": "Identifier",
                            "src": "18827:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "&&",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16223,
                                      "type": "uint256",
                                      "value": "_leftHeight"
                                    },
                                    "id": 16239,
                                    "name": "Identifier",
                                    "src": "18848:11:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16217,
                                      "type": "uint256",
                                      "value": "_ancestorHeight"
                                    },
                                    "id": 16240,
                                    "name": "Identifier",
                                    "src": "18863:15:55"
                                  }
                                ],
                                "id": 16241,
                                "name": "BinaryOperation",
                                "src": "18848:30:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16231,
                                      "type": "uint256",
                                      "value": "_rightHeight"
                                    },
                                    "id": 16242,
                                    "name": "Identifier",
                                    "src": "18882:12:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 16217,
                                      "type": "uint256",
                                      "value": "_ancestorHeight"
                                    },
                                    "id": 16243,
                                    "name": "Identifier",
                                    "src": "18898:15:55"
                                  }
                                ],
                                "id": 16244,
                                "name": "BinaryOperation",
                                "src": "18882:31:55"
                              }
                            ],
                            "id": 16245,
                            "name": "BinaryOperation",
                            "src": "18848:65:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "412064657363656e64616e74206865696768742069732062656c6f772074686520616e636573746f7220686569676874",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"A descendant height is below the ancestor height\"",
                              "value": "A descendant height is below the ancestor height"
                            },
                            "id": 16246,
                            "name": "Literal",
                            "src": "18927:50:55"
                          }
                        ],
                        "id": 16247,
                        "name": "FunctionCall",
                        "src": "18827:151:55"
                      }
                    ],
                    "id": 16248,
                    "name": "ExpressionStatement",
                    "src": "18827:151:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16250
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_nextPeriodStartHeight",
                          "scope": 16341,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 16249,
                            "name": "ElementaryTypeName",
                            "src": "19086:7:55"
                          }
                        ],
                        "id": 16250,
                        "name": "VariableDeclaration",
                        "src": "19086:30:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sub",
                              "referencedDeclaration": 13895,
                              "type": "function (uint256,uint256) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_2016_by_1",
                                          "typeString": "int_const 2016"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "add",
                                      "referencedDeclaration": 13920,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 16217,
                                          "type": "uint256",
                                          "value": "_ancestorHeight"
                                        },
                                        "id": 16251,
                                        "name": "Identifier",
                                        "src": "19119:15:55"
                                      }
                                    ],
                                    "id": 16252,
                                    "name": "MemberAccess",
                                    "src": "19119:19:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32303136",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2016",
                                      "value": "2016"
                                    },
                                    "id": 16253,
                                    "name": "Literal",
                                    "src": "19139:4:55"
                                  }
                                ],
                                "id": 16254,
                                "name": "FunctionCall",
                                "src": "19119:25:55"
                              }
                            ],
                            "id": 16255,
                            "name": "MemberAccess",
                            "src": "19119:29:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "%",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16217,
                                  "type": "uint256",
                                  "value": "_ancestorHeight"
                                },
                                "id": 16256,
                                "name": "Identifier",
                                "src": "19149:15:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "32303136",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 2016",
                                  "value": "2016"
                                },
                                "id": 16257,
                                "name": "Literal",
                                "src": "19167:4:55"
                              }
                            ],
                            "id": 16258,
                            "name": "BinaryOperation",
                            "src": "19149:22:55"
                          }
                        ],
                        "id": 16259,
                        "name": "FunctionCall",
                        "src": "19119:53:55"
                      }
                    ],
                    "id": 16260,
                    "name": "VariableDeclarationStatement",
                    "src": "19086:86:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16262
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_leftInPeriod",
                          "scope": 16341,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bool",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bool",
                              "type": "bool"
                            },
                            "id": 16261,
                            "name": "ElementaryTypeName",
                            "src": "19182:4:55"
                          }
                        ],
                        "id": 16262,
                        "name": "VariableDeclaration",
                        "src": "19182:18:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16223,
                              "type": "uint256",
                              "value": "_leftHeight"
                            },
                            "id": 16263,
                            "name": "Identifier",
                            "src": "19203:11:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16250,
                              "type": "uint256",
                              "value": "_nextPeriodStartHeight"
                            },
                            "id": 16264,
                            "name": "Identifier",
                            "src": "19217:22:55"
                          }
                        ],
                        "id": 16265,
                        "name": "BinaryOperation",
                        "src": "19203:36:55"
                      }
                    ],
                    "id": 16266,
                    "name": "VariableDeclarationStatement",
                    "src": "19182:57:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        16268
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "_rightInPeriod",
                          "scope": 16341,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bool",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bool",
                              "type": "bool"
                            },
                            "id": 16267,
                            "name": "ElementaryTypeName",
                            "src": "19249:4:55"
                          }
                        ],
                        "id": 16268,
                        "name": "VariableDeclaration",
                        "src": "19249:19:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "<",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16231,
                              "type": "uint256",
                              "value": "_rightHeight"
                            },
                            "id": 16269,
                            "name": "Identifier",
                            "src": "19271:12:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16250,
                              "type": "uint256",
                              "value": "_nextPeriodStartHeight"
                            },
                            "id": 16270,
                            "name": "Identifier",
                            "src": "19286:22:55"
                          }
                        ],
                        "id": 16271,
                        "name": "BinaryOperation",
                        "src": "19271:37:55"
                      }
                    ],
                    "id": 16272,
                    "name": "VariableDeclarationStatement",
                    "src": "19249:59:55"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!",
                              "prefix": true,
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16262,
                                  "type": "bool",
                                  "value": "_leftInPeriod"
                                },
                                "id": 16273,
                                "name": "Identifier",
                                "src": "19649:13:55"
                              }
                            ],
                            "id": 16274,
                            "name": "UnaryOperation",
                            "src": "19648:14:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16268,
                              "type": "bool",
                              "value": "_rightInPeriod"
                            },
                            "id": 16275,
                            "name": "Identifier",
                            "src": "19666:14:55"
                          }
                        ],
                        "id": 16276,
                        "name": "BinaryOperation",
                        "src": "19648:32:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 16215
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes32",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "hash256",
                                      "referencedDeclaration": 11851,
                                      "type": "function (bytes memory) pure returns (bytes32)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 16209,
                                          "type": "bytes memory",
                                          "value": "_left"
                                        },
                                        "id": 16277,
                                        "name": "Identifier",
                                        "src": "19690:5:55"
                                      }
                                    ],
                                    "id": 16278,
                                    "name": "MemberAccess",
                                    "src": "19690:13:55"
                                  }
                                ],
                                "id": 16279,
                                "name": "FunctionCall",
                                "src": "19690:15:55"
                              }
                            ],
                            "id": 16280,
                            "name": "Return",
                            "src": "19683:22:55"
                          }
                        ],
                        "id": 16281,
                        "name": "Block",
                        "src": "19682:25:55"
                      }
                    ],
                    "id": 16282,
                    "name": "IfStatement",
                    "src": "19644:63:55"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16262,
                              "type": "bool",
                              "value": "_leftInPeriod"
                            },
                            "id": 16283,
                            "name": "Identifier",
                            "src": "19720:13:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!",
                              "prefix": true,
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 16268,
                                  "type": "bool",
                                  "value": "_rightInPeriod"
                                },
                                "id": 16284,
                                "name": "Identifier",
                                "src": "19738:14:55"
                              }
                            ],
                            "id": 16285,
                            "name": "UnaryOperation",
                            "src": "19737:15:55"
                          }
                        ],
                        "id": 16286,
                        "name": "BinaryOperation",
                        "src": "19720:32:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 16215
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes32",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "hash256",
                                      "referencedDeclaration": 11851,
                                      "type": "function (bytes memory) pure returns (bytes32)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 16211,
                                          "type": "bytes memory",
                                          "value": "_right"
                                        },
                                        "id": 16287,
                                        "name": "Identifier",
                                        "src": "19762:6:55"
                                      }
                                    ],
                                    "id": 16288,
                                    "name": "MemberAccess",
                                    "src": "19762:14:55"
                                  }
                                ],
                                "id": 16289,
                                "name": "FunctionCall",
                                "src": "19762:16:55"
                              }
                            ],
                            "id": 16290,
                            "name": "Return",
                            "src": "19755:23:55"
                          }
                        ],
                        "id": 16291,
                        "name": "Block",
                        "src": "19754:26:55"
                      }
                    ],
                    "id": 16292,
                    "name": "IfStatement",
                    "src": "19716:64:55"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16262,
                              "type": "bool",
                              "value": "_leftInPeriod"
                            },
                            "id": 16293,
                            "name": "Identifier",
                            "src": "19793:13:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16268,
                              "type": "bool",
                              "value": "_rightInPeriod"
                            },
                            "id": 16294,
                            "name": "Identifier",
                            "src": "19810:14:55"
                          }
                        ],
                        "id": 16295,
                        "name": "BinaryOperation",
                        "src": "19793:31:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 16215
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "bytes32"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": ">=",
                                      "type": "bool"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 16223,
                                          "type": "uint256",
                                          "value": "_leftHeight"
                                        },
                                        "id": 16296,
                                        "name": "Identifier",
                                        "src": "19847:11:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 16231,
                                          "type": "uint256",
                                          "value": "_rightHeight"
                                        },
                                        "id": 16297,
                                        "name": "Identifier",
                                        "src": "19862:12:55"
                                      }
                                    ],
                                    "id": 16298,
                                    "name": "BinaryOperation",
                                    "src": "19847:27:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes32",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "hash256",
                                          "referencedDeclaration": 11851,
                                          "type": "function (bytes memory) pure returns (bytes32)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16209,
                                              "type": "bytes memory",
                                              "value": "_left"
                                            },
                                            "id": 16299,
                                            "name": "Identifier",
                                            "src": "19877:5:55"
                                          }
                                        ],
                                        "id": 16300,
                                        "name": "MemberAccess",
                                        "src": "19877:13:55"
                                      }
                                    ],
                                    "id": 16301,
                                    "name": "FunctionCall",
                                    "src": "19877:15:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "bytes32",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "hash256",
                                          "referencedDeclaration": 11851,
                                          "type": "function (bytes memory) pure returns (bytes32)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 16211,
                                              "type": "bytes memory",
                                              "value": "_right"
                                            },
                                            "id": 16302,
                                            "name": "Identifier",
                                            "src": "19895:6:55"
                                          }
                                        ],
                                        "id": 16303,
                                        "name": "MemberAccess",
                                        "src": "19895:14:55"
                                      }
                                    ],
                                    "id": 16304,
                                    "name": "FunctionCall",
                                    "src": "19895:16:55"
                                  }
                                ],
                                "id": 16305,
                                "name": "Conditional",
                                "src": "19847:64:55"
                              }
                            ],
                            "id": 16306,
                            "name": "Return",
                            "src": "19840:71:55"
                          }
                        ],
                        "id": 16307,
                        "name": "Block",
                        "src": "19826:96:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "<",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isInlineArray": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "mul",
                                              "referencedDeclaration": 13860,
                                              "type": "function (uint256,uint256) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isInlineArray": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "type": "uint256"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "commonType": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      },
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "operator": "%",
                                                      "type": "uint256"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 16223,
                                                          "type": "uint256",
                                                          "value": "_leftHeight"
                                                        },
                                                        "id": 16308,
                                                        "name": "Identifier",
                                                        "src": "19993:11:55"
                                                      },
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "hexvalue": "32303136",
                                                          "isConstant": false,
                                                          "isLValue": false,
                                                          "isPure": true,
                                                          "lValueRequested": false,
                                                          "subdenomination": null,
                                                          "token": "number",
                                                          "type": "int_const 2016",
                                                          "value": "2016"
                                                        },
                                                        "id": 16309,
                                                        "name": "Literal",
                                                        "src": "20007:4:55"
                                                      }
                                                    ],
                                                    "id": 16310,
                                                    "name": "BinaryOperation",
                                                    "src": "19993:18:55"
                                                  }
                                                ],
                                                "id": 16311,
                                                "name": "TupleExpression",
                                                "src": "19992:20:55"
                                              }
                                            ],
                                            "id": 16312,
                                            "name": "MemberAccess",
                                            "src": "19992:24:55"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "arguments": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": false,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "type": "uint256",
                                              "type_conversion": false
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    null
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "member_name": "extractDifficulty",
                                                  "referencedDeclaration": 12998,
                                                  "type": "function (bytes memory) pure returns (uint256)"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 16209,
                                                      "type": "bytes memory",
                                                      "value": "_left"
                                                    },
                                                    "id": 16313,
                                                    "name": "Identifier",
                                                    "src": "20017:5:55"
                                                  }
                                                ],
                                                "id": 16314,
                                                "name": "MemberAccess",
                                                "src": "20017:23:55"
                                              }
                                            ],
                                            "id": 16315,
                                            "name": "FunctionCall",
                                            "src": "20017:25:55"
                                          }
                                        ],
                                        "id": 16316,
                                        "name": "FunctionCall",
                                        "src": "19992:51:55"
                                      }
                                    ],
                                    "id": 16317,
                                    "name": "TupleExpression",
                                    "src": "19991:53:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "mul",
                                          "referencedDeclaration": 13860,
                                          "type": "function (uint256,uint256) pure returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isInlineArray": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "commonType": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  },
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "operator": "%",
                                                  "type": "uint256"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 16231,
                                                      "type": "uint256",
                                                      "value": "_rightHeight"
                                                    },
                                                    "id": 16318,
                                                    "name": "Identifier",
                                                    "src": "20064:12:55"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "hexvalue": "32303136",
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": true,
                                                      "lValueRequested": false,
                                                      "subdenomination": null,
                                                      "token": "number",
                                                      "type": "int_const 2016",
                                                      "value": "2016"
                                                    },
                                                    "id": 16319,
                                                    "name": "Literal",
                                                    "src": "20079:4:55"
                                                  }
                                                ],
                                                "id": 16320,
                                                "name": "BinaryOperation",
                                                "src": "20064:19:55"
                                              }
                                            ],
                                            "id": 16321,
                                            "name": "TupleExpression",
                                            "src": "20063:21:55"
                                          }
                                        ],
                                        "id": 16322,
                                        "name": "MemberAccess",
                                        "src": "20063:25:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "arguments": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "extractDifficulty",
                                              "referencedDeclaration": 12998,
                                              "type": "function (bytes memory) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 16211,
                                                  "type": "bytes memory",
                                                  "value": "_right"
                                                },
                                                "id": 16323,
                                                "name": "Identifier",
                                                "src": "20089:6:55"
                                              }
                                            ],
                                            "id": 16324,
                                            "name": "MemberAccess",
                                            "src": "20089:24:55"
                                          }
                                        ],
                                        "id": 16325,
                                        "name": "FunctionCall",
                                        "src": "20089:26:55"
                                      }
                                    ],
                                    "id": 16326,
                                    "name": "FunctionCall",
                                    "src": "20063:53:55"
                                  }
                                ],
                                "id": 16327,
                                "name": "BinaryOperation",
                                "src": "19991:125:55"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "functionReturnParameters": 16215
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "arguments": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "bytes32",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "hash256",
                                              "referencedDeclaration": 11851,
                                              "type": "function (bytes memory) pure returns (bytes32)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 16211,
                                                  "type": "bytes memory",
                                                  "value": "_right"
                                                },
                                                "id": 16328,
                                                "name": "Identifier",
                                                "src": "20143:6:55"
                                              }
                                            ],
                                            "id": 16329,
                                            "name": "MemberAccess",
                                            "src": "20143:14:55"
                                          }
                                        ],
                                        "id": 16330,
                                        "name": "FunctionCall",
                                        "src": "20143:16:55"
                                      }
                                    ],
                                    "id": 16331,
                                    "name": "Return",
                                    "src": "20136:23:55"
                                  }
                                ],
                                "id": 16332,
                                "name": "Block",
                                "src": "20118:56:55"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "functionReturnParameters": 16215
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "arguments": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "type": "bytes32",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                null
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "hash256",
                                              "referencedDeclaration": 11851,
                                              "type": "function (bytes memory) pure returns (bytes32)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 16209,
                                                  "type": "bytes memory",
                                                  "value": "_left"
                                                },
                                                "id": 16333,
                                                "name": "Identifier",
                                                "src": "20205:5:55"
                                              }
                                            ],
                                            "id": 16334,
                                            "name": "MemberAccess",
                                            "src": "20205:13:55"
                                          }
                                        ],
                                        "id": 16335,
                                        "name": "FunctionCall",
                                        "src": "20205:15:55"
                                      }
                                    ],
                                    "id": 16336,
                                    "name": "Return",
                                    "src": "20198:22:55"
                                  }
                                ],
                                "id": 16337,
                                "name": "Block",
                                "src": "20180:55:55"
                              }
                            ],
                            "id": 16338,
                            "name": "IfStatement",
                            "src": "19987:248:55"
                          }
                        ],
                        "id": 16339,
                        "name": "Block",
                        "src": "19928:317:55"
                      }
                    ],
                    "id": 16340,
                    "name": "IfStatement",
                    "src": "19789:456:55"
                  }
                ],
                "id": 16341,
                "name": "Block",
                "src": "18636:1615:55"
              }
            ],
            "id": 16342,
            "name": "FunctionDefinition",
            "src": "18483:1768:55"
          }
        ],
        "id": 16343,
        "name": "ContractDefinition",
        "src": "436:19817:55"
      },
      {
        "attributes": {
          "contractDependencies": [
            14393,
            16343
          ],
          "contractKind": "contract",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            16400,
            16343,
            14393
          ],
          "name": "TestRelay",
          "scope": 16401
        },
        "children": [
          {
            "attributes": {
              "arguments": null
            },
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "Relay",
                  "referencedDeclaration": 16343,
                  "type": "contract Relay"
                },
                "id": 16344,
                "name": "UserDefinedTypeName",
                "src": "20294:5:55"
              }
            ],
            "id": 16345,
            "name": "InheritanceSpecifier",
            "src": "20294:5:55"
          },
          {
            "attributes": {
              "documentation": "@notice                   Gives a starting point for the relay\n @dev                      We don't check this AT ALL really. Don't use relays with bad genesis\n @param  _genesisHeader    The starting header\n @param  _height           The starting height\n @param  _periodStart      The hash of the first header in the genesis epoch",
              "implemented": true,
              "isConstructor": true,
              "kind": "constructor",
              "name": "",
              "scope": 16400,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_genesisHeader",
                      "scope": 16360,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16346,
                        "name": "ElementaryTypeName",
                        "src": "20685:5:55"
                      }
                    ],
                    "id": 16347,
                    "name": "VariableDeclaration",
                    "src": "20685:27:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_height",
                      "scope": 16360,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 16348,
                        "name": "ElementaryTypeName",
                        "src": "20714:7:55"
                      }
                    ],
                    "id": 16349,
                    "name": "VariableDeclaration",
                    "src": "20714:15:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_periodStart",
                      "scope": 16360,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16350,
                        "name": "ElementaryTypeName",
                        "src": "20731:7:55"
                      }
                    ],
                    "id": 16351,
                    "name": "VariableDeclaration",
                    "src": "20731:20:55"
                  }
                ],
                "id": 16352,
                "name": "ParameterList",
                "src": "20684:68:55"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 16358,
                "name": "ParameterList",
                "src": "20817:0:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 16343,
                      "type": "type(contract Relay)",
                      "value": "Relay"
                    },
                    "id": 16353,
                    "name": "Identifier",
                    "src": "20761:5:55"
                  },
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 16347,
                      "type": "bytes memory",
                      "value": "_genesisHeader"
                    },
                    "id": 16354,
                    "name": "Identifier",
                    "src": "20767:14:55"
                  },
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 16349,
                      "type": "uint256",
                      "value": "_height"
                    },
                    "id": 16355,
                    "name": "Identifier",
                    "src": "20783:7:55"
                  },
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 16351,
                      "type": "bytes32",
                      "value": "_periodStart"
                    },
                    "id": 16356,
                    "name": "Identifier",
                    "src": "20792:12:55"
                  }
                ],
                "id": 16357,
                "name": "ModifierInvocation",
                "src": "20761:44:55"
              },
              {
                "attributes": {
                  "statements": [
                    null
                  ]
                },
                "children": [],
                "id": 16359,
                "name": "Block",
                "src": "20817:2:55"
              }
            ],
            "id": 16360,
            "name": "FunctionDefinition",
            "src": "20673:146:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "heaviestFromAncestor",
              "scope": 16400,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 16378,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16361,
                        "name": "ElementaryTypeName",
                        "src": "20864:7:55"
                      }
                    ],
                    "id": 16362,
                    "name": "VariableDeclaration",
                    "src": "20864:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_left",
                      "scope": 16378,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16363,
                        "name": "ElementaryTypeName",
                        "src": "20891:5:55"
                      }
                    ],
                    "id": 16364,
                    "name": "VariableDeclaration",
                    "src": "20891:20:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_right",
                      "scope": 16378,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 16365,
                        "name": "ElementaryTypeName",
                        "src": "20921:5:55"
                      }
                    ],
                    "id": 16366,
                    "name": "VariableDeclaration",
                    "src": "20921:21:55"
                  }
                ],
                "id": 16367,
                "name": "ParameterList",
                "src": "20854:94:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 16378,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16368,
                        "name": "ElementaryTypeName",
                        "src": "20972:7:55"
                      }
                    ],
                    "id": 16369,
                    "name": "VariableDeclaration",
                    "src": "20972:7:55"
                  }
                ],
                "id": 16370,
                "name": "ParameterList",
                "src": "20971:9:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 16370
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bytes32",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                },
                                {
                                  "typeIdentifier": "t_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16342,
                              "type": "function (bytes32,bytes memory,bytes memory) view returns (bytes32)",
                              "value": "_heaviestFromAncestor"
                            },
                            "id": 16371,
                            "name": "Identifier",
                            "src": "20998:21:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16362,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 16372,
                            "name": "Identifier",
                            "src": "21020:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16364,
                              "type": "bytes calldata",
                              "value": "_left"
                            },
                            "id": 16373,
                            "name": "Identifier",
                            "src": "21031:5:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16366,
                              "type": "bytes calldata",
                              "value": "_right"
                            },
                            "id": 16374,
                            "name": "Identifier",
                            "src": "21038:6:55"
                          }
                        ],
                        "id": 16375,
                        "name": "FunctionCall",
                        "src": "20998:47:55"
                      }
                    ],
                    "id": 16376,
                    "name": "Return",
                    "src": "20991:54:55"
                  }
                ],
                "id": 16377,
                "name": "Block",
                "src": "20981:71:55"
              }
            ],
            "id": 16378,
            "name": "FunctionDefinition",
            "src": "20825:227:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "isMostRecentAncestor",
              "scope": 16400,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_ancestor",
                      "scope": 16399,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16379,
                        "name": "ElementaryTypeName",
                        "src": "21097:7:55"
                      }
                    ],
                    "id": 16380,
                    "name": "VariableDeclaration",
                    "src": "21097:17:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_left",
                      "scope": 16399,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16381,
                        "name": "ElementaryTypeName",
                        "src": "21124:7:55"
                      }
                    ],
                    "id": 16382,
                    "name": "VariableDeclaration",
                    "src": "21124:13:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_right",
                      "scope": 16399,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 16383,
                        "name": "ElementaryTypeName",
                        "src": "21147:7:55"
                      }
                    ],
                    "id": 16384,
                    "name": "VariableDeclaration",
                    "src": "21147:14:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_limit",
                      "scope": 16399,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 16385,
                        "name": "ElementaryTypeName",
                        "src": "21171:7:55"
                      }
                    ],
                    "id": 16386,
                    "name": "VariableDeclaration",
                    "src": "21171:14:55"
                  }
                ],
                "id": 16387,
                "name": "ParameterList",
                "src": "21087:104:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 16399,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 16388,
                        "name": "ElementaryTypeName",
                        "src": "21215:4:55"
                      }
                    ],
                    "id": 16389,
                    "name": "VariableDeclaration",
                    "src": "21215:4:55"
                  }
                ],
                "id": 16390,
                "name": "ParameterList",
                "src": "21214:6:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 16390
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16205,
                              "type": "function (bytes32,bytes32,bytes32,uint256) view returns (bool)",
                              "value": "_isMostRecentAncestor"
                            },
                            "id": 16391,
                            "name": "Identifier",
                            "src": "21238:21:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16380,
                              "type": "bytes32",
                              "value": "_ancestor"
                            },
                            "id": 16392,
                            "name": "Identifier",
                            "src": "21260:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16382,
                              "type": "bytes32",
                              "value": "_left"
                            },
                            "id": 16393,
                            "name": "Identifier",
                            "src": "21271:5:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16384,
                              "type": "bytes32",
                              "value": "_right"
                            },
                            "id": 16394,
                            "name": "Identifier",
                            "src": "21278:6:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 16386,
                              "type": "uint256",
                              "value": "_limit"
                            },
                            "id": 16395,
                            "name": "Identifier",
                            "src": "21286:6:55"
                          }
                        ],
                        "id": 16396,
                        "name": "FunctionCall",
                        "src": "21238:55:55"
                      }
                    ],
                    "id": 16397,
                    "name": "Return",
                    "src": "21231:62:55"
                  }
                ],
                "id": 16398,
                "name": "Block",
                "src": "21221:79:55"
              }
            ],
            "id": 16399,
            "name": "FunctionDefinition",
            "src": "21058:242:55"
          }
        ],
        "id": 16400,
        "name": "ContractDefinition",
        "src": "20272:1030:55"
      }
    ],
    "id": 16401,
    "name": "SourceUnit",
    "src": "0:21303:55"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.17+commit.d19bba13.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.4",
  "updatedAt": "2021-11-23T11:52:09.439Z",
  "devdoc": {
    "methods": {
      "addHeaders(bytes,bytes)": {
        "details": "We check integrity and consistency of the header chain",
        "params": {
          "_anchor": "The header immediately preceeding the new chain",
          "_headers": "A tightly-packed list of 80-byte Bitcoin headers"
        },
        "return": "True if successfully written, error otherwise"
      },
      "addHeadersWithRetarget(bytes,bytes,bytes)": {
        "details": "Checks the retarget, the heights, and the linkage",
        "params": {
          "_headers": "A tightly-packed list of 80-byte Bitcoin headers",
          "_oldPeriodEndHeader": "The last header in the difficulty period being closed",
          "_oldPeriodStartHeader": "The first header in the difficulty period being closed"
        },
        "return": "True if successfully written, error otherwise"
      },
      "constructor": {
        "details": "We don't check this AT ALL really. Don't use relays with bad genesis",
        "params": {
          "_genesisHeader": "The starting header",
          "_height": "The starting height",
          "_periodStart": "The hash of the first header in the genesis epoch"
        }
      },
      "findAncestor(bytes32,uint256)": {
        "details": "Will fail if the header is unknown",
        "params": {
          "_digest": "The header digest to search for"
        },
        "return": "The height of the header, or error if unknown"
      },
      "findHeight(bytes32)": {
        "details": "Will fail if the header is unknown",
        "params": {
          "_digest": "The header digest to search for"
        },
        "return": "The height of the header, or error if unknown"
      },
      "getBestKnownDigest()": {
        "details": "This updated only by calling markNewHeaviest",
        "return": "The hash of the best marked chain tip"
      },
      "getCurrentEpochDifficulty()": {
        "details": "This is updated when a new heavist header has a new diff",
        "return": "The difficulty of the bestKnownDigest"
      },
      "getLastReorgCommonAncestor()": {
        "details": "This is updated only by calling markNewHeaviest",
        "return": "The hash of the shared ancestor of the most recent fork"
      },
      "getPrevEpochDifficulty()": {
        "details": "This is updated when a difficulty change is accepted",
        "return": "The difficulty of the previous epoch"
      },
      "getRelayGenesis()": {
        "details": "This is an initialization parameter",
        "return": "The hash of the first block of the relay"
      },
      "isAncestor(bytes32,bytes32,uint256)": {
        "details": "Limit the amount of lookups (and thus gas usage) with _limit",
        "params": {
          "_ancestor": "The prospective ancestor",
          "_descendant": "The descendant to check",
          "_limit": "The maximum number of blocks to check"
        },
        "return": "true if ancestor is at most limit blocks lower than descendant, otherwise false"
      },
      "markNewHeaviest(bytes32,bytes,bytes,uint256)": {
        "details": "We don't check this AT ALL really. Don't use relays with bad genesis",
        "params": {
          "_ancestor": "The digest of the most recent common ancestor",
          "_currentBest": "The 80-byte header referenced by bestKnownDigest",
          "_limit": "Limit the amount of traversal of the chain",
          "_newBest": "The 80-byte header to mark as the new best"
        },
        "return": "True if successfully updates bestKnownDigest, error otherwise"
      }
    }
  },
  "userdoc": {
    "methods": {
      "addHeaders(bytes,bytes)": {
        "notice": "Adds headers to storage after validating"
      },
      "addHeadersWithRetarget(bytes,bytes,bytes)": {
        "notice": "Adds headers to storage, performs additional validation of retarget"
      },
      "constructor": "Gives a starting point for the relay",
      "findAncestor(bytes32,uint256)": {
        "notice": "Finds an ancestor for a block by its digest"
      },
      "findHeight(bytes32)": {
        "notice": "Finds the height of a header by its digest"
      },
      "getBestKnownDigest()": {
        "notice": "Getter for bestKnownDigest"
      },
      "getCurrentEpochDifficulty()": {
        "notice": "Getter for currentEpochDiff"
      },
      "getLastReorgCommonAncestor()": {
        "notice": "Getter for relayGenesis"
      },
      "getPrevEpochDifficulty()": {
        "notice": "Getter for prevEpochDiff"
      },
      "getRelayGenesis()": {
        "notice": "Getter for relayGenesis"
      },
      "isAncestor(bytes32,bytes32,uint256)": {
        "notice": "Checks if a digest is an ancestor of the current one"
      },
      "markNewHeaviest(bytes32,bytes,bytes,uint256)": {
        "notice": "Gives a starting point for the relay"
      }
    }
  }
}