Skip to content
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

Allow tx without budget #2846

Open
wants to merge 44 commits into
base: privacy-feature
Choose a base branch
from

Conversation

yontyon
Copy link
Contributor

@yontyon yontyon commented Nov 9, 2022

  • Problem Overview
    Allow a non-budgeted transaction.
    The servers validate the budget coin's presence according to a configuration. The client should create the transaction with budget coin also according to the same configuration.
  • Testing Done
    unitests in libutt and client api

yontyon and others added 30 commits November 9, 2022 11:30
…g exceptions instead of returning a bool result. Allow updateMintTx and updateBurnTx to ignore the transaction if the owner is someone else
…intTx ignore mints/burns intended for a different user when synchronizing
…returning complete messages occasionaly when getting tx data
…put. Add a simple debug output to inspect the coins of a user
…li. Instead of generating and deploying a config, the configure command will fetch an already deployed configuration by the admin-cli
@yontyon yontyon requested a review from a team as a code owner November 9, 2022 09:47
@@ -33,7 +33,7 @@ class Admin {
/// [TODO-UTT] Should be performed by an admin app
/// @brief Deploy a privacy application
/// @return The public configuration of the deployed application
static bool deployApp(Channel& chan, bool budget_policy = true);
static bool deployApp(Channel& chan, bool budget_policy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this PR also include a change to the wallet app?
as it checks

const size_t budget = getPrivacyBudget();
  if (budget < amount) throw std::runtime_error("User has insufficient privacy budget!");```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it more elegant to define the non-budget configuration as a budget coin with infinite value?
It will eliminate the need for if - else on the transaction and will reduce the configuration changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more elegant for the code but will it be more elegant for the system if we still need to create and manage a 'hidden infinite' budget coin? And how does it reduce the configuration changes?

Copy link
Contributor

@evdzhurov evdzhurov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the option to require a budget should be called 'budget_policy', as a budget policy may include more logic than simply turning the budget requirement on or off. Maybe something like 'require_budget' is a bit more appropriate. Also, I don't think we're ready yet to expose this option in the admin when creating a deployment, there needs to be more discussion how this should actually work and what changes will be needed in the wallets as well. For now we can limit ourselves to add a unit test that validates turning the budget requirement off.

@yontyon yontyon force-pushed the privacy-feature branch 2 times, most recently from cfe5ba1 to dbadd68 Compare November 17, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants