From 959505a79d3c751d1a2503d8616311c6aa0f2f34 Mon Sep 17 00:00:00 2001 From: Samuel M Smith Date: Thu, 14 Dec 2023 11:21:16 -0700 Subject: [PATCH 1/2] remove SealRoot in hindsight its redundant to plain SealDigest because they are both digests and one does not know what they are a digest of without extra information. So differentiating the type of digest at the seal level is unneccessary. --- src/keri/core/eventing.py | 2 +- tests/core/test_eventing.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/keri/core/eventing.py b/src/keri/core/eventing.py index 85b45f4ea..6621d54ab 100644 --- a/src/keri/core/eventing.py +++ b/src/keri/core/eventing.py @@ -74,7 +74,7 @@ def __iter__(self): # Root Seal: uniple (rd,) # rd = Merkle tree root digest qb64 digest of anchored (sealed) data in Merkle tree -SealRoot = namedtuple("SealRoot", 'rd') +#SealRoot = namedtuple("SealRoot", 'rd') # Backer Seal: couple (bi, d) # bi = pre qb64 backer nontrans identifier prefix diff --git a/tests/core/test_eventing.py b/tests/core/test_eventing.py index 14426dc91..1d7dfd520 100644 --- a/tests/core/test_eventing.py +++ b/tests/core/test_eventing.py @@ -18,7 +18,7 @@ Seqner, Verfer, Signer, Prefixer, generateSigners, IdxSigDex, DigDex) from keri.core.eventing import Kever, Kevery -from keri.core.eventing import (SealDigest, SealRoot, SealBacker, +from keri.core.eventing import (SealDigest, SealBacker, SealEvent, SealLast, StateEvent, StateEstEvent) from keri.core.eventing import (TraitDex, LastEstLoc, Serials, versify, simple, ample) @@ -615,12 +615,12 @@ def test_seals_states(): assert seal._asdict() == dict(d='E12345') assert seal._fields == ('d',) - seal = SealRoot(rd='EABCDE') - assert isinstance(seal, SealRoot) - assert 'EABCDE' in seal - assert seal.rd == 'EABCDE' - assert seal._asdict() == dict(rd='EABCDE') - assert seal._fields == ('rd',) + #seal = SealRoot(rd='EABCDE') + #assert isinstance(seal, SealRoot) + #assert 'EABCDE' in seal + #assert seal.rd == 'EABCDE' + #assert seal._asdict() == dict(rd='EABCDE') + #assert seal._fields == ('rd',) seal = SealBacker(bi='B4321', d='EABCDE') assert isinstance(seal, SealBacker) From 578af326c21e33505874864ad73024dfb60f8e6d Mon Sep 17 00:00:00 2001 From: Samuel M Smith Date: Sat, 16 Dec 2023 12:09:58 -0700 Subject: [PATCH 2/2] reverted back to SealRoot merkle tree root digest seal --- src/keri/core/eventing.py | 2 +- tests/core/test_eventing.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/keri/core/eventing.py b/src/keri/core/eventing.py index 6621d54ab..85b45f4ea 100644 --- a/src/keri/core/eventing.py +++ b/src/keri/core/eventing.py @@ -74,7 +74,7 @@ def __iter__(self): # Root Seal: uniple (rd,) # rd = Merkle tree root digest qb64 digest of anchored (sealed) data in Merkle tree -#SealRoot = namedtuple("SealRoot", 'rd') +SealRoot = namedtuple("SealRoot", 'rd') # Backer Seal: couple (bi, d) # bi = pre qb64 backer nontrans identifier prefix diff --git a/tests/core/test_eventing.py b/tests/core/test_eventing.py index 1d7dfd520..14426dc91 100644 --- a/tests/core/test_eventing.py +++ b/tests/core/test_eventing.py @@ -18,7 +18,7 @@ Seqner, Verfer, Signer, Prefixer, generateSigners, IdxSigDex, DigDex) from keri.core.eventing import Kever, Kevery -from keri.core.eventing import (SealDigest, SealBacker, +from keri.core.eventing import (SealDigest, SealRoot, SealBacker, SealEvent, SealLast, StateEvent, StateEstEvent) from keri.core.eventing import (TraitDex, LastEstLoc, Serials, versify, simple, ample) @@ -615,12 +615,12 @@ def test_seals_states(): assert seal._asdict() == dict(d='E12345') assert seal._fields == ('d',) - #seal = SealRoot(rd='EABCDE') - #assert isinstance(seal, SealRoot) - #assert 'EABCDE' in seal - #assert seal.rd == 'EABCDE' - #assert seal._asdict() == dict(rd='EABCDE') - #assert seal._fields == ('rd',) + seal = SealRoot(rd='EABCDE') + assert isinstance(seal, SealRoot) + assert 'EABCDE' in seal + assert seal.rd == 'EABCDE' + assert seal._asdict() == dict(rd='EABCDE') + assert seal._fields == ('rd',) seal = SealBacker(bi='B4321', d='EABCDE') assert isinstance(seal, SealBacker)