CirclesUBI / circles-api

Offchain database and API service for Circles
GNU Affero General Public License v3.0
11 stars 3 forks source link

Worker: "Found error with checking sending limit for token" #57

Open adzialocha opened 3 years ago

adzialocha commented 3 years ago

Describe the bug

The latest version of the api worker (v.1.3.0) throws the following error running on production:

2021-03-11T11:30:10.836Z [info]: [syncAddress-trust-0x0000000000000000000000009a0bbbbd3789f184ca88f2f6a40f42406cb842ac-1615462210831] ACTIVE "Sync trust graph for address" job started

[...]

2021-03-11T11:30:52.620Z [info]: Found 9 outgoing addresses while processing job for Safe 0x3DdEa181A266a4c6b75fE72cfa4c2Ae508d365DA
2021-03-11T11:30:53.185Z [error]: Found error with checking sending limit for token of 0xEAA4f48464d6e16Ab5BbB8Da123b63F34B962F34 from 0xEAA4f48464d6e16Ab5BbB8Da123b63F34B962F34 to 0x3DdEa181A266a4c6b75fE72cfa4c2Ae508d365DA [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]

It looks like the actual error occurs in another transfer task, not the trust task itself which succeeded.

I assume when untrusting some other transfer task (concurrently?) checks the sendLimit of an trust connection which does not exist anymore on the blockchain eg. just got deleted?

To Reproduce

  1. Go on circles.garden
  2. Untrust someone

For some reason it can be reproduced when untrusting someone but maybe it also occurs in other cases (hard to tell as there is so many logs and not a clear relation between them)

adzialocha commented 3 years ago

More logs:

