-
Notifications
You must be signed in to change notification settings - Fork 118
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: add bnsImportUpdate to event emitter to fix BNS import test #1491
Conversation
…n both imports finish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this PR's name to something like
"fix: add bnsImportUpdate to event emitter to fix BNS import test"
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to merge after addressing the latest feedback
## [7.0.0-beta.1](v6.2.1...v7.0.0-beta.1) (2023-01-10) ### ⚠ BREAKING CHANGES * a sync from genesis is required to use with a Stacks v2.1-rc node ### Features * **agg-paging-limits:** aggregated all paging query limits ([#1401](#1401)) ([0203d36](0203d36)), closes [#1379](#1379) [#1379](#1379) * Stacks 2.1 support ([#1498](#1498)) ([dcbdfb9](dcbdfb9)), closes [#1279](#1279) [#1280](#1280) [#1283](#1283) [#1285](#1285) [#1289](#1289) [#1290](#1290) [#1295](#1295) [#1339](#1339) [#1363](#1363) [#1367](#1367) [#1372](#1372) [#1413](#1413) [#1449](#1449) [#1205](#1205) [#1197](#1197) [#1206](#1206) [#1179](#1179) [#1190](#1190) [#1167](#1167) [#1363](#1363) [#1193](#1193) [#1162](#1162) [#1216](#1216) [#1289](#1289) [#1290](#1290) [#1241](#1241) [#1168](#1168) [#1218](#1218) [#1339](#1339) [#1413](#1413) [#1283](#1283) [#1280](#1280) [#1285](#1285) [#1403](#1403) [#1456](#1456) [#1454](#1454) [#1454](#1454) [#1456](#1456) [#1403](#1403) [#1461](#1461) [#1476](#1476) [#1329](#1329) [#1287](#1287) [#1476](#1476) [#1366](#1366) [#1304](#1304) [#1331](#1331) [#1332](#1332) [#1379](#1379) [#1379](#1379) [#1355](#1355) [#1287](#1287) [#1389](#1389) [#1323](#1323) [#1368](#1368) [#1348](#1348) [#1314](#1314) [#1303](#1303) [#1425](#1425) [#1334](#1334) [#1309](#1309) [#1445](#1445) [#1374](#1374) [#1345](#1345) [#1353](#1353) [#1433](#1433) [#1424](#1424) [#1427](#1427) [#1301](#1301) [#1458](#1458) [#1379](#1379) [#1270](#1270) [#1324](#1324) [#1356](#1356) [#1360](#1360) [#1315](#1315) [#1326](#1326) [#1440](#1440) [#1351](#1351) [#1410](#1410) [#1337](#1337) [#1420](#1420) [#1328](#1328) [#1329](#1329) [#1343](#1343) [#1329](#1329) [#1495](#1495) ### Bug Fixes * add bnsImportUpdate to event emitter to fix BNS import test ([#1491](#1491)) ([2f9cb0c](2f9cb0c)) * guarantee db is empty before performing a replay ([#1374](#1374)) ([ef8e7a9](ef8e7a9)) * lint docs ci dependencies ([#1458](#1458)) ([90d0c7b](90d0c7b)) * make query limits backwards compatible ([#1509](#1509)) ([a0cebf5](a0cebf5)) * reorg txs by inserting txs that are missing from the mempool table ([#1429](#1429)) ([a512511](a512511)) * synthetic tx parsing for pox2 bitcoin-ops ([#1505](#1505)) ([720dc87](720dc87)) ### Miscellaneous Chores * support for Stacks 2.1 ([e88ec29](e88ec29))
## [7.0.0-beta.1](v6.2.1...v7.0.0-beta.1) (2023-01-10) ### ⚠ BREAKING CHANGES * a sync from genesis is required to use with a Stacks v2.1-rc node ### Features * **agg-paging-limits:** aggregated all paging query limits ([#1401](#1401)) ([0203d36](0203d36)), closes [#1379](#1379) [#1379](#1379) * Stacks 2.1 support ([#1498](#1498)) ([dcbdfb9](dcbdfb9)), closes [#1279](#1279) [#1280](#1280) [#1283](#1283) [#1285](#1285) [#1289](#1289) [#1290](#1290) [#1295](#1295) [#1339](#1339) [#1363](#1363) [#1367](#1367) [#1372](#1372) [#1413](#1413) [#1449](#1449) [#1205](#1205) [#1197](#1197) [#1206](#1206) [#1179](#1179) [#1190](#1190) [#1167](#1167) [#1363](#1363) [#1193](#1193) [#1162](#1162) [#1216](#1216) [#1289](#1289) [#1290](#1290) [#1241](#1241) [#1168](#1168) [#1218](#1218) [#1339](#1339) [#1413](#1413) [#1283](#1283) [#1280](#1280) [#1285](#1285) [#1403](#1403) [#1456](#1456) [#1454](#1454) [#1454](#1454) [#1456](#1456) [#1403](#1403) [#1461](#1461) [#1476](#1476) [#1329](#1329) [#1287](#1287) [#1476](#1476) [#1366](#1366) [#1304](#1304) [#1331](#1331) [#1332](#1332) [#1379](#1379) [#1379](#1379) [#1355](#1355) [#1287](#1287) [#1389](#1389) [#1323](#1323) [#1368](#1368) [#1348](#1348) [#1314](#1314) [#1303](#1303) [#1425](#1425) [#1334](#1334) [#1309](#1309) [#1445](#1445) [#1374](#1374) [#1345](#1345) [#1353](#1353) [#1433](#1433) [#1424](#1424) [#1427](#1427) [#1301](#1301) [#1458](#1458) [#1379](#1379) [#1270](#1270) [#1324](#1324) [#1356](#1356) [#1360](#1360) [#1315](#1315) [#1326](#1326) [#1440](#1440) [#1351](#1351) [#1410](#1410) [#1337](#1337) [#1420](#1420) [#1328](#1328) [#1329](#1329) [#1343](#1343) [#1329](#1329) [#1495](#1495) ### Bug Fixes * add bnsImportUpdate to event emitter to fix BNS import test ([#1491](#1491)) ([2f9cb0c](2f9cb0c)) * guarantee db is empty before performing a replay ([#1374](#1374)) ([ef8e7a9](ef8e7a9)) * lint docs ci dependencies ([#1458](#1458)) ([90d0c7b](90d0c7b)) * make query limits backwards compatible ([#1509](#1509)) ([a0cebf5](a0cebf5)) * reorg txs by inserting txs that are missing from the mempool table ([#1429](#1429)) ([a512511](a512511)) * synthetic tx parsing for pox2 bitcoin-ops ([#1505](#1505)) ([720dc87](720dc87)) ### Miscellaneous Chores * support for Stacks 2.1 ([e88ec29](e88ec29))
🎉 This PR is included in version 7.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [7.0.0](v6.3.4...v7.0.0) (2023-02-07) ### ⚠ BREAKING CHANGES * support for upcoming Stacks 2.1 features, event-replay required; * a sync from genesis is required to use with a Stacks v2.1-rc node ### Features * [Stacks 2.1] `delegate-stx` Bitcoin-op parsing ([#1527](#1527)) ([ea01587](ea01587)) * **agg-paging-limits:** aggregated all paging query limits ([#1401](#1401)) ([0203d36](0203d36)), closes [#1379](#1379) [#1379](#1379) * Stacks 2.1 support ([#1498](#1498)) ([dcbdfb9](dcbdfb9)), closes [#1279](#1279) [#1280](#1280) [#1283](#1283) [#1285](#1285) [#1289](#1289) [#1290](#1290) [#1295](#1295) [#1339](#1339) [#1363](#1363) [#1367](#1367) [#1372](#1372) [#1413](#1413) [#1449](#1449) [#1205](#1205) [#1197](#1197) [#1206](#1206) [#1179](#1179) [#1190](#1190) [#1167](#1167) [#1363](#1363) [#1193](#1193) [#1162](#1162) [#1216](#1216) [#1289](#1289) [#1290](#1290) [#1241](#1241) [#1168](#1168) [#1218](#1218) [#1339](#1339) [#1413](#1413) [#1283](#1283) [#1280](#1280) [#1285](#1285) [#1403](#1403) [#1456](#1456) [#1454](#1454) [#1454](#1454) [#1456](#1456) [#1403](#1403) [#1461](#1461) [#1476](#1476) [#1329](#1329) [#1287](#1287) [#1476](#1476) [#1366](#1366) [#1304](#1304) [#1331](#1331) [#1332](#1332) [#1379](#1379) [#1379](#1379) [#1355](#1355) [#1287](#1287) [#1389](#1389) [#1323](#1323) [#1368](#1368) [#1348](#1348) [#1314](#1314) [#1303](#1303) [#1425](#1425) [#1334](#1334) [#1309](#1309) [#1445](#1445) [#1374](#1374) [#1345](#1345) [#1353](#1353) [#1433](#1433) [#1424](#1424) [#1427](#1427) [#1301](#1301) [#1458](#1458) [#1379](#1379) [#1270](#1270) [#1324](#1324) [#1356](#1356) [#1360](#1360) [#1315](#1315) [#1326](#1326) [#1440](#1440) [#1351](#1351) [#1410](#1410) [#1337](#1337) [#1420](#1420) [#1328](#1328) [#1329](#1329) [#1343](#1343) [#1329](#1329) [#1495](#1495) ### Bug Fixes * add bnsImportUpdate to event emitter to fix BNS import test ([#1491](#1491)) ([2f9cb0c](2f9cb0c)) * build rosetta with node 16 ([654b64f](654b64f)) * datastore tests ([bb96507](bb96507)) * guarantee db is empty before performing a replay ([#1374](#1374)) ([ef8e7a9](ef8e7a9)) * lint docs ci dependencies ([#1458](#1458)) ([90d0c7b](90d0c7b)) * make query limits backwards compatible ([#1509](#1509)) ([a0cebf5](a0cebf5)) * prevent token metadata processor from blocking api launch ([#1514](#1514)) ([63da7e1](63da7e1)) * reorg txs by inserting txs that are missing from the mempool table ([#1429](#1429)) ([a512511](a512511)) * synthetic tx parsing for pox2 bitcoin-ops ([#1505](#1505)) ([720dc87](720dc87)) * test tx types ([11b9013](11b9013)) * use correct `pox-addr` arg while parsing `stack-stx` bitcoin-op [#415](#415) ([#1533](#1533)) ([ab14ad5](ab14ad5)) * use pg bigint for `pox_v1_unlock_height` column ([#1521](#1521)) ([d3fd685](d3fd685)) ### Miscellaneous Chores * note for Stacks 2.1 support and major version bump ([d27f956](d27f956)) * support for Stacks 2.1 ([e88ec29](e88ec29))
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixing bns test
I verified again that the bns middleware is working asynchronously via breakpoints. When making two consecutive requests, I saw the runtime switch between running the asyn tasks in the bns middleware and working on a second request.
The issue I saw was that the processing of the 1st genesis block, specifically the update db step, is taking a long time, a couple minutes sometimes. I observed the actual bns import taking only a few seconds (considering the small test bns data) Because bns tests have a timeout of 60 seconds, the test times out.
Increasing the general timeout time for bns tests could leave to much longer build times.
In this PR, I fixed the test by making bns import an event that could be listened to, thereby eliminating the need to use an arbitrary timeout using settimeout