You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In /bold/contracts/utils/hintExamples.js, the numTrials parameter in the call to HintHelper.getApproxHint is currently set as numTroves * 15. According to the function’s documentation, the intended formula is:
numTrials = k * sqrt(length), with k = 15
// Get an approximate address hint from the deployed HintHelper contract. Use (15 * number of troves) trials
// to get an approx. hint that is close to the right position.
let numTroves = await sortedTroves.getSize();
let numTrials = numTroves.mul(toBN("15"));
let { 0: approxHint } = await hintHelpers.getApproxHint(NICR, numTrials, 42); // random seed of 42
Compute numTrials as 15 * sqrt(numTroves) instead of 15 * numTroves
Activity