WebOfTrust / keria

KERI Agent in the cloud
https://keria.readthedocs.io/en/latest/
Apache License 2.0
17 stars 26 forks source link

Delegation seal is not processed if `s` is a number, not string. #185

Closed nkongsuwan closed 5 months ago

nkongsuwan commented 5 months ago

I found a feature that is very obscured to debug. If a delegator anchors a delegation seal using the sequence number s as number, the delegation will not be processed. I suggest Keria convert all fields to string before anchoring them into KELs.

// This doesn't work
"a": [
  {
    "i": "ELD6XjNBjQN5iBx99NjFa_j4lRKl6hKq-YTPuWke_ryq",
    "s": 0,
    "d": "ELD6XjNBjQN5iBx99NjFa_j4lRKl6hKq-YTPuWke_ryq"
  }
]
// This works
"a": [
  {
    "i": "ELD6XjNBjQN5iBx99NjFa_j4lRKl6hKq-YTPuWke_ryq",
    "s": "0",
    "d": "ELD6XjNBjQN5iBx99NjFa_j4lRKl6hKq-YTPuWke_ryq"
  }
]
pfeairheller commented 5 months ago

As designed. The sequence number field must always be a hex string.