Skip to content

tool assumes 32-bit for guard/badge sizes #104

Description

@midnightveil

def set_guard(self, guard):
assert isinstance(self.referent, CNode)
assert isinstance(guard, int)
assert guard % 2**18 == guard, 'guards can be a maximum of 18 bits'
self.guard = guard
def set_guard_size(self, guard_size):
assert isinstance(self.referent, CNode)
assert isinstance(guard_size, int)
self.guard_size = guard_size
def set_badge(self, badge):
# Only endpoint caps can be badged.
assert isinstance(self.referent, Endpoint) or \
isinstance(self.referent, Notification) or \
isinstance(self.referent, SMC)
assert badge % 2**28 == badge, 'badges can be a maximum of 28 bits'
self.badge = badge

e.g. for SMC caps 64 bits of badge are allowed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions