BlockPo / BlockPo-to-Tradelayer

Incubation Repo for the TradeLayer protocol, 0.2.0
http://www.tradelayer.org
Other
8 stars 8 forks source link

UXTO's disappearing in Wallet cache #220

Closed Galuf1 closed 3 years ago

Galuf1 commented 4 years ago

it's been long since we visit the transaction builder, fee optimizers, and wallet cache, and there is a couple stuff we need to fix before this milestone, starting from the fees. We are paying higher fees than the current LTC client in testnet. We need to make sure that the builder is correct, and the wallet is caching all the unspent outputs, because in certain scenarios they get lost from the cache and you have to refresh the outputs by sending a dust to that address.

patrickdugan commented 4 years ago

this may be relevant:

Lines 732 on TradeLayer.cpp

/**

patrickdugan commented 4 years ago

For comparative reference, here is the same function in the current Omnicore.cpp:

/**

philmb3487 commented 4 years ago

Would it have to do with


        if (removedCoins && removedCoins->find(txIn.prevout) != removedCoins->end()) {
            newcoin = removedCoins->find(txIn.prevout)->second;
        }
`
??
patrickdugan commented 4 years ago

There's a strong probability that is the fix they implemented.

We'll run some bots that do a decent tx throughput for a day in an A/B test and then adopt this code if that pans out, or otherwise, it seems like a "why not" situation regarding replacing the old code with this.

santos177 commented 4 years ago

side note: This bug hasn't be present in last functional tests. So we should create specific unit/functional tests only to check what's going on with the utxo set. If utxo aren't dissapearing , we should close this issue.

patrickdugan commented 4 years ago

This is not consensus affecting so we could ship with what we have and adopt the altered code if it ever occurred in the field. There's also an argument for adopting the more recent Omni code as a best practices thing.

We can close the issue now for launch purposes and re-open later if the value of this code difference manifests in a re-emergence of the bug.

On Mon, Sep 14, 2020 at 7:50 PM Santos notifications@github.com wrote:

side note: This bug hasn't be present in last functional tests. So we should create specific unit/functional tests only to check what's going on with the utxo set. If utxo aren't dissapearing , we should close this issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BlockPo/BlockPo-to-Tradelayer/issues/220#issuecomment-692359676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2CBJMNFBCZGDOZBMDUALSF2M2ZANCNFSM4LSYVJ4Q .

philmb3487 commented 4 years ago

ok, leme know if/how to test and what's the plan then.

patrickdugan commented 4 years ago

We will run a simple trade spammer bot next week and see if it runs into a missing input error or other crash. Then we'll deploy more sophisticated bots for trade channels and orderbook contract trades to get to a confidence threshold on those features.

On Thu, Sep 17, 2020 at 8:02 AM Philippe Michaud-Boudreault < notifications@github.com> wrote:

ok, leme know if/how to test and what's the plan then.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BlockPo/BlockPo-to-Tradelayer/issues/220#issuecomment-694158564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2CBJTVQ2S46WEKGX6FFDSGHUE3ANCNFSM4LSYVJ4Q .

santos177 commented 3 years ago

Closing for now this issue. If this bug still there, please welcome to re-open this ticket.

santos177 commented 3 years ago

@patrickdugan , @sinetek : under testing on testnet now, patch branch is input_cache.

philmb3487 commented 3 years ago

@santos177 awesome, thanks for report. giving a look.

santos177 commented 3 years ago

@sinetek : that would be great!