Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix state/storage exception (FPS.sol) #52

Open
ashwinphatak opened this issue May 10, 2021 · 0 comments
Open

Fix state/storage exception (FPS.sol) #52

ashwinphatak opened this issue May 10, 2021 · 0 comments
Assignees

Comments

@ashwinphatak
Copy link
Collaborator

State id: 276162362
State id: 276162363
payload StorageRequest(address,string,string)
hash 0x98161ddebfa4d4fd1c08afb4633d60e0fa659fe1e2c2aebef15f6f1b18df7be9
address dfea08d7c2b43498bfe32778334c9279956057f0
98161ddebfa4d4fd1c08afb4633d60e0fa659fe1e2c2aebef15f6f1b18df7be9
array [
  {
    name: 'uploader',
    value: '29b1d432a40f40f5418da2d4abf740e5e491629b',
    type: 'address'
  },
  {
    name: 'cid',
    value: 'QmTJYDuVWNnRn6g4AjRE5adZ9GwTm7Sgu2Zj75a3xibDRJ',
    type: 'string'
  },
  {
    name: 'config',
    value: '{hot:{enabled:true,allowUnfreeze:true,ipfs:{addTimeout:900},unfreezeMaxPrice:0},cold:{enabled:true,filecoin:{replicationFactor:1,dealMinDuration:518400,excludedMinersList:[],trustedMinersList:[],countryCodesList:[],renew:{enabled:true,threshold:1},address:adr1,maxPrice:100000000000,fastRetrieval:true,dealStartOffset:8640,verifiedDeal:true}},repairable:false}',
    type: 'string'
  }
]
State id: 276162364
State id: 276162365
State id: 276162366
State id: 276162367
State id: 276162368
State id: 276162369
State id: 276162370
query: START TRANSACTION
query: INSERT INTO "eth"."block"("key", "data") VALUES ($1, $2) ON CONFLICT  ( key )  DO UPDATE SET key = EXCLUDED.key, data = EXCLUDED.data RETURNING * -- PARAMETERS: ["/blocks/DMQI76YA2OL5YFXP6Q5S5WIISL4GHNKS5BBKQVGGR2NMARZNWQPELKY","\\xf9025ca0a82f02604007a6680f048726ad7fcf64c4cb38e44b6284c14c0f60b2685a93fca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a050195429536af0e2c6bd7f92136642742536a26f306bc0810c34defac07485f3a03a5cdb0bfeeaba8ac0c0431551071d5b3042aac9e7fe3c8852f04292215ca017a07f59c220b654b6a17304b3a289123bdbe99dc16af5b7b707159a4dae109b41fab901000020010001000000000040214000000000000000000480500000000000008000000400000264080020004040100000100000400002000000002000002020200000000400000000400208a00800800000000000080402040000000040000000000800088022204000402000100000080000201000000000002000001101000000200004008004000002005040010000000080001080000002000c008000420000020000000000000000000001000000000400000000a02000004c000018004020000040060000044022000030000108040000800040080000000020000000200000100000000008000000201000000000000000002002000000000800000080000183827dc48398b193833481828460971151b861d883010a04846765746888676f312e31362e33856c696e75780000000000000022346b1f5ae0498c4bcf4377fa9b1ea52258c12b48bec3690765afffb6020a3769b5a23fa53ba6b114d76c519ea9375d661f6cba98b27010a37714ed08ba713a00a00000000000000000000000000000000000000000000000000000000000000000880000000000000000"]
query: INSERT INTO "eth"."header_cids"("block_number", "block_hash", "parent_hash", "cid", "mh_key", "td", "node_id", "reward", "state_root", "tx_root", "receipt_root", "uncle_root", "bloom", "timestamp", "times_validated") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) ON CONFLICT  ( block_number, block_hash )  DO UPDATE SET parent_hash = EXCLUDED.parent_hash, cid = EXCLUDED.cid, mh_key = EXCLUDED.mh_key, td = EXCLUDED.td, node_id = EXCLUDED.node_id RETURNING * -- PARAMETERS: ["8551876","0x8ffb00d397dc16eff43b2ed90892f863b552e842a854c68e9ac0472db41e45ab","0xa82f02604007a6680f048726ad7fcf64c4cb38e44b6284c14c0f60b2685a93fc","bagiacgzar75qbu4x3qlo75b3f3mqrexymo2vf2ccvbkmndu2ybds3na6iwvq","/blocks/DMQI76YA2OL5YFXP6Q5S5WIISL4GHNKS5BBKQVGGR2NMARZNWQPELKY","14707028",1,"2062958958000000000","0x50195429536af0e2c6bd7f92136642742536a26f306bc0810c34defac07485f3","0x3a5cdb0bfeeaba8ac0c0431551071d5b3042aac9e7fe3c8852f04292215ca017","0x7f59c220b654b6a17304b3a289123bdbe99dc16af5b7b707159a4dae109b41fa","0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","\\x0020010001000000000040214000000000000000000480500000000000008000000400000264080020004040100000100000400002000000002000002020200000000400000000400208a00800800000000000080402040000000040000000000800088022204000402000100000080000201000000000002000001101000000200004008004000002005040010000000080001080000002000c008000420000020000000000000000000001000000000400000000a02000004c00001800402000004006000004402200003000010804000080004008000000002000000020000010000000000800000020100000000000000000200200000000080000008000","1620513105",1]
query: COMMIT
query: START TRANSACTION
query: INSERT INTO "eth"."block"("key", "data") VALUES ($1, $2) ON CONFLICT  ( key )  DO UPDATE SET key = EXCLUDED.key, data = EXCLUDED.data RETURNING * -- PARAMETERS: ["/blocks/DMQJZAYQN63FVQPNFKBS5I6ILNF5ZOXRKJDOCA7X4MH4YWFOUYN4F7I","\\xf902aa15843b9aca0083011ba194dfea08d7c2b43498bfe32778334c9279956057f080b90244f641090c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e516d544a59447556574e6e526e366734416a52453561645a394777546d37536775325a6a3735613378696244524a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001687b686f743a7b656e61626c65643a747275652c616c6c6f77556e667265657a653a747275652c697066733a7b61646454696d656f75743a3930307d2c756e667265657a654d617850726963653a307d2c636f6c643a7b656e61626c65643a747275652c66696c65636f696e3a7b7265706c69636174696f6e466163746f723a312c6465616c4d696e4475726174696f6e3a3531383430302c6578636c756465644d696e6572734c6973743a5b5d2c747275737465644d696e6572734c6973743a5b5d2c636f756e747279436f6465734c6973743a5b5d2c72656e65773a7b656e61626c65643a747275652c7468726573686f6c643a317d2c616464726573733a616472312c6d617850726963653a3130303030303030303030302c6661737452657472696576616c3a747275652c6465616c53746172744f66667365743a383634302c76657269666965644465616c3a747275657d7d2c72657061697261626c653a66616c73657d0000000000000000000000000000000000000000000000002ba0a1c847ed6eb2448ba247341848051491cf026055eaf23fc9fe41f4cfd4f12650a040193c061ff16fcf9baa6e8578d6128f5ceb05e83284d00998a6b9b02520d282"]
query: INSERT INTO "eth"."transaction_cids"("header_id", "tx_hash", "index", "cid", "mh_key", "dst", "src", "tx_data") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT  ( header_id, tx_hash )  DO UPDATE SET index = EXCLUDED.index, cid = EXCLUDED.cid, mh_key = EXCLUDED.mh_key, dst = EXCLUDED.dst, src = EXCLUDED.src, tx_data = EXCLUDED.tx_data RETURNING * -- PARAMETERS: [7,"0x9c83106fb65ac1ed2a832ea3c85b4bdcbaf15246e103f7e30fcc58aea61bc2fd",25,"bagjqcgzatsbra35wlla62kudf2r4qw2l3s5pcusg4eb7pyypzrmk5jq3yl6q","/blocks/DMQJZAYQN63FVQPNFKBS5I6ILNF5ZOXRKJDOCA7X4MH4YWFOUYN4F7I","0xdFEa08D7c2B43498Bfe32778334c9279956057F0","0x29b1d432a40f40F5418DA2d4ABf740e5E491629B","\\xf641090c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e516d544a59447556574e6e526e366734416a52453561645a394777546d37536775325a6a3735613378696244524a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001687b686f743a7b656e61626c65643a747275652c616c6c6f77556e667265657a653a747275652c697066733a7b61646454696d656f75743a3930307d2c756e667265657a654d617850726963653a307d2c636f6c643a7b656e61626c65643a747275652c66696c65636f696e3a7b7265706c69636174696f6e466163746f723a312c6465616c4d696e4475726174696f6e3a3531383430302c6578636c756465644d696e6572734c6973743a5b5d2c747275737465644d696e6572734c6973743a5b5d2c636f756e747279436f6465734c6973743a5b5d2c72656e65773a7b656e61626c65643a747275652c7468726573686f6c643a317d2c616464726573733a616472312c6d617850726963653a3130303030303030303030302c6661737452657472696576616c3a747275652c6465616c53746172744f66667365743a383634302c76657269666965644465616c3a747275657d7d2c72657061697261626c653a66616c73657d000000000000000000000000000000000000000000000000"]
query: COMMIT
query: START TRANSACTION
INSERT INTO data.contract_id_1_event_id_1
		(event_id,contract_id,mh_key,header_id,data_uploader,data_cid,data_config)
		VALUES
		('1','1','/blocks/DMQLF5JKFPE6JBRUOD4SE4FKTV2Q2RHNSXIVZK77VNYFQ3GLZ4H7IBI','7','29b1d432a40f40f5418da2d4abf740e5e491629b','QmTJYDuVWNnRn6g4AjRE5adZ9GwTm7Sgu2Zj75a3xibDRJ','{hot:{enabled:true,allowUnfreeze:true,ipfs:{addTimeout:900},unfreezeMaxPrice:0},cold:{enabled:true,filecoin:{replicationFactor:1,dealMinDuration:518400,excludedMinersList:[],trustedMinersList:[],countryCodesList:[],renew:{enabled:true,threshold:1},address:adr1,maxPrice:100000000000,fastRetrieval:true,dealStartOffset:8640,verifiedDeal:true}},repairable:false}') RETURNING id;
