antIggl / xrpl-unl-manager

Set of scripts to encode/decode and manage Unique Node Lists for XRPL networks.
ISC License
7 stars 5 forks source link

manifests that have domains in them aren't decoded correctly #2

Closed antIggl closed 3 years ago

antIggl commented 4 years ago

@antIggl - Here's a snippet that I wrote to fetch manifests. Using the utils.py

import utils
import sqlite3
import codecs
conn = sqlite3.connect('wallet.db')
c = conn.cursor()
for row in c.execute('select quote(RawData) from ValidatorManifests'):
     b64 = codecs.encode(codecs.decode(row[0][2:-1], 'hex'), 'base64').decode()
     print(utils.decodeManifest(b64))
conn.close()

Works fine! Just a thing to note, that manifests that have domains in them aren't decoded correctly, from my initial observation.

Originally posted by @alloyxrp in https://github.com/antIggl/xrpl-unl-manager/issues/1#issuecomment-655393034

antIggl commented 4 years ago

First look. I ignored lots of fields for the deserialization. There are 2 options:

  1. develop a module/lib that does the deserialization and the serialization properly.
  2. Add support only for those fields required for the manifest serialization and deserialization.

I will go with the 2nd one for now. Maybe, a Python wrapper of the serialization and deserialization source code from rippled repo will do the job for the 1.

alloynetworks commented 4 years ago

current-manifests.txt Here's a list of manifests of validators found in https://vl.ripple.com in base64 . You will see that one of them will fail to be decoded.

antIggl commented 4 years ago

Thank you @alloyxrp. I think that we covered all the fields that might be embedded in the manifest of a validator. Do we?

alloynetworks commented 4 years ago

Yes, these are the fields that are currently in use.