Emurgo / project-icarus-importer

Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
Other
4 stars 2 forks source link

#2: Raw TX body #5

Closed vsubhuman closed 6 years ago

vsubhuman commented 6 years ago

Closes #2

  1. Added new column tx_body text to the SQL DB-init script
  2. Added the same column to the Opaleye mapping in importer
  3. Used serialize' to create the raw tx right in the txs table module. No API has changed.
  4. Had to import Serokell.Util.Base16 to convert serialised txs to strings

P.S

  1. Added comment to the cutDownLongAddress that was added in another PR
vsubhuman commented 6 years ago

Testing

Tx serialisation tested locally and works as expected (compared to this endpoint - https://explorer.adalite.io/api/txs/raw/9253c2be3a42e9552721715a52aa305c1576b37a80c0adc3f31d2e3d8c7c87aa)

The only thing left to test is whether the transaction with the extra-long address is successfully stored in the tx_body column. Couldn't test it yet, because of local docker problems, but intuitively it's expected to work fine.

vsubhuman commented 6 years ago

Finally tested the tx_body of the super-long transaction.

Transactions:

https://cardanoexplorer.com/api/txs/summary/bc61865d72bd8a0956f1b12595e314a60cc8e3f4350c044b2a86f3230ace923a

Our DB:

image

AdaLite:

image

vsubhuman commented 6 years ago

Ready for merge. @nicarq, we gotta discuss the creation of the (tx_body text) column in the production.