Skip to content

Instantly share code, notes, and snippets.

View bthaile's full-sized avatar

Tom Haile bthaile

  • code slinger
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bthaile on github.
  • I am tomhaile (https://keybase.io/tomhaile) on keybase.
  • I have a public key ASA3Q2vuyxwWxniNYULq-5o-7Z3nnrl0RmuUihzKpT1azAo

To claim this, I am signing this object:

> npm run compile && electron-builder --mac
> [email protected] compile /Users/bthaile/gitrepos/augur-app
> electron-webpack
[1] Hash: ed4a5631582cdb3ea8b43b8523f9865122f58b38
Version: webpack 4.28.3
Child
Hash: ed4a5631582cdb3ea8b4
@bthaile
bthaile / gist:e30c2b4c2659831a54ae2eca38551896
Created January 6, 2019 19:27
augur-app crashed and disappeared.
[2019-01-06 13:19:27.476] [info] Need to check 1739 orderbooks for orphans
[2019-01-06 13:19:27.496] [info] Need to check 1738 orderbooks for orphans
[2019-01-06 13:19:27.510] [info] Need to check 1737 orderbooks for orphans
[2019-01-06 13:19:27.526] [info] Need to check 1736 orderbooks for orphans
[2019-01-06 13:19:27.560] [info] Need to check 1735 orderbooks for orphans
[2019-01-06 13:19:27.717] [info] Need to check 1735 orderbooks for orphans
[2019-01-06 13:19:27.752] [info] Need to check 1734 orderbooks for orphans
[2019-01-06 13:19:27.763] [info] Need to check 1733 orderbooks for orphans
[2019-01-06 13:19:27.955] [info] Need to check 1734 orderbooks for orphans
[2019-01-06 13:19:27.968] [info] Need to check 1732 orderbooks for orphans
[2019-01-09 22:35:13.836] [info] AugurNodeServer requestLatestSyncedBlock
[2019-01-09 22:35:18.838] [info] AugurNodeServer requestLatestSyncedBlock
[2019-01-09 22:35:23.839] [info] AugurNodeServer requestLatestSyncedBlock
[2019-01-09 22:35:28.751] [info] new block: 7040396, 1547092017 (Wed Jan 09 2019 21:46:57 GMT-0600 (CST))
[2019-01-09 22:35:28.768] [info] Processing 3 logs
[2019-01-09 22:35:28.771] [error] Fatal Error, shutting down servers Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: transfers.transactionHash, transfers.logIndex
[2019-01-09 22:35:28.771] [info] augur-node start: insert into `transfers` (`blockNumber`, `logIndex`, `recipient`, `sender`, `token`, `transactionHash`, `value`) values (7040396, 32, '0x6146a3f0178a84b82e83bc7498c5805fc80ce67c', NULL, '0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b', '0xd07031e0c0ca9a4832b8bc66a71838c16c2557b473fbba1d831b98de30b78bb6', '1400000000000000000') - SQLITE_CONSTRAINT: UNIQUE constraint failed: transfers.transactionHash, transfers.logIndex
[2019-01-
[bthaile@mbp:~/gitrepos/augur (petong/docker-node-alpine *)]$ yarn workspace augur-node start
yarn workspace v1.12.3
yarn run v1.12.3
$ ts-node ./src/runServer
connecting to augur-node: undefined
connecting to ethereum-node: {"http":"http://localhost:8545","ws":"ws://localhost:8546"}
websocket ws://localhost:8546 opened
connected to ethereum
augur-102-3.db
Starting websocket secure server on port 9002
40,"jsonrpc":"2.0","method":"getMarkets","params":{"reportingState":["FINALIZED","AWAITING_FINALIZATION"],"sortBy":"endTime","isSortDescending":true,"universe":"0x3d777ea1541a7dec004972b283d53af3633b7531"}}
{"id":30041,"jsonrpc":"2.0","method":"getMarkets","params":{"reportingState":["FINALIZED","AWAITING_FINALIZATION"],"sortBy":"endTime","isSortDescending":true,"universe":"0x3d777ea1541a7dec004972b283d53af3633b7531"}}
{"id":30042,"jsonrpc":"2.0","method":"getMarkets","params":{"reportingState":["FINALIZED","AWAITING_FINALIZATION"],"sortBy":"endTime","isSortDescending":true,"universe":"0x3d777ea1541a7dec004972b283d53af3633b7531"}}
{"id":30043,"jsonrpc":"2.0","method":"getMarkets","params":{"reportingState":["FINALIZED","AWAITING_FINALIZATION"],"sortBy":"endTime","isSortDescending":true,"universe":"0x3d777ea1541a7dec004972b283d53af3633b7531"}}
<--- Last few GCs --->
[717:0x103002a00] 872426 ms: Mark-sweep 1332.9 (1441.0) -> 1306.4 (1434.4) MB, 873.4 / 0.0 ms (average mu = 0.300, current mu = 0.309) alloca
@bthaile
bthaile / augur-node response
Created April 12, 2019 15:10
augur-node getUser positions
{"tradingPositions":[{"position":"0.0011101","marketId":"0x448d1d8280844513c38b2b73bde8a539d0022954","outcome":1,"timestamp":1555076658,"netPosition":"0.0012101","realized":"0","unrealized":"-0.000021353000000000000005267","total":"-0.000021353000000000000005267","averagePrice":"0.18764564911990744567","unrealizedCost":"0.000227070000000000000005267","realizedCost":"0","totalCost":"0.000227070000000000000005267","realizedPercent":"0","unrealizedPercent":"-0.09403708107632007753","totalPercent":"-0.09403708107632007753","unrealizedRevenue":"0.000205717","frozenFunds":"0.00022707","lastTradePrice":"0.17","lastTradePrice24hAgo":"0.5","lastTradePrice24hChangePercent":"-0.66","unrealizedRevenue24hAgo":"0.00060505","unrealizedRevenue24hChangePercent":"-0.66"},{"position":"0","marketId":"0xdc0f132b0691bd9b89af038bf29e7e19ab7a5445","outcome":1,"timestamp":1555076658,"netPosition":"0","realized":"0.0009990030934","unrealized":"0","total":"0.0009990030934","averagePrice":"-10","unrealizedCost":"0","realizedCost":"0.009
@bthaile
bthaile / NOT NULL constraint
Last active May 15, 2019 20:51
augur app 1.13 error when trying to sync mainnet
[14:49:14.772] augur-node start: insert into `_knex_temp_alter7` (`account`, `blockNumber`, `eventName`, `logIndex`, `marketId`, `numCompleteSets`, `numPurchasedOrSold`, `tradeGroupId`, `transactionHash`, `universe`) select '0x2404a39e447d0c8b417049fc42b468a26990b4cc' as `account`, 5970747 as `blockNumber`, 'CompleteSetsSold' as `eventName`, 53 as `logIndex`, '0x62fd1c486b124404e863354ac6a32d348ee074b0' as `marketId`, "3" as `numCompleteSets`, '3' as `numPurchasedOrSold`, NULL as `tradeGroupId`, '0xc00edbcad96cc73cc3843c9a8761c9915d026d7b18d212053ffac142a186c8f2' as `transactionHash`, '0xe991247b78f937d7b69cfc00f1a487a293557677' as `universe` union all select '0x2404a39e447d0c8b417049fc42b468a26990b4cc' as `account`, 5970756 as `blockNumber`, 'CompleteSetsSold' as `eventName`, 84 as `logIndex`, '0x62fd1c486b124404e863354ac6a32d348ee074b0' as `marketId`, "3" as `numCompleteSets`, '3' as `numPurchasedOrSold`, NULL as `tradeGroupId`, '0xa0c6da53b221a26c4a649c9deae239b20c1bd139e1caf7b12ecab7d70b47e38a' as `transa
@bthaile
bthaile / unable to add new block
Created July 17, 2019 18:27
error after sending tx to take partial order from book
DerivedDB.ts?2f8f:114 Uncaught (in promise) Error: Unable to add new block
at MarketDB.eval (DerivedDB.ts?2f8f:114)
at step (DerivedDB.js:45)
at Object.eval [as next] (DerivedDB.js:26)
at fulfilled (DerivedDB.js:17)
(anonymous) @ DerivedDB.ts?2f8f:114
step @ DerivedDB.js:45
(anonymous) @ DerivedDB.js:26
fulfilled @ DerivedDB.js:17
Promise.then (async)
@bthaile
bthaile / uncaught promise
Created July 17, 2019 18:29
document conflict in derived db, Markets
DerivedDB.js:18 Uncaught (in promise)
CustomPouchError {status: 409, name: "conflict", message: "Document update conflict", error: true, id: "104-Markets", …}
rejected @ DerivedDB.js:18
Promise.then (async)
step @ DerivedDB.js:19
fulfilled @ DerivedDB.js:17
Promise.then (async)
step @ DerivedDB.js:19
fulfilled @ DerivedDB.js:17
Promise.then (async)