Giter VIP home page Giter VIP logo

monero's People

Contributors

anonimal avatar fluffypony avatar gingeropolous avatar hyc avatar idunk5400 avatar j-berman avatar jaqueeee avatar jeffro256 avatar jtgrassie avatar kenshi84 avatar luigi1111 avatar mathstuf avatar mbg033 avatar mikezackles avatar mj-xmr avatar moneromooo-monero avatar noodledoodlenoodledoodlenoodledoodlenoo avatar oranjuice avatar ph4r05 avatar radfish avatar rbrunner7 avatar selsta avatar snipa22 avatar stoffu avatar tewinget avatar thecharlatan avatar tobtoht avatar vtnerd avatar warptangent avatar xiphon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

monero's Issues

Nice-to-have data for the scanner to identify (or pass back to a consumer) in order of preference

I think the majority of these are useful for wallet users.

If all implemented, we would be able to easily maintain compatibility between the Seraphis lib and wallet2 (can import a Seraphis lib-based wallet into a complete and consistent wallet2-based wallet).

1) RCT / non-RCT status of enote

  • In progress: #42
  • Required to be able to spend pre-RCT using wallet2

2) Tx fee

  • Answers "how much did I spend in fees" without re-consulting the chain

3) key_offsets of txs which include a received enote in their ring

  • Useful to track how often an enote is used in other rings.

3a) Legacy unscanned txs which include a received enote as a ring member

  • Useful for background syncing without the spend key (no need to re-query the daemon for key images to identify 0-change spends)

4) Coinbase boolean

  • Helpful for miners
  • Technically can be determined for RCT enotes if 1 is implemented (legacy RCT enotes with transparent amounts), not for pre-RCT

5) unlock_time on spend origin context

  • Useful when the user sends to another user with 0 change, and wants to know when the tx will unlock without re-consulting the chain (for historical record keeping purposes)

6) key_offsets for spent enotes

  • Useful to display the ring in the wallet UI

7) a tx's index in a block

  • Useful to have a clear-cut correct answer to is_older_than for pre-RCT enotes in the same block (#42 (comment))
  • Useful to create a consistently ordered wallet2 m_transfers container from a Seraphis enote store

8) the legacy cryptonote::transcaction

  • wallet2-based wallets use the tx in a few ways beyond scanning:
  • I see 2 options here:
    1. refactor where the tx is used where necessary (includes requiring downstream consumers who currently lean on the wallet2 callbacks to refactor)
    2. the Seraphis lib scanner can pass the tx along per identified enote, which can also be used to knock out 1, 2, 4, 5, and 6 from above
    • I think refactoring where the tx is used is fine and more in line with the design goals of the Seraphis lib, but our lives would probably be easier if we passed the tx along per-identified enote.

Elliptic curve abstraction

In some places (for example here), code specific to the ed25519 elliptic curve leaks into the Seraphis logic.

It would make sense to abstract that away. Makes more sense in the context of the proposal to switch to a different curve, but also would make it easier to check that the code matches the Seraphis specification.

Edge cases where the Seraphis wallet lib wouldn't identify received legacy enotes that wallet2 does

  1. When there is >1 tx pub key included in tx extra:

  2. When the first additional pub keys vector in tx extra has unequal number of pub keys than there are enotes in the tx:

Fix threadpool reference unsafety

It is unsafe to use raw threadpool references everywhere. Instead, use std::shared_ptr.

The actual threadpool constructor can be hidden and only usable by a wrapper class that stores a shared_ptr of the threadpool. Then overload operator*/operator-> to dereference to the inner threadpool.

Minimizing round trips to the daemon on wallet load

Continuing from point 2 in this comment in the async scanner: #23 (comment)

Ideally wallets minimize round trips to the daemon when loading. This was the idea behind returning pool txs in the /getblocks.bin endpoint: monero-project#8076

The Seraphis lib scanner currently does 1) scan chain -> 2) scan pool -> 3) scan chain in a scan pass, which would require a minimum of 3 round trips to the daemon. @UkoeHB mentioned:

I intentionally added a follow-up pass because there is a race condition between chain scanning and pool scanning that can cause mined blocks to contain txs invisible to a wallet even after it claims to have scanned the pool.

Proposed solution to this problem: ensure that when the /getblocks.bin endpoint returns pool txs, those pool txs correspond to the state of the pool at the top_block_hash also returned by the endpoint (to be clear, this would be a change to the daemon RPC side). This way the scanner can be certain that once it has scanned up to chain tip, it knows the state of the pool at that time.

Suboptimal TXID calculation

Some issues with the TXID calculation:

  1. Doesn't explain why the input key images are hashes twice. IMO it's sufficient to have them in the prefix, which would save 1 hash.
  2. The final hash hashes more than 128 bytes of data, which requires two calls to the Blake2b compression function. This has the same performance impact as one additional hash. Since 3 hashes take 96 bytes, the domain separation stuff could still fit into the remaining 32 bytes if it was less verbose.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.