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

Move transactions into db #3892

Closed
NejcZdovc opened this issue Mar 26, 2019 · 1 comment
Closed

Move transactions into db #3892

NejcZdovc opened this issue Mar 26, 2019 · 1 comment
Labels

Comments

@NejcZdovc
Copy link
Contributor

NejcZdovc commented Mar 26, 2019

Currently all transactions are in the json file and this is problematic as json can grow too big. What we would like to do is move transaction object from ledger_state into publisher_info_db.

We need to create new table contribution_details or we could add new fields into existing contribution_info table.

Example of one transaction from json

{
      "viewingId": "89f7170e-f39c-46e8-946e-cd9e545145ab",
      "surveyorId": "6H34X5Hyia0IIbRfhpQEiopuVkaf0KqBNzE70nSqvg2",
      "contribution_fiat_amount": "10",
      "contribution_fiat_currency": "BAT",
      "rates": {
        "AED": 0.766366016,
        "ARS": 8.7701803136,
        "AUD": 0.292742784,
        "BAT": 0.0,
        "BCH": 0.0013371779328,
        "BRL": 0.804380224,
        "BTC": 0.0000534493952,
        "BTG": 0.01724159232,
        "CAD": 0.2792688128,
        "CHF": 0.2072191616,
        "CNY": 1.400683776,
        "DASH": 0.0023737139712,
        "DKK": 1.376460672,
        "ETH": 0.001570493037260068,
        "EUR": 0.1843918592,
        "GBP": 0.1581219968,
        "HKD": 1.6376904704,
        "ILS": 0.7548407424,
        "INR": 14.3632992,
        "JPY": 23.0355292928,
        "KES": 21.0705932416,
        "LBA": 9.544373284537969,
        "LTC": 0.003592905984,
        "MXN": 3.969814144,
        "NOK": 1.7785913216,
        "NZD": 0.3023736064,
        "PHP": 10.9631911808,
        "PLN": 0.7919890944,
        "SEK": 1.9252256,
        "SGD": 0.2817724928,
        "USD": 0.20926485220358696,
        "XAG": 0.0134624688768,
        "XAU": 0.0001597994624,
        "XPD": 0.000135125696,
        "XPT": 0.0002427234304,
        "XRP": 0.69996988288
      },
      "contribution_altcurrency": "BAT",
      "contribution_probi": "10000000000000000000",
      "contribution_fee": "",
      "submissionStamp": "1553595117263",
      "submissionId": "",
      "anonizeViewingId": "89f7170ef39c6e8946ecd9e545145ab",
      "registrarVK": "==========ANONLOGIN_VK_BEG==========\n8MMyJJmqhl/C8PVenwLrAucbcDAAEVPHYa/WMvCFmTu 1sO+XpYPdGS/nqkJoy7Ni6L4vfkX3+6+/8mH+YsoIFb 1\nAPz5/M6QPS0ovaIptqGkTWvwe0wAUpCS1nkn3o578Ow 4QV/FW74yTEzJ2YbYoSwoYJGLeKJ3JWphpHhddmszL2 1\n4Jw9l7H/0I+xLBKl7//SPhWAFhVBbp3XWcewn69WYEx 3bUNzMKNsnpWRKgivBfShbCsfhcR0MGD4CfOFeAYhPE 1\nA5KTrxKgqycFYnvo9BgmYafUJ46Gti/5T+4LmDYOEHL B33Ne5c9wPj1LZF4Nd2O3xeRrF5z2WHtTcnW0dRWJqP 1\n6Aza57xUODgaN5vBgHnr3S7aZQezQl9M6t/IUcLDFxy 6TG8AP2XmsXiDYNfULlMlKmkcIE8wypl41airjsUDOo 7AlIDZY0AA96/pbbBwhaMMaPlsU8zKFrh3nln9R+lta 4O7rb+E7S1RiHB6MZ9f9tX0F6J6TIxX2a5miuRXptf 1 0\n===========ANONLOGIN_VK_END==========",
      "masterUserToken": "==========ANONLOGIN_CRED_BEG==========\n89f7170ef39c6e8946ecd9e545145ab\nJo3Ly0xYOkrS6hUVq2an7GqqemNCl3o/hQDw7F1RBB\n5EeEY+RAR5UF0j5Se3PeOv1mBvjBWkAv1zlxNctfPH9 6FAUi4yrTJNgcZl6tniTu6Jyc/YlCNBCnxxlaaJTjZq 1\n36CCgpJ4+fYvFwinErc4fo80FHQ9uqO+4lWhYnMTr9Z\n2EFGKKYsKgNcWQjyU/BEcfGOeiAWHPmsS4jU984ESCc\n===========ANONLOGIN_CRED_END==========",
      "surveyorIds": [
        "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"
      ],
      "votes": 40,
      "ballots": [
        {
          "publisher": "3zsistemi.si",
          "offset": 40
        }
      ]
    }
@tmancey
Copy link
Contributor

tmancey commented Aug 27, 2019

Closed issue as superseded by #5815

@tmancey tmancey closed this as completed Aug 27, 2019
@NejcZdovc NejcZdovc added this to the Dupe / Invalid / Not actionable milestone Aug 27, 2019
@NejcZdovc NejcZdovc added closed/duplicate Issue has already been reported and removed dev-concern priority/P5 Not scheduled. Don't anticipate work on this any time soon. labels Aug 27, 2019
@bbondy bbondy removed this from the Dupe / Invalid / Not actionable milestone May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants