Commit graph

140 commits

Author SHA1 Message Date
ArchiBot
4c73a6bc8b
Automatic translations update 2023-07-03 02:23:45 +00:00
Archi
3f91b18a4d
Refactor confirmations
Make it so the design actually follows what Steam gives us now. There is no need for standalone Confirmation object anymore, rather re-use what Steam gives us. Optimize parsing type, expose it as public API. Small breaking change in HandleConfirmations() action.
2023-06-29 22:34:26 +02:00
Archi
d7722fae84
Misc code cleanup 2023-06-29 21:56:05 +02:00
ArchiBot
c30f7f9f0c
Automatic translations update 2023-06-28 02:23:42 +00:00
ArchiBot
76cc33cabf
Automatic translations update 2023-06-18 02:23:20 +00:00
Archi
57ac7e2816
Bullet-proof against invalid Steam items 2023-06-04 16:39:16 +02:00
Archi
09ff465f4a
Misc 2023-06-03 17:56:27 +02:00
Archi
cd8c9cf80e
Closes #2908 2023-06-03 17:50:50 +02:00
ArchiBot
bf8275d34a
Automatic translations update 2023-06-01 02:33:30 +00:00
Archi
def3bdf24a
Bump limit slightly 2023-05-31 15:39:42 +02:00
Archi
b39b64e11f
Add server-side limit of items also to client side 2023-05-31 15:32:56 +02:00
Jack Nolddor
db65ed7545
Minimize chances of TooManyOffersSent during MatchActively (#2904) 2023-05-28 12:50:37 +02:00
Archi
3006290170
Stop matching actively on disconnection 2023-05-23 14:28:30 +02:00
Archi
a557b62e0b
Fix for accounts without SG timestamp
Initially I added check against zero as bullet-proofing for unexpected events, but some accounts actually report 0.

Assume 0 is older than needed, if we don't have information available, we shouldn't jump to conclusions.
2023-05-18 12:01:48 +02:00
Archi
8c83b8c51f
Closes #2900 Closes #2901 2023-05-16 21:27:36 +02:00
ArchiBot
11a1c12f0c
Automatic translations update 2023-05-01 02:13:18 +00:00
ArchiBot
5892454ff4
Automatic translations update 2023-04-07 02:08:56 +00:00
ArchiBot
0b5a0875f6
Automatic translations update 2023-03-23 02:13:16 +00:00
ArchiBot
9e59dd69ca
Automatic translations update 2023-03-11 02:16:39 +00:00
Archi
f9efaed524
Misc 2023-02-23 17:20:08 +01:00
ArchiBot
afd1c89ca8
Automatic translations update 2023-02-23 02:21:14 +00:00
ArchiBot
5bdfab5fb2
Automatic translations update 2023-02-12 02:21:50 +00:00
Archi
d7e8710333
Do not announce/match with limited accounts, lockdowns and trade bans, improve ArchiCacheable
We can totally make use of success previously more often
2023-02-11 15:58:15 +01:00
ArchiBot
0da63aba2b
Automatic translations update 2023-02-10 02:48:29 +00:00
ArchiBot
7e11e62f92
Automatic translations update 2023-02-09 02:42:36 +00:00
Archi
8008a04354
Code cleanups and improvements
- Make use of new UnixFileMode, always one native method we need to maintain less
- Add madness support for it, because new feature of course
- Add optional netstandard target and required compatibility for it, so I can test netf-oriented changes easier
2023-02-09 02:25:11 +01:00
ArchiBot
1e328f8de8
Automatic translations update 2023-02-04 02:17:59 +00:00
ArchiBot
67e989b2a5
Automatic translations update 2023-02-01 02:24:04 +00:00
ArchiBot
b2871523c1
Automatic translations update 2023-01-26 02:19:40 +00:00
Sebastian Göls
0c125db118
Happy new year! (#2809) 2023-01-25 15:43:12 +01:00
Archi
4798b29bff
Misc 2023-01-24 23:00:27 +01:00
Archi
00f7d2bfb9
Closes #2787 2023-01-24 22:49:41 +01:00
Archi
e0f9fe3555
Skip empty nickname in self persona state callback 2023-01-24 01:29:55 +01:00
ArchiBot
7596a89baa
Automatic translations update 2023-01-22 02:20:35 +00:00
Archi
8ab6137ab1
Ensure we don't skip announcement if our trade token has changed
We don't care about nickname or avatar hash, even total amount of items is not that important, but trade token is crucial for matching
2023-01-21 23:23:08 +01:00
Archi
4cb8244353
Move to announce endpoint v3
By using ordered list for json body, we can further minimize amount of data sent by getting rid of the index.

We still need previous asset ID, as we send only a subset of real data and server is unable to calculate it from the data sent.
2023-01-21 20:32:42 +01:00
ArchiBot
bb58ec75f3
Automatic translations update 2023-01-19 02:36:34 +00:00
Archi
8aad8b6bcf
Misc 2023-01-18 23:11:17 +01:00
Archi
239d523513
Skip announcements during matching 2023-01-18 22:52:25 +01:00
Archi
bcfeb66ba4
Allow maximum of 10 pending to confirm trade offers at once 2023-01-18 14:16:35 +01:00
ArchiBot
1a26844cd8
Automatic translations update 2023-01-18 02:20:59 +00:00
Archi
28a3e27a5e
Account for failures in a row when sending trade offers
We expect those to be occassional, but getting 5 in a row from 5 different users, that's extremely suspicious
2023-01-17 19:42:29 +01:00
Archi
27639b32d5
Accept all confirmations from ItemsMatcher at once
Previously we accepted those after each trade, because the overhead of loading other inventory was too big to leave those pending. Since we have all possible matches at once now, it makes sense to firstly schedule all trade offers, and then just confirm them all at once, especially since confirmations endpoint is horrific and very often problematic, on top of having 10-seconds rate-limiting.
2023-01-17 19:19:27 +01:00
Archi
5049f82dad
Don't stop matching on occassional two factor failure 2023-01-17 19:00:31 +01:00
Łukasz Domeradzki
ca9cccf5da
Add support for request compression (#2805)
* Add support for brotli request compression

* Refactor and add support for netf

* Use fastest compression
2023-01-15 21:26:03 +01:00
Archi
fc93f86060
Improve preferences of matching
We should try to match smallest bots first, but since assets are deduplicated exclusively for us, we should use total inventory count instead
2023-01-15 01:04:15 +01:00
Archi
e5ff2e9f02
Include TotalInventoryCount for the backend 2023-01-15 00:16:53 +01:00
Archi
88cec38df4
Decrease overhead for calculating tradable sets for announcement
We don't care about classIDs there, only amounts
2023-01-14 23:57:45 +01:00
Archi
8e7d05ce5c
Skip untradable items for MatchEverything bots 2023-01-14 23:41:25 +01:00
Archi
eada4356f7
Remove MinItemsCount requirement 2023-01-14 23:08:13 +01:00
Archi
ca06d03475
Relax listing requirement
We no longer require 100 tradable items, but rather, 100 total items. We can also further optimize the payload by removing assets where we have no tradable items at all.
2023-01-14 22:24:21 +01:00
Archi
e6e82e19bd
Cut excessive data from announcement
Now that we don't need to transmit whole inventory to the backend anymore, we can cut it to matchable types only
2023-01-14 15:08:28 +01:00
Archi
55f7235a32
Misc 2023-01-13 17:16:15 +01:00
Archi
84be0f8077
Misc
We can save some excessive memory I guess
2023-01-12 11:47:45 +01:00
Archi
8cc705feff
Skip pointless announcements if possible 2023-01-12 11:42:04 +01:00
Archi
ca67285f34
No users to match against is expected 2023-01-11 20:15:19 +01:00
Archi
097ac05ceb
Remove assetID from inventories request
Backend doesn't need to know that
2023-01-11 19:16:38 +01:00
Archi
4895a95794
Decrease size of the request
We reached a point where it actually matters whether we say "realAppID" or just "r", since we're doing this sometimes even 600k times, multiplied by 9 properties that we have
2023-01-11 18:40:46 +01:00
Archi
3cadcd16b4
Help ArchiNet calculating previous asset IDs if possible 2023-01-11 18:34:31 +01:00
Archi
2b15b9f84e
Optimize filtering of no-dupes
Slightly decreases CPU spent, since we calculate sets to remove only once rather than on each entry
2023-01-06 20:58:35 +01:00
ArchiBot
873a109f84
Automatic translations update 2023-01-06 02:21:02 +00:00
Archi
dea715ff1e
Decrease announcement time, set listener for finished trade offers 2023-01-05 14:30:08 +01:00
ArchiBot
70116cb88a
Automatic translations update 2023-01-04 02:19:13 +00:00
ArchiBot
36a140faf2
Automatic translations update 2022-12-31 02:15:37 +00:00
Archi
9144684df9
I knew I forgot about something 2022-12-30 17:22:21 +01:00
Archi
f41d6d53a6
Report warning on listing/matching
If user intentionally enabled STM or MatchActively, we should display him warning if that's not possible due to not meeting the requirements.
2022-12-29 22:25:35 +01:00
ArchiBot
0e06019213
Automatic translations update 2022-12-29 02:18:12 +00:00
Archi
d98fde47a4
Use WebProxy against the server if defined
There are valid use cases for it, e.g. if the ISP decided to block ASF STM server (but whyy)
2022-12-27 03:13:07 +01:00
Archi
2a83967d2b
Closes #2784
I didn't even test this, yolo
2022-12-26 16:25:26 +01:00
ArchiBot
48591cf85a
Automatic translations update 2022-12-26 02:17:35 +00:00
Archi
8fd5f2e883
Fix Archi fuckup
Who would have thought?
2022-12-23 22:42:41 +01:00
Archi
4eae3ebf4d
Use custom WebBrowser for items matcher
Now this is dictated by at least several reasons:
- Firstly, we must have a WebBrowser per bot, and not per ASF instance, as we preserve ASF STM cookies that are on per-bot basis, which are required e.g. for Announce
- At the same time we shouldn't use Bot's one, because there are settings like WebProxy that shouldn't be used in regards to our own server
- We also require higher timeout than default one, especially for Announce, but also Inventories
- Best we can do is optimize that to not create a WebBrowser for bots that are neither configured for public listing, nor match actively. Since those settings need to be explicitly turned on, we shouldn't be duplicating WebBrowser per each bot instance, but rather only few selected bots configured to participate.
2022-12-23 18:21:43 +01:00
Archi
1daa6728f6
Handle edge case of session invalidation during heartbeats 2022-12-23 16:34:42 +01:00
Archi
71a52eb3b2
Remove unnecessary information from inventories request 2022-12-23 15:31:14 +01:00
Archi
af4a605a8c
Optimize inventories request 2022-12-23 15:08:36 +01:00
ArchiBot
647eaaf379
Automatic translations update 2022-12-23 02:17:11 +00:00
ArchiBot
5a1fcf79ca
Automatic translations update 2022-12-22 02:17:26 +00:00
ArchiBot
2b24fbc493
Automatic translations update 2022-12-21 02:16:13 +00:00
ArchiBot
92bd0ad46a
Automatic translations update 2022-12-19 02:14:34 +00:00
Archi
b081b8eaba
Initialize RemoteCommunication always
This caused people with remote communication of 0 unable to use match actively, which is not required. Remote communication is already coded to handle only what user configures it to do so.
2022-12-18 15:15:39 +01:00
ArchiBot
470c46af71
Automatic translations update 2022-12-18 02:16:40 +00:00
Archi
9821e61864
Misc 2022-12-17 20:36:58 +01:00
Archi
104d5b7750
Add !match command for ItemsMatcher plugin 2022-12-17 18:27:41 +01:00
Archi
defc1bf80f
Add support for full OpenID procedure against ArchiNet 2022-12-17 17:23:20 +01:00
Archi
6ff1d0a2d9
Fix possible crash during matching 2022-12-17 13:09:01 +01:00
ArchiBot
10241d048f
Automatic translations update 2022-12-17 02:15:03 +00:00
Archi
643b8a60fc
Announce to the listing sooner if inventory has changed
We should announce to the listing at least each 60 minutes, but we should do it faster if we know that our inventory has changed. With this logic we can report in up to 1 minute since the change, which should provide very up-to-date state, but at the same time we still limit amount of announcements to not more than one per 5 minutes.
2022-12-16 19:57:32 +01:00
Archi
7894b0132f
Update RemoteCommunication on bot modules reload
Archi, you designed that interface yourself exactly for this purpose, silly!

This way bot reload in config will trigger remote communication changes.
2022-12-15 22:02:19 +01:00
Archi
4e382732d9
Misc refactor 2022-12-15 19:16:28 +01:00
Łukasz Domeradzki
98ef37e722
Extract PublicListing and MatchActively to a plugin, resurrect MatchActively (#2759)
* Start work on extracting remote communication

* ok

* Dockerfile fixes

* More fixes

* Prepare /Api/Announce and /Api/HeartBeat

* Decrease publish race conditions

* OK

* Misc

* Misc

* Misc

* Move Steam group part back to ASF core

* Finally implement match actively v2 core

* Update RemoteCommunication.cs

* Use single round exclusively, report inventories more often

* Use randomization when asking others for assetIDs

* Add support for license and crowdin

* Kill dead code

* Fix return type of inventories

* Fix responses for good

* Unify old backend with new

* Report whole inventory, always

Helps with optimization on the backend side in terms of inventory fetching

* Update RemoteCommunication.cs

* Determine index of each asset and tell server about it

* Update AnnouncementRequest.cs

* Fix ASF screwing up with the order

* Fix warnings

* Misc rename

* Final logging touches
2022-12-15 18:46:37 +01:00