-
Notifications
You must be signed in to change notification settings - Fork 154
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
minor improvements to faucet worker #3062
Conversation
The CD failure here seems to happen a whole lot more after we integrated the faucet. The cd-integration-tests stalls out on one of the python scripts that sets up monitors waiting for the blocks to sync. Mobilecoind doesn't show any errors when this happens. I'm guessing some kind of weirdness/race when multiple clients are trying to watch monitors? |
I would kind of like to lean into the faucet and not use "drain accounts"? What do you think about that? |
Maybe it will be better with the "activate" option? So the faucet wont do anything while drain accounts is trying to work? #3063 |
This rearranges some of the code that talks to mobilecoind in a way that I think should reduce some racy error conditions. It also renames a variable to be more clear, the old name doesn't make as much sense anymore. This was tested locally against ``` diff --git a/mobilecoind/src/sync.rs b/mobilecoind/src/sync.rs index b78be780a..8f166fa85 100644 --- a/mobilecoind/src/sync.rs +++ b/mobilecoind/src/sync.rs @@ -299,6 +299,8 @@ fn sync_monitor( let block_contents = match ledger_db.get_block_contents(monitor_data.next_block) { Ok(block_contents) => block_contents, Err(mc_ledger_db::Error::NotFound) => { + // Fake S3 delay + std::thread::sleep(std::time::Duration::from_secs(1)); return Ok(SyncMonitorOk::NoMoreBlocks); } Err(err) => { ``` to try to simulate S3 delay.
Co-authored-by: wjuan-mob <[email protected]>
I don't think this should be necessary, but I'm somewhat out of ideas. It can't hurt and may prevent an error I guess.
3b78d0c
to
43511a0
Compare
Jason requested that, the mobilecoind-dev-faucet should not immediately start sending lots of transactions after it is deployed, because that makes some other deployment-related things harder. By default it does that because it wants to have its queue full. The change we made is: * The faucet worker now has an "in_active" flag, which if false causes it to skip its loop, and this defaults to false. * The flag is set to true if `--activate` is passed. * If `--activate` is passed, the flag is set true whenever an HTTP POST occurs (post to get payment from faucet, or to start a slam), whether or not the POST results in a successful operation. * Docu is updated so that for dev testing it demonstrates `--activate` and the existing documented flows should still work. * CI is updated to use `--activate`
No description provided.