{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":477694383,"defaultBranch":"main","name":"services","ownerLogin":"cowprotocol","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-04-04T12:39:03.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/102358895?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1725565076.0","currentOid":""},"activityList":{"items":[{"before":"63e95f3f68d7a921f24c00a92bb14975b0f0453b","after":null,"ref":"refs/heads/fix-jit-orders-conversion","pushedAt":"2024-09-05T19:37:56.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"}},{"before":"ed09b91d4f0d8dd89c8fe16feed92be31e0a181b","after":"e05fe20db9b9e3166065cb382c30ae5b89cb5773","ref":"refs/heads/main","pushedAt":"2024-09-05T19:37:54.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"Fix jit orders conversion (#2949)\n\n# Description\r\nFixes the conversion from JIT order to `model::Order`.\r\n\r\n# Changes\r\n\r\n\r\n- [ ] JIT orders are now Liquidity orders. This can be used now to\r\nrecognize JIT orders at the API level. @fhenneke\r\n- [ ] Populates `settlement_contract` field. \r\n\r\n`settlement_contract` is hardcoded. Although easiest, this is bad for at\r\nleast two reasons:\r\n1. When settlement contract is redeployed, this will be a bug.\r\n2. Not testable. e2e test infrastructure might have a different address\r\nfor settlement contract etc.\r\n\r\nOverall just seems wrong. Alternative is to add a new field to\r\n`jit_orders` database table and populate it from autopilot. Some effort\r\nto just pass around the field that is not used that much anyway 🤷♂️\r\n\r\nLet me know WDYT.\r\n\r\n## How to test\r\nExisting tests.","shortMessageHtmlLink":"Fix jit orders conversion (#2949)"}},{"before":"8653759b6f448f1cec4824a772f26c76b33ea66f","after":"9aa5b34dd3afadacc3bf825c6cf043e7bd28af4d","ref":"refs/heads/fix-flaky-test","pushedAt":"2024-09-05T16:58:16.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"MartinquaXD","name":"Martin Beckmann","path":"/MartinquaXD","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19190235?s=80&v=4"},"commit":{"message":"Mint blocks to flush out cached liquidity","shortMessageHtmlLink":"Mint blocks to flush out cached liquidity"}},{"before":"dd19d18ec39ae1d3ece382af2eda8c2fcecc2dd3","after":"8653759b6f448f1cec4824a772f26c76b33ea66f","ref":"refs/heads/fix-flaky-test","pushedAt":"2024-09-05T16:50:26.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"MartinquaXD","name":"Martin Beckmann","path":"/MartinquaXD","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19190235?s=80&v=4"},"commit":{"message":"Mint blocks to flush out cached liquidity","shortMessageHtmlLink":"Mint blocks to flush out cached liquidity"}},{"before":null,"after":"dd19d18ec39ae1d3ece382af2eda8c2fcecc2dd3","ref":"refs/heads/fix-flaky-test","pushedAt":"2024-09-05T15:49:26.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"MartinquaXD","name":"Martin Beckmann","path":"/MartinquaXD","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19190235?s=80&v=4"},"commit":{"message":"Fix flaky test","shortMessageHtmlLink":"Fix flaky test"}},{"before":null,"after":"c6c62713ffaf3c657f34dce640f56aa95fd3fc0c","ref":"refs/heads/maybe-cache-simplification","pushedAt":"2024-09-05T15:19:32.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"MartinquaXD","name":"Martin Beckmann","path":"/MartinquaXD","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19190235?s=80&v=4"},"commit":{"message":"Maybe a bit of a simplification for the incremental cache","shortMessageHtmlLink":"Maybe a bit of a simplification for the incremental cache"}},{"before":null,"after":"63e95f3f68d7a921f24c00a92bb14975b0f0453b","ref":"refs/heads/fix-jit-orders-conversion","pushedAt":"2024-09-05T14:28:50.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"Fix jit orders conversion","shortMessageHtmlLink":"Fix jit orders conversion"}},{"before":"ac250e7542e643709cb6b7787e575f6a711449ef","after":null,"ref":"refs/heads/2831/improve-auction-update","pushedAt":"2024-09-05T14:23:21.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"}},{"before":"12aa87b8d52077df66f91d7f4d1fc8ff86b9040b","after":"ed09b91d4f0d8dd89c8fe16feed92be31e0a181b","ref":"refs/heads/main","pushedAt":"2024-09-05T14:23:20.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Incremental solvable orders cache update (#2923)\n\n# Description\r\n> Updating solvable orders (ie creating a new auction) currently takes\r\n>2s with some pretty heavy outliers\r\n([logs](https://production-6de61f.kb.eu-central-1.aws.cloud.es.io/app/r/s/ALsEK))\r\n> \r\n> This makes it hard to bring CoW protocol's auction rate down to one\r\nbatch per block as simply creating up to date state would take >15% of\r\nthe total time we have at hand. We should at least be able to half this\r\ntime (if not getting it down even more)\r\n\r\nIn order to relieve the situation, it was proposed to introduce\r\nincremental solvable orders cache update, which selects all the solvable\r\norders using the old heavy query only at startup, stores the latest\r\nreceived order's creation timestamp in memory, and then makes much\r\nfaster incremental bounded queries to the orders and additional tables\r\nthat select fewer data and executes faster.\r\n\r\n# Changes\r\n\r\nSince incremental fetching retrieves orders created/cancelled after the\r\nspecific timestamps, it is also required now to fetch orders that have\r\nany onchain update based on the last fetched block number. Having said\r\nthat, the data needs to be fetched within a single TX, so there is no\r\nway to run all the queries in parallel.\r\n\r\n1. If the current solvable orders cache is empty, execute the original\r\nheavy SQL query to fetch all current solvable orders and store them in\r\nmemory.\r\n2. Otherwise, fetch full orders that created or cancelled after the last\r\nstored timestamp and also find UIDs of the order that have any onchain\r\ndata updated after the latest observed block number. This includes\r\nfetching data from the following tables: trades, ethflow_data,\r\norder_execution, invalidations, onchain_order_invalidations,\r\nonchain_placed_orders, presignature_events.\r\n3. Fetch quotes for all the collected orders.\r\n4. Add all the newly received orders to the cache.\r\n5. Filter out all the orders that are one of: contain on-chain errors,\r\nexpired, fulfilled, invalidated.\r\n6. Calculate the latest observed order creation timestamp.\r\n7. Continue with the regular auction creation process.\r\n\r\nAs a result, we now have 3 SQL queries where each executes in ~50ms\r\ninstead of a single one taking ~2s.\r\n\r\n## How to test\r\nNew DB tests. Existing e2e tests.\r\n\r\n## Related Issues\r\n\r\nFixes #2831","shortMessageHtmlLink":"Incremental solvable orders cache update (#2923)"}},{"before":"9438fa095dce188e23d0d809718702d75d8a522c","after":"ac250e7542e643709cb6b7787e575f6a711449ef","ref":"refs/heads/2831/improve-auction-update","pushedAt":"2024-09-05T14:16:57.000Z","pushType":"push","commitsCount":3,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Merge branch 'main' into 2831/improve-auction-update","shortMessageHtmlLink":"Merge branch 'main' into 2831/improve-auction-update"}},{"before":"bfb99989968be65735215ed066e870542053207a","after":null,"ref":"refs/heads/update-banned-users-in-background","pushedAt":"2024-09-05T13:49:28.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"}},{"before":"521a7b4aa30498c41103adad34aadf25275e4320","after":"12aa87b8d52077df66f91d7f4d1fc8ff86b9040b","ref":"refs/heads/main","pushedAt":"2024-09-05T13:49:27.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Banned users filtering maintenance task (#2937)\n\n# Description\r\nBanned user filtering is now part of the auction update critical path\r\nand sometimes takes too much time.\r\n\r\n![image](https://github.com/user-attachments/assets/678f769c-48c7-43b3-b4a0-904a7aaad5f7)\r\n\r\n# Changes\r\n\r\nTo speed things up, a background maintenance task is introduced that\r\nperiodically re-checks for the address's banned status. Doesn't clean\r\nthe cache, so it can grow indefinitely.\r\n\r\nAlso, switches to `RwLock` to avoid thread blocking since the cache is\r\nused in the orderbook's `/quote` endpoint.\r\n\r\n## How to test\r\nNew DB test. Existing e2e tests.","shortMessageHtmlLink":"Banned users filtering maintenance task (#2937)"}},{"before":"c724e35086423683885f16bb30c5790b17441767","after":"9438fa095dce188e23d0d809718702d75d8a522c","ref":"refs/heads/2831/improve-auction-update","pushedAt":"2024-09-05T13:25:05.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Naming","shortMessageHtmlLink":"Naming"}},{"before":null,"after":"7df80b4ea6f77777731a9fca35393ee691436836","ref":"refs/heads/exclude-non-jit-orders","pushedAt":"2024-09-05T13:18:09.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"Exclude user orders","shortMessageHtmlLink":"Exclude user orders"}},{"before":"cd23277832d6410d905086c80dae25db6f1df558","after":"bfb99989968be65735215ed066e870542053207a","ref":"refs/heads/update-banned-users-in-background","pushedAt":"2024-09-05T13:06:22.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Merge branch 'main' into update-banned-users-in-background","shortMessageHtmlLink":"Merge branch 'main' into update-banned-users-in-background"}},{"before":"2546ba1ee3e5b92c3fe63d63307179c5e8063ac6","after":"cd23277832d6410d905086c80dae25db6f1df558","ref":"refs/heads/update-banned-users-in-background","pushedAt":"2024-09-05T11:56:49.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Get rid of UserMetadata impl","shortMessageHtmlLink":"Get rid of UserMetadata impl"}},{"before":"0baf80c838faa8aca4e99773f37505b5c58467d3","after":"adaf2e0d0f89f3dfd8e1a66ab416a1112ac650f7","ref":"refs/heads/breakdown-fees-protocol","pushedAt":"2024-09-05T11:16:53.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"martin's review comments","shortMessageHtmlLink":"martin's review comments"}},{"before":null,"after":"b796c7663eb019264af2ab1196dd16bcdfb04c28","ref":"refs/heads/ilya/2946","pushedAt":"2024-09-05T10:54:57.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Drop tokens hashmap","shortMessageHtmlLink":"Drop tokens hashmap"}},{"before":null,"after":"b57efc6da106da808464e9735f5c02e166fd82ac","ref":"refs/heads/ilya/2938","pushedAt":"2024-09-05T10:53:37.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"revert log change","shortMessageHtmlLink":"revert log change"}},{"before":"48ff3748e09b51ab736adfe534e847086e62f2cc","after":null,"ref":"refs/heads/jit-orders-by-tx","pushedAt":"2024-09-05T09:17:01.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"}},{"before":"cafe3936a552a91173149861e49a4aa9b0e4369a","after":"521a7b4aa30498c41103adad34aadf25275e4320","ref":"refs/heads/main","pushedAt":"2024-09-05T09:17:00.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"Get JIT orders by tx (#2941)\n\n# Description\r\nA follow up for https://github.com/cowprotocol/services/pull/2920\r\n\r\nImplements\r\n[https://api.cow.fi/mainnet/api/v1/transactions/{tx_hash}/orders](https://api.cow.fi/docs/#/default/get_api_v1_transactions__txHash__orders)\r\nfor JIT orders.\r\n\r\n# Changes\r\n\r\n\r\n- [ ] implemented `get_by_tx` database function to retrieve all jit\r\norders in a transaction\r\n- [ ] expanded orderbook api function `orders_for_tx` to return jit\r\norders as well\r\n\r\n## How to test\r\nupdated e2e test\r\n\r\n","shortMessageHtmlLink":"Get JIT orders by tx (#2941)"}},{"before":"1f94ebe141743e79a3045709b6cba7ca6277c2c5","after":"c724e35086423683885f16bb30c5790b17441767","ref":"refs/heads/2831/improve-auction-update","pushedAt":"2024-09-05T09:11:36.000Z","pushType":"push","commitsCount":4,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Merge branch 'main' into 2831/improve-auction-update","shortMessageHtmlLink":"Merge branch 'main' into 2831/improve-auction-update"}},{"before":"e7fd86e82edf9090ddf32ec7f61d26da51e70f9c","after":"48ff3748e09b51ab736adfe534e847086e62f2cc","ref":"refs/heads/jit-orders-by-tx","pushedAt":"2024-09-05T09:11:13.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"renaming","shortMessageHtmlLink":"renaming"}},{"before":"835f94f4736414f8c4b1a5e91622889cd05753f5","after":"854655c0566d8364b74e8609a8e874fb731cbeec","ref":"refs/heads/speed-up-autopilot-balance-fetching","pushedAt":"2024-09-05T09:07:43.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Merge branch 'main' into speed-up-autopilot-balance-fetching","shortMessageHtmlLink":"Merge branch 'main' into speed-up-autopilot-balance-fetching"}},{"before":"49b25d819ad64d09951b6c1eeeb84f735216f6dc","after":"2546ba1ee3e5b92c3fe63d63307179c5e8063ac6","ref":"refs/heads/update-banned-users-in-background","pushedAt":"2024-09-05T09:07:09.000Z","pushType":"push","commitsCount":9,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Merge branch 'main' into update-banned-users-in-background","shortMessageHtmlLink":"Merge branch 'main' into update-banned-users-in-background"}},{"before":"d056944b5b8096ebcfb715c205ea46d898666b55","after":"835f94f4736414f8c4b1a5e91622889cd05753f5","ref":"refs/heads/speed-up-autopilot-balance-fetching","pushedAt":"2024-09-05T09:05:26.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Drop tokens hashmap","shortMessageHtmlLink":"Drop tokens hashmap"}},{"before":"319ed1a795d6c15817d1f365e6e93ff682953c95","after":"e7fd86e82edf9090ddf32ec7f61d26da51e70f9c","ref":"refs/heads/jit-orders-by-tx","pushedAt":"2024-09-05T09:01:40.000Z","pushType":"push","commitsCount":4,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"Merge branch 'main' into jit-orders-by-tx","shortMessageHtmlLink":"Merge branch 'main' into jit-orders-by-tx"}},{"before":"8de3332a939540bdee87f82d03f7cff5e233ac96","after":"49b25d819ad64d09951b6c1eeeb84f735216f6dc","ref":"refs/heads/update-banned-users-in-background","pushedAt":"2024-09-05T09:00:40.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Update doc","shortMessageHtmlLink":"Update doc"}},{"before":"aeb31fc895ebdf51ec1f6e97a4bad5fea67c6615","after":"8de3332a939540bdee87f82d03f7cff5e233ac96","ref":"refs/heads/update-banned-users-in-background","pushedAt":"2024-09-05T08:59:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"squadgazzz","name":"ilya","path":"/squadgazzz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/22964585?s=80&v=4"},"commit":{"message":"Update doc","shortMessageHtmlLink":"Update doc"}},{"before":"9e19c5b32eb6081d68562e1c1109e27f6bb10540","after":"319ed1a795d6c15817d1f365e6e93ff682953c95","ref":"refs/heads/jit-orders-by-tx","pushedAt":"2024-09-05T08:57:12.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"sunce86","name":"Dusan Stanivukovic","path":"/sunce86","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/19595624?s=80&v=4"},"commit":{"message":"parallel","shortMessageHtmlLink":"parallel"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAErjskQAA","startCursor":null,"endCursor":null}},"title":"Activity · cowprotocol/services"}