[FEATURE] : [SIFT] Add Integrity Check Support for Authorize, PSync, Refund and RSync Flows
Feature Description/Summary
Integrity check is a scenario where there is a discrepancy between the amount sent in the request and the amount received from the connector, which is checked during response handling.
Context
Integrity checks in a payments flow are critical for ensuring data consistency, correctness, and security when dealing with amounts between Hyperswitch and connectors like Adyen, Stripe, Razorpay, etc.
Starter Tasks
- In the
handle_responsefunction of Authorize/PSync/Refund/RSync, you will have to call the respective functions -get_authorise_integrity_objectfor Authorize,get_sync_integrity_objectfor Payments Sync,get_refund_integrity_objectfor Refund and RSync andget_capture_integrity_objectfor Capture. - You would have to call these functions from
crates/hyperswitch_connectors/src/utils.rs. - These functions expect
amount_convertor,amountandcurrency. - You can take a look at this PR for reference.
Implementation Hints
- You can go to
crates/hyperswitch_connectors/src/connectors/sift.rsand call the respective integrity check function as stated above in thehandle_responsefunction
Acceptance Criteria
- [ ] Request and Response body added for each of the flows where integrity check is applied.
- [ ] All the required GitHub checks passing
- [ ] Formatted the code using
cargo +nightly fmt --all
How to Test it
- Hardcode the amount or currency field that is being passed to the connector different from the one you are passing in the request body
- This way you would be able to reproduce the integrity checks error message while testing.
Mentor Contact
- Tag @bsayak03 [Sayak Bhattacharya] in the comments if you have any doubts/queries
Resources
Here are a few sample PRs :
- https://github.com/juspay/hyperswitch/pull/8075
- https://github.com/juspay/hyperswitch/pull/8049
Pre-Flight
Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- [x] I have read the Contributing Guidelines
Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, read more here.
Refer here for Terms and conditions for the contest.
If I look at the temperature graph I can see the cpu_thermal, Which matches with the reported temps on the systems it self.
Are your CPU temps not reported there?
What OS is the agent system?
If I look at the temperature graph I can see the
cpu_thermal, Which matches with the reported temps on the systems it self. Are your CPU temps not reported there?
These are the only sensors I see
What OS is the agent system?
Windows 11 (compiled exe and using NSSM method)
Check this thread for more info: https://github.com/henrygd/beszel/discussions/18#discussioncomment-11039049 (click on expand replies)
Try running the agent as administrator and let me know if that gives you more temps.
It may just be a limitation with WMI. I may look into the possibility of working around it via LibreHardwareMonitor in the future.
Check this thread for more info: https://github.com/henrygd/beszel/discussions/18#discussioncomment-11039049 (click on expand replies)
Try running the agent as administrator and let me know if that gives you more temps.
It may just be a limitation with WMI. I may look into the possibility of working around it via LibreHardwareMonitor in the future.
That might be a bit problematic, it's going to become annoying real fast when I have to accept admin prompts every startup...
Hey! I Just got the monitoring set up on 2 Linux machines and a few Windows machines. Is there a solution to getting Windows 11 (NSSM Method) to report CPU temps? I am only seeing the GPU even when I set the program to run as admin... I am willing to help find a solution.
Just for reference, here's my NAS:
I'm having the same issue, AMD 7950X3D if it matters for Intel vs AMD. Running the agent as admin doesn't help.
I have no temp showing for AMD Ryzen 7 7800X3D on windows using 0.10.2; let me know if you need any further information or what can be done to help resolve this
Any updates?
I'm also experiencing the same issue with an AMD Ryzen 7 5800X3D on Windows 11 running beszel-agent 0.10.2 as admin
Getting temps with WMI is apparently hit or miss depending on hardware.
I can probably add a fallback to pull temperatures from Libre Hardware Monitor (LHM), but this would require LHM to be running in the background. It does have an option built-in to run on startup. Is anyone interested in this?
Just installed beszel today and same issue with an AMD Ryzen 7 7700X on Windows 11 Pro 24H2 using NSSM binary install
Interested with the LHM approach, but is there any hack around to push sensor datas to beszel?
Anyone get a workaround? Like others, I only see my RTX 5090 temp. It would be nice to have CPU temps, and ideally other sensors such as drive temps, motherboard, AIO temps etc. With summer coming around, having that data would be helpful for sure!
I'll see if it's possible to embed the LHM dll. See discussion https://github.com/henrygd/beszel/discussions/829.
Also noticed that Intel CPU i7 12700k temps aren't logged in Windows, only GPU and some sensors, same as TomerGamerTV.
I made a test program that embeds LibreHardwareMonitorLib. I can add the same functionality to Beszel if it works for everyone.
It matches what LHM reports on my one Windows machine (old laptop with only three sensors). The CPU temperature jumps around more than I would expect, but that may be an issue with the laptop.
The one big downside is that it has to be run as administrator to get the data, just like LHM itself. Not thrilled about that but don't know a way around it. The alternative would be to run LHM outside Beszel and interact through WMI.
Here's a link to the repo and a prebuilt executable. It should print all sensors every second or so. Let me know how it goes if you test it.
https://github.com/henrygd/lhw-go
https://static.beszel.dev/discussions/829/get_temps.exe (2.9 MB)
.\get_temps.exe
sha256sum get_temps.exe
61b6d7f161b7e03ef75024f896cbff7a1a3da194a8453909191547810b7eeb85 get_temps.exe
Running as standard user
Running with administrator rights
@Sn00zEZA Thanks, good job on your cooling.
I just updated the exe to exclude the TJMax values and show what device the Temperature x readings are coming from.
Just some good old aircooling :)
Running as standard user
Running as Administrator
Thanks, I fixed the float parsing issue and made sure the sensor names are unique. Otherwise it would be a problem if you had more than one of the same Samsung drive.
Looking good now. Nice work.
Running as standard user
Running as Administrator
Only have one Samsung NVME, but its seems like it has multiple sensors
I tried the .exe and I am not getting CPU or discrete GPU temps as standard user or admin. I have a 9070 xtx and 7950x3d, it is only pulling the temperature from the motherboard graphics. LHM is able to see both and pull the main temp, even though it's not showing the individual core temps, just having the main one would be good enough for monitoring
Edit: sorry I misread the screenshot, it is pulling all GPU temps, just showing them in one line, so that is working. Just the CPU temp is not working.
@renegadepixels Are you running as administrator? If not, please try it.
I made a test program that embeds LibreHardwareMonitorLib. I can add the same functionality to Beszel if it works for everyone. https://static.beszel.dev/discussions/829/get_temps.exe (2.9 MB)
Works for me too: as regular user it only pulls GPU temps, but as administrator it pulls both GPU and CPU. LibreHardware also has motherboard's info temp which could also be added (it has its own reading of CPU, System, VRM, PCH, CPU Socket, PCle, M2, ...). Interestingly however it doesn't display temperature from memory sticks for example, even though HWMonitor/HWinfo64 etc. are able to read it.
@DavidFelsen Thanks, I updated it to check for sensors in subhardware. Maybe it will show the other temps now.
@DavidFelsen Thanks, I updated it to check for sensors in subhardware. Maybe it will show the other temps now.
Assuming you updated the file at the same location, it's not showing more devices on my machine.
@henrygd Can confirm your program does work, does it mean it will be implemented into the official client?
Si