Skip to content

Revisit Teacher.stamp_is_valid() logic #1044

@cygnusv

Description

@cygnusv

Weird things that were merged too fast with #1040:

  • What happens if self.federated_only and self._identity_evidence is NOT_SIGNED? Currently, the method simply finishes without returning a value (hence, returning None).
  • The logic for decentralized validation is the following:
            # Off-chain signature verification
            if self._stamp_has_valid_wallet_signature():
                self.verified_stamp = True
                return True

            # On-chain staking check
            if verify_staking:
                self._is_valid_worker()

It seems that the on-chain checks are never hit when self._stamp_has_valid_wallet_signature(), since it returns True. Or conversely, the only way to do the on-chain check is to fail the stamp's signature verification, which is wrong.

In any case, I'm working in #1033 in alhambra-verde and I'll fix this too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛Broken functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions