blow up k on M+1st price auctions
This commit is contained in:
parent
a4c883147d
commit
79d4275619
23
brandt.c
23
brandt.c
@ -55,17 +55,26 @@ BRANDT_bidder_start (struct BRANDT_Auction *auction,
|
|||||||
uint16_t i,
|
uint16_t i,
|
||||||
uint16_t n)
|
uint16_t n)
|
||||||
{
|
{
|
||||||
GNUNET_assert (auction && n > 0 && i < n);
|
|
||||||
auction->n = n;
|
|
||||||
auction->i = i;
|
|
||||||
enum auction_type atype;
|
enum auction_type atype;
|
||||||
enum outcome_type outcome;
|
enum outcome_type outcome;
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
size_t buflen;
|
size_t buflen;
|
||||||
|
|
||||||
|
GNUNET_assert (auction && n > 0 && i < n);
|
||||||
|
auction->n = n;
|
||||||
|
auction->i = i;
|
||||||
|
|
||||||
atype = auction->m > 0 ? auction_mPlusFirstPrice : auction_firstPrice;
|
atype = auction->m > 0 ? auction_mPlusFirstPrice : auction_firstPrice;
|
||||||
outcome = auction->outcome_public ? outcome_public : outcome_private;
|
outcome = auction->outcome_public ? outcome_public : outcome_private;
|
||||||
|
|
||||||
|
/* On M+1st price auctions we multiply the amount of prizes by the amount of
|
||||||
|
* bidders and resctrict each bidder to his own distinct subset of the
|
||||||
|
* prices. This is done for tie breaking. An additional proof is used in the
|
||||||
|
* encrypt_bid round to show that the bidder has chosen a valid bid and the
|
||||||
|
* outcome callback will remap the result to the original k price values. */
|
||||||
|
if (auction_mPlusFirstPrice == atype)
|
||||||
|
auction->k *= n;
|
||||||
|
|
||||||
if (handler_prep[atype][outcome][msg_init])
|
if (handler_prep[atype][outcome][msg_init])
|
||||||
handler_prep[atype][outcome][msg_init] (auction);
|
handler_prep[atype][outcome][msg_init] (auction);
|
||||||
|
|
||||||
@ -102,6 +111,14 @@ seller_start (void *arg)
|
|||||||
atype = ad->m > 0 ? auction_mPlusFirstPrice : auction_firstPrice;
|
atype = ad->m > 0 ? auction_mPlusFirstPrice : auction_firstPrice;
|
||||||
outcome = ad->outcome_public ? outcome_public : outcome_private;
|
outcome = ad->outcome_public ? outcome_public : outcome_private;
|
||||||
|
|
||||||
|
/* On M+1st price auctions we multiply the amount of prizes by the amount of
|
||||||
|
* bidders and resctrict each bidder to his own distinct subset of the
|
||||||
|
* prices. This is done for tie breaking. An additional proof is used in the
|
||||||
|
* encrypt_bid round to show that the bidder has chosen a valid bid and the
|
||||||
|
* outcome callback will remap the result to the original k price values. */
|
||||||
|
if (auction_mPlusFirstPrice == atype)
|
||||||
|
ad->k *= ad->n;
|
||||||
|
|
||||||
if (handler_prep[atype][outcome][msg_init])
|
if (handler_prep[atype][outcome][msg_init])
|
||||||
handler_prep[atype][outcome][msg_init] (ad);
|
handler_prep[atype][outcome][msg_init] (ad);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user