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

Constrain walletpassphrase to 10000000 seconds #1459

Conversation

jamescowens
Copy link
Member

This conforms the walletpassphrase rpc function to Bitcoin's
implementation, and also solves the large timeout race condition bug.
(issue #1457).

Tested on my local test wallet and seems to work.

This conforms the walletpassphrase rpc function to Bitcoin's
implementation, and also solves the large timeout race condition bug.
(issue gridcoin-community#1457).
@jamescowens jamescowens added this to the Elizabeth milestone May 11, 2019
@jamescowens jamescowens requested a review from denravonska May 11, 2019 21:57
@jamescowens
Copy link
Member Author

Note this is lifted straight from Bitcoin, with the exception that I changed the lower bound condition to not allow 0, where Bitcoin's does. Due to the way we implement the thread wake up, if we put zero, the wakeup thread will end, and the re-lock will never occur.

@jamescowens jamescowens requested a review from cyrossignol May 12, 2019 17:54
Copy link
Member

@cyrossignol cyrossignol left a comment

Choose a reason for hiding this comment

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

Tested--clamp and warning work as expected, unlocked_until from getinfo reports the correct clamped offset. Thread wakes up with duration of 1 and re-locks.

Minor existing issue observed: locking the wallet from the GUI after unlocking via RPC does not reset nWalletUnlockTime so unlocked_until continues to report the stale value. I'll bug it in a bit--need to step out.

@jamescowens
Copy link
Member Author

There are some weird interactions between the GUI unlock and rpc unlock we have to fix. I am going to merge this, but @cyrossignol please do file a tracking bug report to better coordinate the GUI and rpc versions of this.

@jamescowens jamescowens merged commit b2bd17d into gridcoin-community:development May 12, 2019
jamescowens added a commit that referenced this pull request Aug 20, 2019
Added:
 - Add freedesktop.org desktop file and icon set #1438 (@a123b)
 - Add warning in help for blockchain scan for importprivkey #1469 (@jamescowens)
 - Consolidateunspent rpc function #1472 (@jamescowens)
 - Scraper 2.0 improvements #1481, #1488, #1509, and #1514 (@jamescowens, @cyrossignol)
   - explorer mode operation
   - simplified explainmagnitude output
   - improved convergence reporting, including scraper information in the tooltip when fDebug3 is set
   - improved statistics and SB contract core caching based on a bClean flag in the cache global
   - new SB format and packing for bv11
   - new SB contract hashing (native) for bv11
   - changes to accomodate new beacon approach
   - Implement in memory versioning for team file ETags
 - Implement local dynamic team requirement removal and whitelist #1502 (@cyrossignol)

Changed:
 - Quiet logging for getmininginfo and scraper INFO logging level #1460 (@jamescowens)
 - Spelling corrections #1461, #1462 (@caraka)
 - Update crypto module #1453 (@denravonska)
 - Update .travis.yml for Bionic #1475 (@jamescowens)
 - Create CPID classes and clean up CPID code #1477 (@cyrossignol)
 - Refactor researcher context and CPID harvesting #1480 (@cyrossignol)
   - Remove boinckey export RPC method and import handler
 - Notify when wallet locked in advertisebeacon RPC method #1504 (@cyrossignol)
 - Notify when wallet locked in beaconstatus RPC method #1506 (@cyrossignol)
 - Change spacer minimum height hint #1511 (@jamescowens)

Removed:
 - Remove safe mode #1434 (@denravonska)
 - Remove bitcoin.moc in Makefile.qt.include #1444 (@RoboticMind)
 - Clean up legacy Proof-of-Work functions #1497 (@cyrossignol)

Fixed:
 - Constrain walletpassphrase to 10000000 seconds #1459 (@jamescowens)
 - Straighten out localization in the scraper. #1471 (@jamescowens)
 - Quick fix for rainbymagnitude #1473 (@jamescowens)
 - Correct negation error in scraper tooltip for vScrapersNotPublishing #1484 (@jamescowens)
 - Fix staked block rejection when active researcher #1485 (@cyrossignol)
 - Add back informational magnitude to generated blocks #1489 (@cyrossignol)
 - Add back in the in sync check in ScraperGetNeuralContract #1492 (@jamescowens)
 - Scraper correct team file processing. #1501 (@jamescowens)
 - Have importwallet file path default to datadir #1508 (@jamescowens)
 - Scraper add Beacon Map size check to ensure convergence #1515 (@jamescowens)
@jamescowens jamescowens deleted the fix_walletpassphrase_unlock_interval_bug branch October 23, 2019 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants