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

Add a random delay to broadcast scheduled transactions #23

Open
Technifocal opened this issue Jun 30, 2019 · 1 comment
Open

Add a random delay to broadcast scheduled transactions #23

Technifocal opened this issue Jun 30, 2019 · 1 comment
Labels
enhancement New feature or request my-dojo Something related to my-dojo

Comments

@Technifocal
Copy link

Assuming I'm reading the code correctly, scheduled transactions are broadcast immediately after a new block is mined.

For example, imagine we had a transaction scheduled for block 3:

Block height Time Transaction broadcast/time
1 +0 minutes False
2 +10 minutes False
3 +20 minutes True, at +20 minutes
4 +30 minutes False

An attacker could assume that this transaction might have been scheduled. Compare this to:

Block height Time Transaction broadcast/time
1 +0 minutes False
2 +10 minutes False
3 +20 minutes True, at +25 minutes
4 +30 minutes False

Where an attacker could be sure the transaction was not scheduled as it came between two different blocks (and thus was not triggered by a block being mined).

Adding a random time after the target block (say, 0 seconds to 20 minutes) would prevent an attacker from determining that any transactions broadcast between two blocks were not broadcasted by Dojo's implementation of scheduled transactions.

@Technifocal Technifocal changed the title Potentially add a random delay to broadcast scheduled transactions Add a random delay to broadcast scheduled transactions Jun 30, 2019
@kenshin-samourai kenshin-samourai added enhancement New feature or request my-dojo Something related to my-dojo labels Jul 1, 2019
@kenshin-samourai
Copy link
Contributor

actually, there's already a random delay of a few seconds between the 2 events:

  • delay for propagating the block between the miner and the full node hosted by dojo (through tor)
  • delay for processing of the block by the tracker

That being said, the addition of a larger random delay (from a few seconds to a couple of minutes) might be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request my-dojo Something related to my-dojo
Projects
None yet
Development

No branches or pull requests

2 participants