cryptimeleon / incentive-system

A cryptographic incentive system.
Apache License 2.0
3 stars 0 forks source link

rejection mechanism for dsp/incentive service #161

Closed pschuermann97 closed 1 year ago

pschuermann97 commented 2 years ago

Changes in this PR:

rejection mechanism for transactions: incentive service now queries dsprotection service whether dsid of occured transaction is already contained in database. If dsp service is alive and returns true, the transaction is immediately aborted and not ever recorded in the database.

Checklist:

Select whatever applies:

this-kramer commented 2 years ago

I think you need adapt the test cases to the new workflow 🤔

pschuermann97 commented 2 years ago

Tests work again, added possibility to turn off double-spending database synchronization for test cases that do not intend to test it. DBSyncIntegrationTest is the test class that tests all functionality around the Spend-Deduct mechanism.

this-kramer commented 1 year ago

@pschuermann97 What about this PR?

pschuermann97 commented 1 year ago

this is an old attempt to fix the tests for the incentive service in presence of offline double-spending protection (problem was that in the unit tests for the incentive service, no dsp service instance was running, so all tests involving the spend-deduct protocol failed).

In this PR, I implemented a flag to turn the double-spending protection off where it was not needed.

However, you conviced me that this is a bad idea since it introduces an attack vector for the sake of testing.

Long story short, this PR and branch are no longer needed.