Git Product home page Git Product logo

Comments (5)

cirocosta avatar cirocosta commented on July 17, 2024

tx pubkey can be retrieved from tx_extra:

  bool add_tx_pub_key_to_extra(std::vector<uint8_t>& tx_extra, const crypto::public_key& tx_pub_key)
  {
    tx_extra.resize(tx_extra.size() + 1 + sizeof(crypto::public_key));
    tx_extra[tx_extra.size() - 1 - sizeof(crypto::public_key)] = TX_EXTRA_TAG_PUBKEY;
    *reinterpret_cast<crypto::public_key*>(&tx_extra[tx_extra.size() - sizeof(crypto::public_key)]) = tx_pub_key;
    return true;
  }

(see https://github.com/monero-project/monero/blob/7499837a6fe8d3533e1360dce8f3ba230ff76042/src/cryptonote_basic/cryptonote_format_utils.cpp#L651-L656)

or, simply looking at the tx info from the onion explorer

Screen Shot 2021-07-16 at 6 34 06 PM

from go-monero.

cirocosta avatar cirocosta commented on July 17, 2024
$ monero daemon get-transaction --txn=171403d02d87656e89dd5b499a9a5e97079e477b77f384bf77acede482f25bf0
Hash:                   171403d02d87656e89dd5b499a9a5e97079e477b77f384bf77acede482f25bf0
Fee (µɱ):               12375.01
Fee per kB (µɱ):        6419.458074974671
In/Out:                 2/2
Size:                   1.9 KiB
Public Key:             1f6a48b0232de9386d5c28b35f9f7f5ae66de72e1f55317f8ced6852d3feab46
Age:                    22 hours ago
Block:                  2406024
Confirmations:          654

OUTPUTS
        STEALTH ADDR                                                            AMOUNT  AMOUNT IDX
0       d9ba767de290c70e744f8bedac27ddd4c389090b59d1d0b50853ba1211f3427b        0       35271115
1       37aa4e6da6d04f63f81c6926d83eca4868dc87c7ce8b023141f746760342900d        0       35271116

Input Key Image:        902471de7e4a3a82428d9462689e6cab1b8a8bb38e836d6c7e9c8b99bff93192
        RING MEMBER                                                             TXID                                                                    BLK     AGE
0       26a2707e24acfc198d62e66853621bcbf20ce1cc2e83e6af37ce9cca9e3c4497        5336b1ca2abbb7c9c60dc45ec95a2edcf3e5ffffc645e0cc360b034517b1add7        2288853
1       df8e06b5e80d7b0b9ee323baeeb154f2b4423cad1b9c8e6b5b6fe1ef4ef44222        dbe32736e3f2bd6ec812b73ff0954b7db1cc44975c66702251df27b3ee38922a        1601614
2       de36505c69eb8eae5f6b6d345206b119272de634390da2765b8095fd43d731b1        71b2c9d9a6ef70f348d3f4af5623573e230fe6e02040c0ca801d91b526d75ae2        1338065
3       c60d221c74d94b92f7d99679a9caf586f51b29329f0691a7bf8a732c0e8a8e18        c83b26dc0943bf17fdeb92e5286b54ea6404dd824c034319c6b7d0b1969141ec        1270066
4       133bce42b76403b7ee9a2f1f127aa99ee04137f918b59afaa90b0f2ddf62b298        ac78b8070a8e78aff75666d0febeeec7cffe466e33bb226284b4a807c257b519        1255439
5       282ef8d1da7cbd7c37319cc11cff80e1a8ae35f31f1d9a4fc1b77e678747fe8a        868e8370cf749dbacbaf29b5bef158a2adb09dfabaac9a8b5fe4d967b2424784        1225073
6       4af2f970d67b42de811020fa4595885d062269e869c47edf7ea93a45dc3fd9c7        adc6bf7b632703220337d94f78f5fc204c9d35ead4981140f73633f6541369b8        1224618
7       d1a336de1498dd2af777fad959406931a04db09441b68768f6687c1f3d990e3e        bbf749852d4d8f1eabcd524f36ac8f2aad934f053e8124cc0f854d3e652cadef        1230727
8       a14f9361e8b2e0d7ac5a322846f9441dff02eca0aff4247b58de32392414ee16        b44b8585d373044be04f4e8e528940b334cdce47c702b74224ca03525c851297        1236246
9       4b2c82dcfe51cb873f697db39d0065551d4bdf276ce0f6892872d82411553fb9        e4a3a453d61c9453813313ae0f69ad55500c942bc67e99d88fee269570017aa5        1220678
10      071dfc19bdd67c21bdf5b0692208840fc21b3238fc3655da3079ba03cc61f75f        f22e5c13626dfbfe1ea1be68db3cbe24227f1a946c945ffb9b22976cf974109d        1220597

Input Key Image:        2123c5fcd54a800fe3a8d2e1bfd98d97738239aa154722ce982a7200dc322a7c
        RING MEMBER                                                             TXID                                                                    BLK     AGE
0       21d104961b75452ab93fbac0ecd920bc1bcd1dfdaf7b110991c0ff931b240c4d        31bcc8ef8ed3539c6bc3c36451efe2b67938680bad215473d2125f81646c5a52        2279736
1       a1126ffcdec24f843906ae436e72ebf35f651a409d14cbd2c6c6028187d8ae70        6a46c53a085536202ec87d932c42e2c00e101177742f46e5c7737c5c4168d058        1605491
2       b1ce7006236495782fa8703a451d3cced6190490230dab72f34f0ba1478b24ef        f23669fda47f55cb1676a22ce4f75a48a79b860f3097eb1c7c90756b3c5e1769        1380022
3       587ba817570822762c37cefc567fa58cdeed1ceac7f09be05cc86d49bf6435f3        cfae7336d04f28b71e44dd859fad43a2b7c58473cea3f0e535e45a8507f5e518        1249561
4       899407dbd201a9b5a7515db064b2bc042a1a7d753a94f02d99f38a633714a79e        433a93037dae3904158be7779cbcc0ad7de8cd64d53821bb4f3a7fa1961b707d        1240481
5       9db8bb8a55c15eb34312157911b13f9b163c3e1bb422ea9bc21836634017b600        60a568bebfa6c99ef70eae2b8b6df14a82eaa10f7c8720f97d6ac671dbd7237b        1228098
6       45347ffe5641500962d4a6cdc92d1a866910d4ea33c16996e95d04c2e6d5453a        16a24cde86ffcffafb0a53adc71e87205a1305d3314d3b03017bca93bb3d2441        1241475
7       73335c57719f7675cfc590e9b440212364871ebb98c51228289d61a6861d4b17        27b79fb04bf4a57792a640fd96b7f831e96bd91e46cfde881f4186c38db544c5        1231785
8       aeee6044e93fe24b13cac9544ddaded9b1124c00227b7e0ab903496fe3a51d5e        747079263bb475f6a6a20d3a42ff25da2c7e1fcf6f9264201b9e7fb41632c126        1229723
9       50be3f18e786ef1bdcfc49b032203584a2f2368978a0f3b0b34d5aa871ebe79d        ae6e5f59e10cb943adf859f7737b961d9bc16b7695f0078b61d9177bfcc7af46        1223446
10      59cc3735230ba5d17819dab236ca8c115a87b32e8485ce18fb7f475b3d04ebc3        952543f72fcaca13d3293eba5c0664816d1e82e5c0715dd77efff6ab147f86c8        1221334

now, once we implement get_block_header_by_height, we'll be able to lookup the age of all those blocks in a single call and figure out the timescale

sweet

from go-monero.

cirocosta avatar cirocosta commented on July 17, 2024

hmm sounds like the ring members are not really matching what shows up on xmrchain .. looking at that block distribution above, we can tell that's not really what the gamma distribution would end up looking like

from go-monero.

cirocosta avatar cirocosta commented on July 17, 2024

welp, turns out the key offsets uses differential encoding, so we gotta translate that array before submitting to /get_outs:

 go-monero $ monero daemon get-transaction --txn=171403d02d87656e89dd5b499a9a5e97079e477b77f384bf77acede482f25bf0
Hash:                   171403d02d87656e89dd5b499a9a5e97079e477b77f384bf77acede482f25bf0
Fee (µɱ):               12375.01
Fee per kB (µɱ):        6419.458074974671
In/Out:                 2/2
Size:                   1.9 KiB
Public Key:             1f6a48b0232de9386d5c28b35f9f7f5ae66de72e1f55317f8ced6852d3feab46
Age:                    23 hours ago
Block:                  2406024
Confirmations:          689

OUTPUTS
        STEALTH ADDR                                                            AMOUNT  AMOUNT IDX
0       d9ba767de290c70e744f8bedac27ddd4c389090b59d1d0b50853ba1211f3427b        0       35271115
1       37aa4e6da6d04f63f81c6926d83eca4868dc87c7ce8b023141f746760342900d        0       35271116

Input Key Image:        902471de7e4a3a82428d9462689e6cab1b8a8bb38e836d6c7e9c8b99bff93192
        RING MEMBER                                                        BLK     AGE
0       26a2707e24acfc198d62e66853621bcbf20ce1cc2e83e6af37ce9cca9e3c4497   2288853 5 months ago
1       81ba65902d032a2012c5e02fcf509ed6dc00f732318a8dd92303d85a0a984dc8   2369620 1 month ago
2       f8988e8f4cc4ed41488a99355f169a407d60c6580d36d8222b4054321264221d   2391123 3 weeks ago
3       4c4c351d7bc4337dd05d35ee14df5fbaa80780cc45345b2ef8eb5234ccdd7d3c   2398155 1 week ago
4       e23da70077fd5d8bae712884bb485ef685c02bfa52dd959244c58397915917e9   2402663 5 days ago
5       85fe6ffe131c34dd28f897c38f1ef0dbdd500810a8fd57334aa839a7aafbe361   2403077 5 days ago
6       4fa7b1b032e70925df25f8db0b008e996e947f68feac042a514ca5ae5ee70801   2403440 4 days ago
7       1c7562baa70f207d6899b6ec46783c0d121e787de7a1333c15539d1106f7cdb1   2404464 3 days ago
8       4a8147b68e14b5e873374b149fb6de71fdd0b25a1a5b323399580ebbdf5ad0b2   2405993 1 day ago
9       c31624998fb7ec19914b7ab110d90096a7677ae34590ff99c4cc302243c68b68   2406005 1 day ago
10      72d99c6f797c5b6a9714d20eb1c3e7be975ab6b22516b979aa8c99fb25691790   2406007 1 day ago

Input Key Image:        2123c5fcd54a800fe3a8d2e1bfd98d97738239aa154722ce982
        RING MEMBER                                                        BLK     AGE
0       21d104961b75452ab93fbac0ecd920bc1bcd1dfdaf7b110991c0ff931b240c4d   2279736 5 months ago
1       8ccb4cba264ca446e6fc40b9fb554787ee5c952f7bc265424b0b44bdfe621996   2363491 2 months ago
2       f7215b102839deb3b1bb88274bc7641bde3b7fb1f2343ff01727a99e48b15c54   2394637 2 weeks ago
3       10ed737f4253c77699e609f0a2323c5c02bb133d9c7519ddd41391fe54c5a3c3   2398284 1 week ago
4       080b646d25373a7b0aa53adddb37d149c4874eea3fd6bbf9ee9789c613830d9c   2400353 1 week ago
5       b515d3ce89ec9c64d3b1d379df49e0e52888689d980e49cffc496885178088ee   2401123 1 week ago
6       7cce8c80c52d399ebcb57155514cfe3c2a30bb4dca96a4035ec5d56ca373ffc9   2403734 4 days ago
7       fb5f31e484436006623372dbea0d19c437ce550548c266432dab92afafba27e1   2404777 2 days ago
8       399ac062f018797c9c2aa3c1e388be452992c005a7610eefc1add7d56b993815   2405660 1 day ago
9       ad26129b1b50cad25eedad5e8a682d99b4a7d63eb031cab3afdcd7881cf73138   2405970 1 day ago
11      307d8b93aa2229be083c1ade0fcd0e144e7f509f72dfe368d527f856e919616d   2406006 1 day ago

that looks much more like what we'd expect

from go-monero.

cirocosta avatar cirocosta commented on July 17, 2024

tbh, calling this done and leaving timescale for another time - the AGE column is definitely good enough to give you an idea of the distribution when you have just a few inputs

IIRC the number of inputs can be large

  • outputs: min=2, max=16
  • inputs: min=1, max=capped-by-size (CRYPTONOTE_MAX_TX_SIZE, 149.4kB)

from go-monero.

Related Issues (20)

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.