query: INSERT INTO data.contract_id_1_event_id_1
		(event_id,contract_id,mh_key,header_id,data_uploader,data_cid,data_config)
		VALUES
		('1','1','/blocks/DMQLF5JKFPE6JBRUOD4SE4FKTV2Q2RHNSXIVZK77VNYFQ3GLZ4H7IBI','7','29b1d432a40f40f5418da2d4abf740e5e491629b','QmTJYDuVWNnRn6g4AjRE5adZ9GwTm7Sgu2Zj75a3xibDRJ','{hot:{enabled:true,allowUnfreeze:true,ipfs:{addTimeout:900},unfreezeMaxPrice:0},cold:{enabled:true,filecoin:{replicationFactor:1,dealMinDuration:518400,excludedMinersList:[],trustedMinersList:[],countryCodesList:[],renew:{enabled:true,threshold:1},address:adr1,maxPrice:100000000000,fastRetrieval:true,dealStartOffset:8640,verifiedDeal:true}},repairable:false}') RETURNING id;
query: COMMIT
query: SELECT "Address"."address_id" AS "Address_address_id", "Address"."address" AS "Address_address", "Address"."hash" AS "Address_hash" FROM "data"."addresses" "Address" WHERE "Address"."address" = $1 LIMIT 1 -- PARAMETERS: ["0x29b1d432a40f40f5418da2d4abf740e5e491629b"]
query: SELECT * FROM data.contract_id_1_address_slot_id_1 WHERE address_id=2;
query: UPDATE data.contract_id_1_state_id_1 a
					SET address_id=b.address_id
					FROM data.contract_id_1_address_slot_id_1 b
					WHERE
					  a.address_id IS NULL
					  AND a.uploaderToContent=b.hash
