XLNT / gnarly

🤙 A blockchain ETL tool to make your life better. Now that’s fuckin’ gnarly.
https://xlnt.co
Apache License 2.0
119 stars 9 forks source link

Fix transaction lookup bug #20

Closed shrugs closed 6 years ago

shrugs commented 6 years ago

logs graciously provided by pk on xlnt.chat

https://gist.githubusercontent.com/pkrasam/4e25487f53188bbc5e7bdc6677b68bb8/raw/50f42187baa1b584ef4d466743c4ee76aeeef1d0/180704_gnarly-demo_logs_v2

gnarly_1    | Wed, 04 Jul 2018 04:38:44 GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at ../snapshot/gnarly/node_modules/sequelize/lib/sequelize.js:242:13
gnarly_1    | 2018-07-04T04:38:44.621Z gnarly-core Resetting reducer stores: %s...
gnarly_1    | 2018-07-04T04:38:44.667Z gnarly-core Done with resetting reducers.
gnarly_1    | 2018-07-04T04:38:44.667Z gnarly-core Surfs up!
gnarly_1    | 2018-07-04T04:38:44.674Z gnarly-core:runner:cryptoKitties Explicitely starting from HEAD
gnarly_1    | 2018-07-04T04:38:44.690Z gnarly-core:runner:blocks Explicitely starting from HEAD
gnarly_1    | 2018-07-04T04:38:44.691Z gnarly-core:runner:events Explicitely starting from HEAD
gnarly_1    | 2018-07-04T04:38:46.327Z gnarly-core:blockstream Beginning from block 5902205
gnarly_1    | 2018-07-04T04:38:46.355Z gnarly-core:blockstream Beginning from block 5902205
gnarly_1    | 2018-07-04T04:38:46.358Z gnarly-core:blockstream Beginning from block 5902205
gnarly_1    | 2018-07-04T04:38:54.709Z gnarly-core:blockstream:onBlockAdd block 0x5a0f7d (0xe3d9a9a6572f146a66d1c0ca05f6e434ff658ba51409869a9ae52850b5377e2f)
gnarly_1    | 2018-07-04T04:38:55.769Z gnarly-core:blockstream:onBlockAdd block 0x5a0f7d (0xe3d9a9a6572f146a66d1c0ca05f6e434ff658ba51409869a9ae52850b5377e2f)
gnarly_1    | 2018-07-04T04:38:55.783Z gnarly-core:blockstream:onBlockAdd block 0x5a0f7d (0xe3d9a9a6572f146a66d1c0ca05f6e434ff658ba51409869a9ae52850b5377e2f)
gnarly_1    | 2018-07-04T04:39:01.942Z gnarly-core:blockstream:onBlockInvalidated block 0x5a0f7d (0xe3d9a9a6572f146a66d1c0ca05f6e434ff658ba51409869a9ae52850b5377e2f)
gnarly_1    | 2018-07-04T04:39:01.954Z gnarly-core:blockstream:onBlockAdd block 0x5a0f7c (0x6dbf67176d921de46d318b508522fd4f9d627637b2e9848a098c5cad563d3b1d)
gnarly_1    | unhandledRejection: Error: Could not find transaction 0xe3d9a9a6572f146a66d1c0ca05f6e434ff658ba51409869a9ae52850b5377e2f SequelizeEagerLoadingError: reducer is not associated to patch!
gnarly_1    |     at Function._getIncludedAssociation (/snapshot/gnarly/node_modules/sequelize/lib/model.js:583:13)
gnarly_1    |     at Function._validateIncludedElement (/snapshot/gnarly/node_modules/sequelize/lib/model.js:499:53)
gnarly_1    |     at __dirname._validateIncludedElements.options.include.options.include.map.include (/snapshot/gnarly/node_modules/sequelize/lib/model.js:395:37)
gnarly_1    |     at Array.map (<anonymous>)
gnarly_1    |     at Function._validateIncludedElements (/snapshot/gnarly/node_modules/sequelize/lib/model.js:390:39)
gnarly_1    |     at Function._validateIncludedElement (/snapshot/gnarly/node_modules/sequelize/lib/model.js:573:38)
gnarly_1    |     at __dirname._validateIncludedElements.options.include.options.include.map.include (/snapshot/gnarly/node_modules/sequelize/lib/model.js:395:37)
gnarly_1    |     at Array.map (<anonymous>)
gnarly_1    |     at Function._validateIncludedElements (/snapshot/gnarly/node_modules/sequelize/lib/model.js:390:39)
gnarly_1    |     at __dirname.findAll.Promise.try.then.then (/snapshot/gnarly/node_modules/sequelize/lib/model.js:1576:14)
gnarly_1    |     at tryCatcher (/snapshot/gnarly/node_modules/bluebird/js/release/util.js:16:23)
gnarly_1    |     at Promise.module.exports.Promise._settlePromiseFromHandler (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:512:31)
gnarly_1    |     at Promise.module.exports.Promise._settlePromise (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:569:18)
gnarly_1    |     at Promise.module.exports.Promise._settlePromise0 (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:614:10)
gnarly_1    |     at Promise.module.exports.Promise._settlePromises (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:693:18)
gnarly_1    |     at Async._drainQueue (/snapshot/gnarly/node_modules/bluebird/js/release/async.js:133:16)
gnarly_1    |     at Async._drainQueues (/snapshot/gnarly/node_modules/bluebird/js/release/async.js:143:10)
gnarly_1    |     at Immediate.__dirname.Async.drainQueues [as _onImmediate] (/snapshot/gnarly/node_modules/bluebird/js/release/async.js:17:14)
gnarly_1    |     at runCallback (timers.js:800:20)
gnarly_1    |     at tryOnImmediate (timers.js:762:5)
gnarly_1    |     at processImmediate [as _immediateCallback] (timers.js:733:5)
gnarly_1    |     at SequelizePersistInterface.<anonymous> (/snapshot/gnarly/node_modules/@xlnt/gnarly-core/lib/stores/sequelize.js:205:23)
gnarly_1    |     at Generator.throw (<anonymous>)
gnarly_1    |     at rejected (/snapshot/gnarly/node_modules/@xlnt/gnarly-core/lib/stores/sequelize.js:5:65)
gnarly_1    |     at <anonymous> Error: Could not find transaction 0xe3d9a9a6572f146a66d1c0ca05f6e434ff658ba51409869a9ae52850b5377e2f SequelizeEagerLoadingError: reducer is not associated to patch!
gnarly_1    |     at Function._getIncludedAssociation (/snapshot/gnarly/node_modules/sequelize/lib/model.js:583:13)
gnarly_1    |     at Function._validateIncludedElement (/snapshot/gnarly/node_modules/sequelize/lib/model.js:499:53)
gnarly_1    |     at __dirname._validateIncludedElements.options.include.options.include.map.include (/snapshot/gnarly/node_modules/sequelize/lib/model.js:395:37)
gnarly_1    |     at Array.map (<anonymous>)
gnarly_1    |     at Function._validateIncludedElements (/snapshot/gnarly/node_modules/sequelize/lib/model.js:390:39)
gnarly_1    |     at Function._validateIncludedElement (/snapshot/gnarly/node_modules/sequelize/lib/model.js:573:38)
gnarly_1    |     at __dirname._validateIncludedElements.options.include.options.include.map.include (/snapshot/gnarly/node_modules/sequelize/lib/model.js:395:37)
gnarly_1    |     at Array.map (<anonymous>)
gnarly_1    |     at Function._validateIncludedElements (/snapshot/gnarly/node_modules/sequelize/lib/model.js:390:39)
gnarly_1    |     at __dirname.findAll.Promise.try.then.then (/snapshot/gnarly/node_modules/sequelize/lib/model.js:1576:14)
gnarly_1    |     at tryCatcher (/snapshot/gnarly/node_modules/bluebird/js/release/util.js:16:23)
gnarly_1    |     at Promise.module.exports.Promise._settlePromiseFromHandler (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:512:31)
gnarly_1    |     at Promise.module.exports.Promise._settlePromise (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:569:18)
gnarly_1    |     at Promise.module.exports.Promise._settlePromise0 (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:614:10)
gnarly_1    |     at Promise.module.exports.Promise._settlePromises (/snapshot/gnarly/node_modules/bluebird/js/release/promise.js:693:18)
gnarly_1    |     at Async._drainQueue (/snapshot/gnarly/node_modules/bluebird/js/release/async.js:133:16)
gnarly_1    |     at Async._drainQueues (/snapshot/gnarly/node_modules/bluebird/js/release/async.js:143:10)
gnarly_1    |     at Immediate.__dirname.Async.drainQueues [as _onImmediate] (/snapshot/gnarly/node_modules/bluebird/js/release/async.js:17:14)
gnarly_1    |     at runCallback (timers.js:800:20)
gnarly_1    |     at tryOnImmediate (timers.js:762:5)
gnarly_1    |     at processImmediate [as _immediateCallback] (timers.js:733:5)
gnarly_1    |     at SequelizePersistInterface.<anonymous> (/snapshot/gnarly/node_modules/@xlnt/gnarly-core/lib/stores/sequelize.js:205:23)
gnarly_1    |     at Generator.throw (<anonymous>)
gnarly_1    |     at rejected (/snapshot/gnarly/node_modules/@xlnt/gnarly-core/lib/stores/sequelize.js:5:65)
gnarly_1    |     at <anonymous>
gnarly_1    | Wed, 04 Jul 2018 04:39:04 GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at ../snapshot/gnarly/node_modules/sequelize/lib/sequelize.js:242:13

which occurs when there's an invalidation in one reducer that causes some logic to search for a transaction that has an improper sequelize construction

shrugs commented 6 years ago

(waiting on feedback from pk to definitely close, but I think we figured this one out!)