Skip to content

sui_v1.27.0_1717065119_ci

@dariorussi dariorussi tagged this 30 May 08:29
## Description 

Added few columns to make the usage of single table more expressive
without joins. Look at the difference in the schema (`up.sql`)
Also added logging api and changed `println` to `info`.
Logs are reasonably verbose now but that should not be a problem for
prod and should be helpful for debugging.
I run it this way to get logs in a file `RUST_LOG_FILE="filename" cargo
run --release`
Reverted back to `Vec<u8>` instead of `String` for `txn_hash` and
`sender/receiver`.
The difference between the 2 when looking at the table are as follows 

```
-- String based data
 chain_id | nonce |  status   | block_height | timestamp_ms  |                   txn_hash                   |                           sender_address                           | gas_usage | data_source 
----------+-------+-----------+--------------+---------------+----------------------------------------------+--------------------------------------------------------------------+-----------+-------------
       11 |     0 | Deposited |      5861340 | 1715174472000 | HUU2xuBxHaDfxiEpWyexh1Z7DDUVzncuRP2a4tsrTVgU | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    220828 | ETH
       11 |     1 | Deposited |      5862057 | 1715184816000 | A4bDLKbYK1MegEjbn6EEzpgVbJ1jCK4irAKoYRbAx6i9 | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    195193 | ETH
       11 |     2 | Deposited |      5862071 | 1715185020000 | 2t3CVHWMJczuK2ThZThjhBPAEL6UTwM5HnRMzyMX9YKp | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    168732 | ETH
       11 |     3 | Deposited |      5862103 | 1715185440000 | J34bAwQfGquGbFSA8eF6jG9nhxQk2FbdnnYRiq6T3mNA | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    169135 | ETH
       11 |     4 | Deposited |      5862135 | 1715185968000 | 5doepLHWdFB1AsfgkdESCaCn9E9rtNsghapDmmHnZrLf | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    190218 | ETH
        2 |     0 | Claimed   |      5862564 | 1715192124000 | 2EVyKTS5ouRWxVHqPcX3bmCQTcmjrNgDrTJjuuajxUB1 | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |    472674 | ETH
        2 |     1 | Claimed   |      5862923 | 1715197332000 | 77F1vKs1FcWSwVLEXTvDUwe7PVLcodGs5futoyFiLFjs | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |    472711 | ETH
        2 |     2 | Claimed   |      5862932 | 1715197488000 | 8rEhXieaZZrYTmQzU5i2a1kZtTvzC2wmumScKt5nTpVx | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |    446617 | ETH
       11 |     5 | Deposited |      5862954 | 1715197836000 | AHqBqy76PAoxcTMwrUCZbCdbiqN3tdfek6T5Yd98HFJV | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    168732 | ETH
       11 |     6 | Deposited |      5862954 | 1715197836000 | HQcFiEDstCzKK2ii4m2j3agTcHBE43rVQSjUJ9oE8pjd | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    168732 | ETH
        2 |     4 | Claimed   |      5862991 | 1715198352000 | 5CTYtwXYLpBiSbWFmF53GNLwrjPCyopSthzwwRcwHQ9W | 0x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |    460354 | ETH
       11 |     7 | Deposited |      5863012 | 1715198616000 | 7BLsDhMzTN5GweH4X1dPZ5YkwzuEG4YAKXdRSAGNXom3 | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    169155 | ETH
       11 |     8 | Deposited |      5863020 | 1715198724000 | 4pUJs6HfTiq9Q23GjE3e2Ci92wnbX3LYjUQqyJtKudpY | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    195211 | ETH
       11 |     9 | Deposited |      5863031 | 1715198880000 | 8rbnDQCGGCnEaCxGxRYGJVBNr9dtTyNi3SYRDZV3AJW8 | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    164179 | ETH


-- Binary (bytearray) based data
 chain_id | nonce |  status   | block_height | timestamp_ms  |                              txn_hash                              |                             txn_sender                             | gas_usage | data_source 
----------+-------+-----------+--------------+---------------+--------------------------------------------------------------------+--------------------------------------------------------------------+-----------+-------------
       11 |     0 | Deposited |      5861340 | 1715174472000 | \xf4c43d6d3908eb9faff1ffa11cdb6646c7aa42e82d3a77a806370f5694d90b81 | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    220828 | ETH
       11 |     1 | Deposited |      5862057 | 1715184816000 | \x86a49bef44073ccd2a826145296f143fa0fcbab5cc249834328274a29da4d7ee | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    195193 | ETH
       11 |     2 | Deposited |      5862071 | 1715185020000 | \x1beecb25e80fa2445262809d39547ad7c53eca1193ba34d5d564c0ec594ed1bf | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    168732 | ETH
       11 |     3 | Deposited |      5862103 | 1715185440000 | \xfd1de5cbf82edf244e55e1ba78d8985458a3493b80d8ddceddabe03a2e488f8b | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    169135 | ETH
       11 |     4 | Deposited |      5862135 | 1715185968000 | \x44dc680b05c2a2768908234ad09e7b246a9d2a06c2aca1bcec1bdaa913bc3a28 | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |    190218 | ETH
        2 |     0 | Claimed   |      5862564 | 1715192124000 | \x1250febc68e3dff8ca20d1d71d24d2e412c66ef0991d5283459e9a40d5118ce8 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |    472674 | ETH
        2 |     1 | Claimed   |      5862923 | 1715197332000 | \x5abf7445934a77bf3f6f38f755b416c6a5e4f4488d85205511163db2de254cf6 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |    472711 | ETH
        2 |     2 | Claimed   |      5862932 | 1715197488000 | \x749ec1e4bceb4397213f39ab549da0a49b60a054bc954d0260b6dcdf9064334b | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |    446617 | ETH
       11 |     5 | Deposited |      5862954 | 1715197836000 | \x8a08f5e0e97eb71da1b5e30a88c3a828cb386bfab60eb587174af3206ab9315e | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    168732 | ETH
       11 |     6 | Deposited |      5862954 | 1715197836000 | \xf3c735f9c5d51218b7b3f0a18fd4d5888d975fe3d1a497c8ae5381daadbd366c | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    168732 | ETH
        2 |     4 | Claimed   |      5862991 | 1715198352000 | \x3e5e281d660eb0f9251f46ffccd5bda5667fe1d7cef69c26045462cdbc7c5de9 | \x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |    460354 | ETH
       11 |     7 | Deposited |      5863012 | 1715198616000 | \x5bcc645c06121e738d52f3806975627f6590e753d0dc7deb837172de6e0b8492 | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |    169155 | ETH
        2 |    43 | Approved  |      4873316 | 1716918029329 | \x7a997c9292d9269e58f62c66f9a68777678e593a55d3d1079781ba13d1f6e9cc | \xfc7184a6a8b1e46a649fbdb7458433182974eb76966ab622952473f399dced6f |   2574488 | SUI
        2 |    43 | Deposited |      4873310 | 1716918027775 | \x0681e6af27a82441889f4e05eedcbd26af13b049111a7358071a90d8db5b62e1 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |   5123988 | SUI


-- String based data
 chain_id | nonce | block_height | timestamp_ms  |                   txn_hash                   |                           sender_address                           | destination_chain |                         recipient_address                          | token_id |     amount     
----------+-------+--------------+---------------+----------------------------------------------+--------------------------------------------------------------------+-------------------+--------------------------------------------------------------------+----------+----------------
       11 |     0 |      5861340 | 1715174472000 | HUU2xuBxHaDfxiEpWyexh1Z7DDUVzncuRP2a4tsrTVgU | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        2 |           1000
       11 |     1 |      5862057 | 1715184816000 | A4bDLKbYK1MegEjbn6EEzpgVbJ1jCK4irAKoYRbAx6i9 | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        3 |        1000000
       11 |     2 |      5862071 | 1715185020000 | 2t3CVHWMJczuK2ThZThjhBPAEL6UTwM5HnRMzyMX9YKp | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | 0x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        2 |       10000000
       11 |     3 |      5862103 | 1715185440000 | J34bAwQfGquGbFSA8eF6jG9nhxQk2FbdnnYRiq6T3mNA | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        3 |        1000000
       11 |     4 |      5862135 | 1715185968000 | 5doepLHWdFB1AsfgkdESCaCn9E9rtNsghapDmmHnZrLf | 0x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | 0x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        4 |        1000000
       11 |     5 |      5862954 | 1715197836000 | AHqBqy76PAoxcTMwrUCZbCdbiqN3tdfek6T5Yd98HFJV | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | 0x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        2 |      100000000
       11 |     6 |      5862954 | 1715197836000 | HQcFiEDstCzKK2ii4m2j3agTcHBE43rVQSjUJ9oE8pjd | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | 0x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        2 |      100000000
       11 |     7 |      5863012 | 1715198616000 | 7BLsDhMzTN5GweH4X1dPZ5YkwzuEG4YAKXdRSAGNXom3 | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | 0x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        3 |     1000000000
       11 |     8 |      5863020 | 1715198724000 | 4pUJs6HfTiq9Q23GjE3e2Ci92wnbX3LYjUQqyJtKudpY | 0x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | 0x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        1


-- Binary (bytearray)  based data
 chain_id | nonce | block_height | timestamp_ms  |                              txn_hash                              |                           sender_address                           | destination_chain |                         recipient_address                          | token_id |    amount    
----------+-------+--------------+---------------+--------------------------------------------------------------------+--------------------------------------------------------------------+-------------------+--------------------------------------------------------------------+----------+--------------
       11 |     0 |      5861340 | 1715174472000 | \xf4c43d6d3908eb9faff1ffa11cdb6646c7aa42e82d3a77a806370f5694d90b81 | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        2 |         1000
       11 |     1 |      5862057 | 1715184816000 | \x86a49bef44073ccd2a826145296f143fa0fcbab5cc249834328274a29da4d7ee | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        3 |      1000000
       11 |     2 |      5862071 | 1715185020000 | \x1beecb25e80fa2445262809d39547ad7c53eca1193ba34d5d564c0ec594ed1bf | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | \x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        2 |     10000000
       11 |     3 |      5862103 | 1715185440000 | \xfd1de5cbf82edf244e55e1ba78d8985458a3493b80d8ddceddabe03a2e488f8b | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        3 |      1000000
       11 |     4 |      5862135 | 1715185968000 | \x44dc680b05c2a2768908234ad09e7b246a9d2a06c2aca1bcec1bdaa913bc3a28 | \x1a8579b81db07f6e4828cb47d3f130314f10653b                         |                 2 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |        4 |      1000000
       11 |     5 |      5862954 | 1715197836000 | \x8a08f5e0e97eb71da1b5e30a88c3a828cb386bfab60eb587174af3206ab9315e | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | \x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        2 |    100000000
       11 |     6 |      5862954 | 1715197836000 | \xf3c735f9c5d51218b7b3f0a18fd4d5888d975fe3d1a497c8ae5381daadbd366c | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | \x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        2 |    100000000
       11 |     7 |      5863012 | 1715198616000 | \x5bcc645c06121e738d52f3806975627f6590e753d0dc7deb837172de6e0b8492 | \x25044d9f0cdd1df5a9aaba174adc8416f58dcfbc                         |                 2 | \x1b54fa3e1629cc72093bd9f6b9cf4a88091f67c9da811bdfc9a54e439c179aa6 |        3 |   1000000000
        2 |    43 |      4873310 | 1716918027775 | \x0681e6af27a82441889f4e05eedcbd26af13b049111a7358071a90d8db5b62e1 | \x2fd42dfdbd2eb7055a7bc7d4ce000ae53cc22f0c2f2006862bebc8df1f676027 |                11 | \x1a8579b81db07f6e4828cb47d3f130314f10653b             

```

## Test plan 

This is it and run the indexer for a while

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
Assets 2
Loading