ethers.js: estimateGas Error: failed to meet quorum
Might be duplicate of #841 I often receive this error when I try to estimate gas for my transaction. Most of the times it works but often times it throws error shown below.
I’m using ethers v5.0.8
Error: failed to meet quorum (method="estimateGas", params={"transaction":{"from":"0xB660b10a922815667F0303576750FDBC6943e44a","gasPrice":{"_hex":"0x113abe6400","_isBigNumber":true},"to":"0xA0940f0388601f96D8885292A711C25665e325c8","value":{"_hex":"0x00","_isBigNumber":true},"data":"0xa4240de669667648dbfd2cc0c1fb5f7fe69d462710198881d53e833a8f64e071c6eca88a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}, results=[{"provider":{"_isProvider":true,"_events":[],"_emitted":{"block":-2},"formatter":{"formats":{"transaction":{},"transactionRequest":{},"receiptLog":{},"receipt":{},"block":{},"blockWithTransactions":{},"filter":{},"filterLog":{}}},"anyNetwork":false,"_network":{"name":"ropsten","chainId":3,"ensAddress":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},"_maxInternalBlockNumber":8574134,"_lastBlockNumber":-2,"_pollingInterval":4000,"_fastQueryDate":1598509028628,"connection":{"url":"https://ropsten.infura.io/v3/639f0c409d61483e8d1b68e22b62f717"},"_nextId":485,"apiKey":"639f0c409d61483e8d1b68e22b62f717","projectId":"639f0c409d61483e8d1b68e22b62f717","projectSecret":null,"_internalBlockNumber":{},"_fastBlockNumber":8574134,"_fastBlockNumberPromise":{}},"weight":1,"start":1598511087181,"error":{"reason":"processing response error","code":"SERVER_ERROR","body":{"0":123,"1":34,"2":106,"3":115,"4":111,"5":110,"6":114,"7":112,"8":99,"9":34,"10":58,"11":34,"12":50,"13":46,"14":48,"15":34,"16":44,"17":34,"18":105,"19":100,"20":34,"21":58,"22":52,"23":56,"24":52,"25":44,"26":34,"27":101,"28":114,"29":114,"30":111,"31":114,"32":34,"33":58,"34":123,"35":34,"36":99,"37":111,"38":100,"39":101,"40":34,"41":58,"42":45,"43":51,"44":50,"45":48,"46":48,"47":48,"48":44,"49":34,"50":109,"51":101,"52":115,"53":115,"54":97,"55":103,"56":101,"57":34,"58":58,"59":34,"60":103,"61":97,"62":115,"63":32,"64":114,"65":101,"66":113,"67":117,"68":105,"69":114,"70":101,"71":100,"72":32,"73":101,"74":120,"75":99,"76":101,"77":101,"78":100,"79":115,"80":32,"81":97,"82":108,"83":108,"84":111,"85":119,"86":97,"87":110,"88":99,"89":101,"90":32,"91":40,"92":56,"93":48,"94":48,"95":48,"96":48,"97":48,"98":48,"99":41,"100":32,"101":111,"102":114,"103":32,"104":97,"105":108,"106":119,"107":97,"108":121,"109":115,"110":32,"111":102,"112":97,"113":105,"114":108,"115":105,"116":110,"117":103,"118":32,"119":116,"120":114,"121":97,"122":110,"123":115,"124":97,"125":99,"126":116,"127":105,"128":111,"129":110,"130":34,"131":125,"132":125},"error":{"code":-32000},"requestBody":{"0":123,"1":34,"2":109,"3":101,"4":116,"5":104,"6":111,"7":100,"8":34,"9":58,"10":34,"11":101,"12":116,"13":104,"14":95,"15":101,"16":115,"17":116,"18":105,"19":109,"20":97,"21":116,"22":101,"23":71,"24":97,"25":115,"26":34,"27":44,"28":34,"29":112,"30":97,"31":114,"32":97,"33":109,"34":115,"35":34,"36":58,"37":91,"38":123,"39":34,"40":103,"41":97,"42":115,"43":80,"44":114,"45":105,"46":99,"47":101,"48":34,"49":58,"50":34,"51":48,"52":120,"53":49,"54":49,"55":51,"56":97,"57":98,"58":101,"59":54,"60":52,"61":48,"62":48,"63":34,"64":44,"65":34,"66":118,"67":97,"68":108,"69":117,"70":101,"71":34,"72":58,"73":34,"74":48,"75":120,"76":48,"77":34,"78":44,"79":34,"80":102,"81":114,"82":111,"83":109,"84":34,"85":58,"86":34,"87":48,"88":120,"89":98,"90":54,"91":54,"92":48,"93":98,"94":49,"95":48,"96":97,"97":57,"98":50,"99":50,"100":56,"101":49,"102":53,"103":54,"104":54,"105":55,"106":102,"107":48,"108":51,"109":48,"110":51,"111":53,"112":55,"113":54,"114":55,"115":53,"116":48,"117":102,"118":100,"119":98,"120":99,"121":54,"122":57,"123":52,"124":51,"125":101,"126":52,"127":52,"128":97,"129":34,"130":44,"131":34,"132":116,"133":111,"134":34,"135":58,"136":34,"137":48,"138":120,"139":97,"140":48,"141":57,"142":52,"143":48,"144":102,"145":48,"146":51,"147":56,"148":56,"149":54,"150":48,"151":49,"152":102,"153":57,"154":54,"155":100,"156":56,"157":56,"158":56,"159":53,"160":50,"161":57,"162":50,"163":97,"164":55,"165":49,"166":49,"167":99,"168":50,"169":53,"170":54,"171":54,"172":53,"173":101,"174":51,"175":50,"176":53,"177":99,"178":56,"179":34,"180":44,"181":34,"182":100,"183":97,"184":116,"185":97,"186":34,"187":58,"188":34,"189":48,"190":120,"191":97,"192":52,"193":50,"194":52,"195":48,"196":100,"197":101,"198":54,"199":54,"200":57,"201":54,"202":54,"203":55,"204":54,"205":52,"206":56,"207":100,"208":98,"209":102,"210":100,"211":50,"212":99,"213":99,"214":48,"215":99,"216":49,"217":102,"218":98,"219":53,"220":102,"221":55,"222":102,"223":101,"224":54,"225":57,"226":100,"227":52,"228":54,"229":50,"230":55,"231":49,"232":48,"233":49,"234":57,"235":56,"236":56,"237":56,"238":49,"239":100,"240":53,"241":51,"242":101,"243":56,"244":51,"245":51,"246":97,"247":56,"248":102,"249":54,"250":52,"251":101,"252":48,"253":55,"254":49,"255":99,"256":54,"257":101,"258":99,"259":97,"260":56,"261":56,"262":97,"263":48,"264":48,"265":48,"266":48,"267":48,"268":48,"269":48,"270":48,"271":48,"272":48,"273":48,"274":48,"275":48,"276":48,"277":48,"278":48,"279":48,"280":48,"281":48,"282":48,"283":48,"284":48,"285":48,"286":48,"287":48,"288":48,"289":48,"290":48,"291":48,"292":48,"293":48,"294":48,"295":48,"296":48,"297":48,"298":48,"299":48,"300":48,"301":48,"302":48,"303":48,"304":48,"305":48,"306":48,"307":48,"308":48,"309":48,"310":48,"311":48,"312":48,"313":48,"314":48,"315":48,"316":48,"317":48,"318":48,"319":48,"320":48,"321":48,"322":48,"323":48,"324":48,"325":56,"326":48,"327":48,"328":48,"329":48,"330":48,"331":48,"332":48,"333":48,"334":48,"335":48,"336":48,"337":48,"338":48,"339":48,"340":48,"341":48,"342":48,"343":48,"344":48,"345":48,"346":48,"347":48,"348":48,"349":48,"350":48,"351":48,"352":48,"353":48,"354":48,"355":48,"356":48,"357":48,"358":48,"359":48,"360":48,"361":48,"362":48,"363":48,"364":48,"365":48,"366":48,"367":48,"368":48,"369":48,"370":48,"371":48,"372":48,"373":48,"374":48,"375":48,"376":48,"377":48,"378":48,"379":48,"380":48,"381":48,"382":48,"383":48,"384":48,"385":48,"386":48,"387":48,"388":49,"389":54,"390":48,"391":48,"392":48,"393":48,"394":48,"395":48,"396":48,"397":48,"398":48,"399":48,"400":48,"401":48,"402":48,"403":48,"404":48,"405":48,"406":48,"407":48,"408":48,"409":48,"410":48,"411":48,"412":48,"413":48,"414":48,"415":48,"416":48,"417":48,"418":48,"419":48,"420":48,"421":48,"422":48,"423":48,"424":48,"425":48,"426":48,"427":48,"428":48,"429":48,"430":48,"431":48,"432":48,"433":48,"434":48,"435":48,"436":48,"437":48,"438":48,"439":48,"440":48,"441":48,"442":48,"443":48,"444":48,"445":48,"446":48,"447":48,"448":48,"449":48,"450":48,"451":48,"452":48,"453":48,"454":48,"455":48,"456":48,"457":48,"458":48,"459":48,"460":48,"461":48,"462":48,"463":48,"464":48,"465":48,"466":48,"467":48,"468":48,"469":48,"470":48,"471":48,"472":48,"473":48,"474":48,"475":48,"476":48,"477":48,"478":48,"479":48,"480":48,"481":48,"482":48,"483":48,"484":48,"485":48,"486":48,"487":48,"488":48,"489":48,"490":48,"491":48,"492":48,"493":48,"494":48,"495":48,"496":48,"497":48,"498":48,"499":48,"500":48,"501":48,"502":48,"503":48,"504":48,"505":48,"506":48,"507":48,"508":48,"509":48,"510":48,"511":48,"512":48,"513":48,"514":48,"515":48,"516":48,"517":48,"518":54,"519":48,"520":48,"521":48,"522":48,"523":48,"524":48,"525":48,"526":48,"527":48,"528":48,"529":48,"530":48,"531":48,"532":48,"533":48,"534":48,"535":48,"536":48,"537":48,"538":48,"539":48,"540":48,"541":48,"542":48,"543":48,"544":48,"545":48,"546":48,"547":48,"548":48,"549":48,"550":48,"551":48,"552":48,"553":48,"554":48,"555":48,"556":48,"557":48,"558":48,"559":48,"560":48,"561":48,"562":48,"563":48,"564":48,"565":48,"566":48,"567":48,"568":48,"569":48,"570":48,"571":48,"572":48,"573":48,"574":48,"575":48,"576":48,"577":48,"578":48,"579":48,"580":48,"581":48,"582":48,"583":48,"584":48,"585":48,"586":48,"587":48,"588":48,"589":48,"590":48,"591":48,"592":48,"593":48,"594":48,"595":48,"596":48,"597":48,"598":48,"599":48,"600":48,"601":48,"602":48,"603":48,"604":48,"605":48,"606":48,"607":48,"608":48,"609":48,"610":48,"611":48,"612":48,"613":48,"614":48,"615":48,"616":48,"617":48,"618":48,"619":48,"620":48,"621":48,"622":48,"623":48,"624":48,"625":48,"626":48,"627":48,"628":48,"629":48,"630":48,"631":48,"632":48,"633":48,"634":48,"635":48,"636":48,"637":48,"638":48,"639":48,"640":48,"641":48,"642":48,"643":48,"644":48,"645":48,"646":48,"647":48,"648":48,"649":48,"650":48,"651":48,"652":48,"653":48,"654":48,"655":48,"656":48,"657":48,"658":48,"659":48,"660":48,"661":48,"662":48,"663":48,"664":48,"665":48,"666":48,"667":48,"668":48,"669":48,"670":48,"671":48,"672":48,"673":48,"674":48,"675":48,"676":48,"677":48,"678":48,"679":48,"680":48,"681":48,"682":48,"683":48,"684":48,"685":48,"686":48,"687":48,"688":48,"689":48,"690":48,"691":48,"692":48,"693":48,"694":48,"695":48,"696":48,"697":48,"698":48,"699":48,"700":48,"701":48,"702":48,"703":48,"704":48,"705":48,"706":48,"707":48,"708":48,"709":48,"710":48,"711":48,"712":48,"713":48,"714":48,"715":48,"716":48,"717":48,"718":48,"719":48,"720":48,"721":48,"722":48,"723":48,"724":48,"725":48,"726":48,"727":48,"728":48,"729":48,"730":48,"731":48,"732":48,"733":48,"734":48,"735":48,"736":48,"737":48,"738":48,"739":48,"740":48,"741":48,"742":48,"743":48,"744":48,"745":48,"746":48,"747":48,"748":48,"749":48,"750":48,"751":48,"752":48,"753":48,"754":48,"755":48,"756":48,"757":48,"758":48,"759":48,"760":48,"761":48,"762":48,"763":48,"764":48,"765":48,"766":48,"767":48,"768":48,"769":48,"770":48,"771":48,"772":48,"773":48,"774":48,"775":48,"776":48,"777":48,"778":48,"779":48,"780":48,"781":48,"782":48,"783":48,"784":48,"785":48,"786":48,"787":48,"788":48,"789":48,"790":48,"791":48,"792":48,"793":48,"794":48,"795":48,"796":48,"797":48,"798":48,"799":48,"800":48,"801":48,"802":48,"803":48,"804":48,"805":48,"806":48,"807":48,"808":48,"809":48,"810":48,"811":48,"812":48,"813":48,"814":48,"815":48,"816":48,"817":48,"818":48,"819":48,"820":48,"821":48,"822":48,"823":48,"824":48,"825":48,"826":48,"827":48,"828":48,"829":48,"830":48,"831":48,"832":48,"833":48,"834":48,"835":48,"836":48,"837":48,"838":48,"839":48,"840":48,"841":48,"842":48,"843":48,"844":48,"845":48,"846":48,"847":48,"848":48,"849":48,"850":48,"851":48,"852":48,"853":48,"854":48,"855":48,"856":48,"857":48,"858":48,"859":48,"860":48,"861":48,"862":48,"863":48,"864":48,"865":48,"866":48,"867":48,"868":48,"869":48,"870":48,"871":48,"872":48,"873":48,"874":48,"875":48,"876":48,"877":48,"878":48,"879":48,"880":48,"881":48,"882":48,"883":48,"884":48,"885":48,"886":48,"887":48,"888":48,"889":48,"890":48,"891":48,"892":48,"893":48,"894":48,"895":48,"896":48,"897":48,"898":48,"899":48,"900":48,"901":48,"902":48,"903":48,"904":48,"905":48,"906":48,"907":48,"908":48,"909":48,"910":48,"911":48,"912":48,"913":48,"914":48,"915":48,"916":48,"917":48,"918":48,"919":48,"920":48,"921":48,"922":48,"923":48,"924":48,"925":48,"926":48,"927":48,"928":48,"929":48,"930":48,"931":48,"932":48,"933":48,"934":48,"935":48,"936":48,"937":48,"938":48,"939":48,"940":48,"941":48,"942":48,"943":48,"944":48,"945":48,"946":48,"947":48,"948":48,"949":48,"950":48,"951":48,"952":48,"953":48,"954":48,"955":48,"956":48,"957":48,"958":48,"959":48,"960":48,"961":48,"962":48,"963":48,"964":48,"965":48,"966":54,"967":48,"968":48,"969":48,"970":48,"971":48,"972":48,"973":48,"974":48,"975":48,"976":48,"977":48,"978":48,"979":48,"980":48,"981":48,"982":48,"983":48,"984":48,"985":48,"986":48,"987":48,"988":48,"989":48,"990":48,"991":48,"992":48,"993":48,"994":48,"995":48,"996":48,"997":48,"998":48,"999":48,"1000":48,"1001":48,"1002":48,"1003":48,"1004":48,"1005":48,"1006":48,"1007":48,"1008":48,"1009":48,"1010":48,"1011":48,"1012":48,"1013":48,"1014":48,"1015":48,"1016":48,"1017":48,"1018":48,"1019":48,"1020":48,"1021":48,"1022":48,"1023":48,"1024":48,"1025":48,"1026":48,"1027":48,"1028":48,"1029":48,"1030":48,"1031":48,"1032":48,"1033":48,"1034":48,"1035":48,"1036":48,"1037":48,"1038":48,"1039":48,"1040":48,"1041":48,"1042":48,"1043":48,"1044":48,"1045":48,"1046":48,"1047":48,"1048":48,"1049":48,"1050":48,"1051":48,"1052":48,"1053":48,"1054":48,"1055":48,"1056":48,"1057":48,"1058":48,"1059":48,"1060":48,"1061":48,"1062":48,"1063":48,"1064":48,"1065":48,"1066":48,"1067":48,"1068":48,"1069":48,"1070":48,"1071":48,"1072":48,"1073":48,"1074":48,"1075":48,"1076":48,"1077":48,"1078":48,"1079":48,"1080":48,"1081":48,"1082":48,"1083":48,"1084":48,"1085":48,"1086":48,"1087":48,"1088":48,"1089":48,"1090":48,"1091":48,"1092":48,"1093":48,"1094":48,"1095":48,"1096":48,"1097":48,"1098":48,"1099":48,"1100":48,"1101":48,"1102":48,"1103":48,"1104":48,"1105":48,"1106":48,"1107":48,"1108":48,"1109":48,"1110":48,"1111":48,"1112":48,"1113":48,"1114":48,"1115":48,"1116":48,"1117":48,"1118":48,"1119":48,"1120":48,"1121":48,"1122":48,"1123":48,"1124":48,"1125":48,"1126":48,"1127":48,"1128":48,"1129":48,"1130":48,"1131":48,"1132":48,"1133":48,"1134":48,"1135":48,"1136":48,"1137":48,"1138":48,"1139":48,"1140":48,"1141":48,"1142":48,"1143":48,"1144":48,"1145":48,"1146":48,"1147":48,"1148":48,"1149":48,"1150":48,"1151":48,"1152":48,"1153":48,"1154":48,"1155":48,"1156":48,"1157":48,"1158":48,"1159":48,"1160":48,"1161":48,"1162":48,"1163":48,"1164":48,"1165":48,"1166":48,"1167":48,"1168":48,"1169":48,"1170":48,"1171":48,"1172":48,"1173":48,"1174":48,"1175":48,"1176":48,"1177":48,"1178":48,"1179":48,"1180":48,"1181":48,"1182":48,"1183":48,"1184":48,"1185":48,"1186":48,"1187":48,"1188":48,"1189":48,"1190":48,"1191":48,"1192":48,"1193":48,"1194":48,"1195":48,"1196":48,"1197":48,"1198":48,"1199":48,"1200":48,"1201":48,"1202":48,"1203":48,"1204":48,"1205":48,"1206":48,"1207":48,"1208":48,"1209":48,"1210":48,"1211":48,"1212":48,"1213":48,"1214":48,"1215":48,"1216":48,"1217":48,"1218":48,"1219":48,"1220":48,"1221":48,"1222":48,"1223":48,"1224":48,"1225":48,"1226":48,"1227":48,"1228":48,"1229":48,"1230":48,"1231":48,"1232":48,"1233":48,"1234":48,"1235":48,"1236":48,"1237":48,"1238":48,"1239":48,"1240":48,"1241":48,"1242":48,"1243":48,"1244":48,"1245":48,"1246":48,"1247":48,"1248":48,"1249":48,"1250":48,"1251":48,"1252":48,"1253":48,"1254":48,"1255":48,"1256":48,"1257":48,"1258":48,"1259":48,"1260":48,"1261":48,"1262":48,"1263":48,"1264":48,"1265":48,"1266":48,"1267":48,"1268":48,"1269":48,"1270":48,"1271":48,"1272":48,"1273":48,"1274":48,"1275":48,"1276":48,"1277":48,"1278":48,"1279":48,"1280":48,"1281":48,"1282":48,"1283":48,"1284":48,"1285":48,"1286":48,"1287":48,"1288":48,"1289":48,"1290":48,"1291":48,"1292":48,"1293":48,"1294":48,"1295":48,"1296":48,"1297":48,"1298":48,"1299":48,"1300":48,"1301":48,"1302":48,"1303":48,"1304":48,"1305":48,"1306":48,"1307":48,"1308":48,"1309":48,"1310":48,"1311":48,"1312":48,"1313":48,"1314":48,"1315":48,"1316":48,"1317":48,"1318":48,"1319":48,"1320":48,"1321":48,"1322":48,"1323":48,"1324":48,"1325":48,"1326":48,"1327":48,"1328":48,"1329":48,"1330":48,"1331":48,"1332":48,"1333":48,"1334":48,"1335":48,"1336":48,"1337":48,"1338":48,"1339":48,"1340":48,"1341":48,"1342":48,"1343":48,"1344":48,"1345":48,"1346":48,"1347":48,"1348":48,"1349":48,"1350":48,"1351":34,"1352":125,"1353":93,"1354":44,"1355":34,"1356":105,"1357":100,"1358":34,"1359":58,"1360":52,"1361":56,"1362":52,"1363":44,"1364":34,"1365":106,"1366":115,"1367":111,"1368":110,"1369":114,"1370":112,"1371":99,"1372":34,"1373":58,"1374":34,"1375":50,"1376":46,"1377":48,"1378":34,"1379":125},"requestMethod":"POST","url":"https://ropsten.infura.io/v3/639f0c409d61483e8d1b68e22b62f717"}}], provider={"_isProvider":true,"_events":[],"_emitted":{"block":8574134,"t:0xcb8251a2845bcb85c9bf99e8934f09052afeb6bc177c0e04922ecebf07360d77":8574133},"formatter":{"formats":{"transaction":{},"transactionRequest":{},"receiptLog":{},"receipt":{},"block":{},"blockWithTransactions":{},"filter":{},"filterLog":{}}},"anyNetwork":false,"_network":{"name":"ropsten","chainId":3,"ensAddress":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},"_maxInternalBlockNumber":8574134,"_lastBlockNumber":8574134,"_pollingInterval":4000,"_fastQueryDate":1598509028628,"providerConfigs":[{"provider":{"_isProvider":true,"_events":[],"_emitted":{"block":-2},"formatter":{"formats":{"transaction":{},"transactionRequest":{},"receiptLog":{},"receipt":{},"block":{},"blockWithTransactions":{},"filter":{},"filterLog":{}}},"anyNetwork":false,"_network":{"name":"ropsten","chainId":3,"ensAddress":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},"_maxInternalBlockNumber":8574134,"_lastBlockNumber":-2,"_pollingInterval":4000,"_fastQueryDate":1598509028628,"connection":{"url":"https://ropsten.infura.io/v3/639f0c409d61483e8d1b68e22b62f717"},"_nextId":485,"apiKey":"639f0c409d61483e8d1b68e22b62f717","projectId":"639f0c409d61483e8d1b68e22b62f717","projectSecret":null,"_internalBlockNumber":{},"_fastBlockNumber":8574134,"_fastBlockNumberPromise":{}},"weight":1,"stallTimeout":750,"priority":1}],"quorum":0.5,"_highestBlockNumber":8574134,"_internalBlockNumber":{},"_fastBlockNumber":8574134,"_fastBlockNumberPromise":{},"_poller":null,"_bootstrapPoll":null}, code=SERVER_ERROR, version=providers/5.0.5)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 42 (14 by maintainers)
Commits related to this issue
- Better error forwarding from FallbackProvider (#1021). — committed to ethers-io/ethers.js by ricmoo 4 years ago
I’ve updated the JsonRpcProvider to better support detecting unpredictable gas errors and set a list of forwardable errors for the FallbackProvider. Since a quorum indicating unpredictable gas is actually a correct response.
I’m just testing locally and will put it up soon.
It shouldn’t remove any errors, but will make errors easier to understand and more importantly reflect the detectable standard blockchain errors ethers is designed to detect. 😃
I still need to look into the processing error, but making the error more readable was step 1. 😃
I’ll try getting a version out tomorrow that at least makes that error blob readable and somewhat concise. I think that’s step 1. 😃
Oh! I see what you mean. I didn’t realize the provider lines were different. I only copied the long lines. Now I’m guessing they were the same. I can try again later.
Yes, quorum only applies to FallbackProvider. 😃
Gas estimates with FallBackProvider are problematic. I often get 4 different results from the 4 different back-ends I use (My own parity node, Infura, Cloudflare, Alchemy) and therefore can’t reach a quorum of 2. I think the Fallback provider should return the median value among the responding back-ends.
Thank you very much, errors are nice and readable now.
I again reviewed this service code, seems like the issue was the same that I pointed a few days ago here
I have updated the service accordingly and not getting error since past 24 hours.
Thanks for the help @ricmoo & @zemse
Finally got the CI passing again (looks like GitHub removed lib-usb from their default linux distro?).
Anyways, try out 5.0.13, which should bubble better errors up for
call
andestimateGas
from all the backends, including the FallbackProvider.Let me know how it works out for you. 😃
I get a quorum error in both cases. <strike>How do you cause that in the contract?</strike>
I was planning to put some refactoring into the FallbackProvider, maybe it’s a good time to do that. I want to make the errors more concise, and favour errors that are more meaningful than just pick the first error.
Mainly I need to make quorum either a number of a more advanced callable, because Alchemy currently only allows a block range of 1000 for getLogs, so in the event the request is a getLogs beyond that range, I want to pull it from the quorum (for the default provider) since it will always throw an error…
So Vyper is intentionally not Turing complete, which is why they can do it. 😃
But many things can have their worst case computed, such as a token transfer. Worst case beyond logic the storage, which if it was zero costs 20k gas, if non-zero, 5k; so if you assume 20k you’re golden.
But it’s true though, many things don’t have a worst case. But you can still come up with reasonable assumptions. Or rely on estimateGas for things that iterate over loops and such. But keep in mind things that are unbound also become an attack vector. So, generally it’s best to try keeping real-time constraints in mind when writing a contract, or it is possible under normal use it may become unusable. 😃
I generally limit gas to out-going calls too (for things I don’t have control over), to prevent them from kicking me in the butt. Just another idea.
Gas is its own, and very important east in Ethereum. 😃
You don’t need a FallbackProvider. You could also use a FallbackProvider, but override the quorum to
1
. This would effectively say whatever backend responds first, use their answer.The value of the quorum is two-fold; a) prevents a single node from lying to you (through accident or malice) and b) keeps you app alive even if a backend is down.
If you only care about b), you can totally tune the quorum to a lower value. The default is half the backends, rounded up. So, with 3 backends, it would be 2. To override:
Does that help?