2021-03-11T11:42:30.999Z [info]: Found 35 outgoing addresses while processing job for Safe 0x9428F720c8521277990Fc0605AdA038B80962582
2021-03-11T11:42:31.468Z [error]: Found error with checking sending limit for token of 0x04CA6F8f447BC0BC585a9974c4341e2f363690f1 from 0x04CA6F8f447BC0BC585a9974c4341e2f363690f1 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.470Z [error]: Found error with checking sending limit for token of 0x051d7fC8cf11072fe80aBD010559978cfe9E24f1 from 0x051d7fC8cf11072fe80aBD010559978cfe9E24f1 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.481Z [error]: Found error with checking sending limit for token of 0x0d6D9E6b74cDe166009544c1F5A670Be2a952334 from 0x0d6D9E6b74cDe166009544c1F5A670Be2a952334 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.483Z [error]: Found error with checking sending limit for token of 0x0Ee8C4F4851009b97bad8321BD53e3229360a694 from 0x0Ee8C4F4851009b97bad8321BD53e3229360a694 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.484Z [error]: Found error with checking sending limit for token of 0x0Fcd7C1AE5b26CBF0b63fF023aC5F4468439876f from 0x0Fcd7C1AE5b26CBF0b63fF023aC5F4468439876f to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.485Z [error]: Found error with checking sending limit for token of 0x10D47Adca9bb2BA68AA4470946d9b80c90f8D9cc from 0x10D47Adca9bb2BA68AA4470946d9b80c90f8D9cc to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.490Z [error]: Found error with checking sending limit for token of 0x197516804Be11C896cD6bdF20b2e5c13Ff026D45 from 0x197516804Be11C896cD6bdF20b2e5c13Ff026D45 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.498Z [error]: Found error with checking sending limit for token of 0x2D2fBD7Ea14A09e29A2253464a83Fd8C558b0028 from 0x2D2fBD7Ea14A09e29A2253464a83Fd8C558b0028 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.499Z [error]: Found error with checking sending limit for token of 0x3617d2fd7D19094cd760d136c79bf86a3d566B4f from 0x3617d2fd7D19094cd760d136c79bf86a3d566B4f to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.505Z [error]: Found error with checking sending limit for token of 0x37769EBE7bA4970467228f15FCAcB970a899D9F2 from 0x37769EBE7bA4970467228f15FCAcB970a899D9F2 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.505Z [error]: Found error with checking sending limit for token of 0x3d610C4D7255F91fdf7A862DbFCE5CD005066C57 from 0x3d610C4D7255F91fdf7A862DbFCE5CD005066C57 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.505Z [error]: Found error with checking sending limit for token of 0x470aee51CD55e40058738257BD1c629fbE690929 from 0x470aee51CD55e40058738257BD1c629fbE690929 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.511Z [error]: Found error with checking sending limit for token of 0x527A1409c7683B3B83a5be36AA37904d1DE31F0b from 0x527A1409c7683B3B83a5be36AA37904d1DE31F0b to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.512Z [error]: Found error with checking sending limit for token of 0x62E8B1B2D8e259cCA3de59BBf7d7CB67774c579e from 0x62E8B1B2D8e259cCA3de59BBf7d7CB67774c579e to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.512Z [error]: Found error with checking sending limit for token of 0x679B2cC03048433Be4C3d744BA3b7f9b17680923 from 0x679B2cC03048433Be4C3d744BA3b7f9b17680923 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.512Z [error]: Found error with checking sending limit for token of 0x6C3Ce438Db719E0DDF2d165b62D7833a70324FF7 from 0x6C3Ce438Db719E0DDF2d165b62D7833a70324FF7 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.513Z [error]: Found error with checking sending limit for token of 0x6Cf82273B93F405Dd539cD877Cf02753ae907452 from 0x6Cf82273B93F405Dd539cD877Cf02753ae907452 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.520Z [error]: Found error with checking sending limit for token of 0x7AA66100cD2Adaef3836b28F9Bb37478b4EEFB27 from 0x7AA66100cD2Adaef3836b28F9Bb37478b4EEFB27 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.521Z [error]: Found error with checking sending limit for token of 0x7F0B407579383732C2520EF411154A003a7dfa8D from 0x7F0B407579383732C2520EF411154A003a7dfa8D to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.521Z [error]: Found error with checking sending limit for token of 0x8023E8B779dF3a2Bf3b4eDE5D83B586FfA0378B1 from 0x8023E8B779dF3a2Bf3b4eDE5D83B586FfA0378B1 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.522Z [error]: Found error with checking sending limit for token of 0x872F98D59b0656590444bDF157b951c891633042 from 0x872F98D59b0656590444bDF157b951c891633042 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.532Z [error]: Found error with checking sending limit for token of 0x8F50873c4e990279a4dDC137C26f86c5B907A285 from 0x8F50873c4e990279a4dDC137C26f86c5B907A285 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.533Z [error]: Found error with checking sending limit for token of 0x8F693985d93cEa717d76cc008a064dC7d99B217B from 0x8F693985d93cEa717d76cc008a064dC7d99B217B to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.533Z [error]: Found error with checking sending limit for token of 0x941E170CDca115e42E6051cffaC39E3D1d720f62 from 0x941E170CDca115e42E6051cffaC39E3D1d720f62 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.534Z [error]: Found error with checking sending limit for token of 0x958C0905213FC97C62722aabdedfc11d877747C8 from 0x958C0905213FC97C62722aabdedfc11d877747C8 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.534Z [error]: Found error with checking sending limit for token of 0x9B326a5022A154B09EdD54fa1C1E3f9e751aAfA3 from 0x9B326a5022A154B09EdD54fa1C1E3f9e751aAfA3 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.535Z [error]: Found error with checking sending limit for token of 0x9becDA0501AF32F3D42115ec3276e595c7339ECc from 0x9becDA0501AF32F3D42115ec3276e595c7339ECc to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.543Z [error]: Found error with checking sending limit for token of 0xa659c59215595b8cf5ff764fAD9f791b36B8dDD0 from 0xa659c59215595b8cf5ff764fAD9f791b36B8dDD0 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.544Z [error]: Found error with checking sending limit for token of 0xAf7910eEB6Ef654737eEce38C2e586e20374c7e5 from 0xAf7910eEB6Ef654737eEce38C2e586e20374c7e5 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.548Z [error]: Found error with checking sending limit for token of 0xB71C5c320d0e5A8d7d89eaD34D5C33810e2C5E34 from 0xB71C5c320d0e5A8d7d89eaD34D5C33810e2C5E34 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.566Z [error]: Found error with checking sending limit for token of 0xc4fEBeA49ad5dfEb3132e2F4Dcb92B1f1c818473 from 0xc4fEBeA49ad5dfEb3132e2F4Dcb92B1f1c818473 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.581Z [error]: Found error with checking sending limit for token of 0xc9be45B27Fb973ef39dBA6fb3FC58Fa1CD2C1Df0 from 0xc9be45B27Fb973ef39dBA6fb3FC58Fa1CD2C1Df0 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.582Z [error]: Found error with checking sending limit for token of 0xd30044d2e1b5348DdB444858Af9cC6360016D40B from 0xd30044d2e1b5348DdB444858Af9cC6360016D40B to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.592Z [error]: Found error with checking sending limit for token of 0xEd02693fba2C3fbA33635102b225c35B9055e2cA from 0xEd02693fba2C3fbA33635102b225c35B9055e2cA to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:42:31.593Z [error]: Found error with checking sending limit for token of 0xF116b6b61dcBC4B44678BEF5128233c6f7FD39f6 from 0xF116b6b61dcBC4B44678BEF5128233c6f7FD39f6 to 0x9428F720c8521277990Fc0605AdA038B80962582 [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
adzialocha commented 3 years ago

This one looks maybe less noisy:

2021-03-11T11:44:30.851Z [info]: [syncAddress-trust-0x000000000000000000000000e909cbb1502be6eb9ef9939667451ce9158ba30a-1615463070741] COMPLETE "Sync trust graph for address" job
2021-03-11T11:44:30.851Z [info]: Processing transfer for 0xCF28a6A9904B68eE174705A6677efAaCA36fb0BB
2021-03-11T11:44:30.852Z [info]: [syncAddress-transfer-0xCF28a6A9904B68eE174705A6677efAaCA36fb0BB-1615463070745] ACTIVE "Sync trust graph for address" job started
2021-03-11T11:44:31.234Z [info]: Found 6 outgoing addresses while processing job for Safe 0xe909cbB1502BE6eB9ef9939667451cE9158ba30a
2021-03-11T11:44:31.464Z [info]: Found 6 outgoing addresses while processing job for Safe 0xe909cbB1502BE6eB9ef9939667451cE9158ba30a
2021-03-11T11:44:31.998Z [error]: Found error with checking sending limit for token of 0x1960111eeCc28f103E9257eE1b9b81Ac88012980 from 0x1960111eeCc28f103E9257eE1b9b81Ac88012980 to 0xe909cbB1502BE6eB9ef9939667451cE9158ba30a [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
2021-03-11T11:44:32.002Z [error]: Found error with checking sending limit for token of 0x1Db3991AF4BF8a31545e87c31f8B82C75cc21911 from 0x1Db3991AF4BF8a31545e87c31f8B82C75cc21911 to 0xe909cbB1502BE6eB9ef9939667451cE9158ba30a [Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.]
ana0 commented 3 years ago

In case you haven't found it yet, for all these cases that I've looked at, the token being queried hasn't been deployed yet (ie. the person trusted hasn't finished signup)

Contracts should be returning 0 and handling this case, at least theoretically speaking: https://github.com/CirclesUBI/circles-contracts/blob/a2f63d30558988c557ff3867f87dc5fdc78d47e4/contracts/Hub.sol#L211

ana0 commented 3 years ago

Tried a few cases in the blockscout ui, and I'm correctly getting 0. You can test here, fyi: https://blockscout.com/poa/xdai/address/0x29b9a7fBb8995b2423a71cC17cf9810798F6C543/read-contract

llunaCreixent commented 3 years ago

If someone completes the signup after being trusted by three other people, and after that this someone is untrusted by one of those three initial trusters, is this person unsignedup?

adzialocha commented 3 years ago

If someone completes the signup after being trusted by three other people, and after that this someone is untrusted by one of those three initial trusters, is this person unsignedup?

Thats theoretically possible but needs to happen within a small time-window. The flow is the following:

So, if the trust connection check fails, nothing will happen and the user has to get the missing trust connection again.