query failed: UPDATE data.contract_id_1_state_id_1 a
					SET address_id=b.address_id
					FROM data.contract_id_1_address_slot_id_1 b
					WHERE
					  a.address_id IS NULL
					  AND a.uploaderToContent=b.hash
error: error: column a.uploadertocontent does not exist
    at Parser.parseErrorMessage (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/parser.ts:357:11)
    at Parser.handlePacket (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/parser.ts:186:21)
    at Parser.parse (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/parser.ts:101:30)
    at Socket.<anonymous> (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (node:events:369:20)
    at Socket.emit (node:domain:470:12)
    at addChunk (node:internal/streams/readable:313:12)
    at readableAddChunk (node:internal/streams/readable:288:9)
    at Socket.Readable.push (node:internal/streams/readable:227:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 184,
  severity: 'ERROR',
  code: '42703',
  detail: undefined,
  hint: 'Perhaps you meant to reference the column "a.uploaderToContent".',
  position: '172',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '3349',
  routine: 'errorMissingColumn'
}
Unhandled Rejection at: Promise {
  <rejected> QueryFailedError: column a.uploadertocontent does not exist
      at new QueryFailedError (/home/nandit/Desktop/eth-watcher-ts/src/error/QueryFailedError.ts:9:9)
      at Query.callback (/home/nandit/Desktop/eth-watcher-ts/src/driver/postgres/PostgresQueryRunner.ts:195:30)
      at Query.handleError (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg/lib/query.js:128:19)
      at Client._handleErrorMessage (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg/lib/client.js:326:17)
      at Connection.emit (node:events:369:20)
      at Connection.emit (node:domain:470:12)
      at /home/nandit/Desktop/eth-watcher-ts/node_modules/pg/lib/connection.js:109:12
      at Parser.parse (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/parser.ts:102:9)
      at Socket.<anonymous> (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/index.ts:7:48)
      at Socket.emit (node:events:369:20) {
    length: 184,
    severity: 'ERROR',
    code: '42703',
    detail: undefined,
    hint: 'Perhaps you meant to reference the column "a.uploaderToContent".',
    position: '172',
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'parse_relation.c',
    line: '3349',
    routine: 'errorMissingColumn',
    query: 'UPDATE data.contract_id_1_state_id_1 a\n' +
      '\t\t\t\t\tSET address_id=b.address_id\n' +
      '\t\t\t\t\tFROM data.contract_id_1_address_slot_id_1 b\n' +
      '\t\t\t\t\tWHERE\n' +
      '\t\t\t\t\t  a.address_id IS NULL\n' +
      '\t\t\t\t\t  AND a.uploaderToContent=b.hash',
    parameters: []
  }
} reason: QueryFailedError: column a.uploadertocontent does not exist
    at new QueryFailedError (/home/nandit/Desktop/eth-watcher-ts/src/error/QueryFailedError.ts:9:9)
    at Query.callback (/home/nandit/Desktop/eth-watcher-ts/src/driver/postgres/PostgresQueryRunner.ts:195:30)
    at Query.handleError (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg/lib/query.js:128:19)
    at Client._handleErrorMessage (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg/lib/client.js:326:17)
    at Connection.emit (node:events:369:20)
    at Connection.emit (node:domain:470:12)
    at /home/nandit/Desktop/eth-watcher-ts/node_modules/pg/lib/connection.js:109:12
    at Parser.parse (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/parser.ts:102:9)
    at Socket.<anonymous> (/home/nandit/Desktop/eth-watcher-ts/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (node:events:369:20) {
  length: 184,
  severity: 'ERROR',
  code: '42703',
  detail: undefined,
  hint: 'Perhaps you meant to reference the column "a.uploaderToContent".',
  position: '172',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '3349',
  routine: 'errorMissingColumn',
  query: 'UPDATE data.contract_id_1_state_id_1 a\n' +
    '\t\t\t\t\tSET address_id=b.address_id\n' +
    '\t\t\t\t\tFROM data.contract_id_1_address_slot_id_1 b\n' +
    '\t\t\t\t\tWHERE\n' +
    '\t\t\t\t\t  a.address_id IS NULL\n' +
    '\t\t\t\t\t  AND a.uploaderToContent=b.hash',
  parameters: []
}
State id: 276162371
State id: 276162372
State id: 276162373

@ramilexe ramilexe removed their assignment May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants