Specifications#
+Specifications [DRAFT]#
+Warning
+These specs are still in active development, and are subject to change.
+This document outlines the detailed specifications for our project. Each section in this document corresponds to a different component of the system and is further divided into two categories: Functional Requirements and Security Requirements.
-
@@ -255,13 +259,14 @@
SpecificationsFunctional requirements# -
Repositories#
+Distribution system#
+Repositories#
Functional interface requirements are described in IRepository, functionality must fulfill following unit tests:
- It emits
VersionCreated
whencreateVersion
is called successfully
- - It reverts with
InvalidReleaseIncrement
if a release number is incremented by more than one
+ - It reverts with
EmptyReleaseMetadata
if no metadata is supplied increateVersion
- It reverts with
ReleaseZeroNotAllowed
if a release number is set to zero increateVersion
- When no release nor version exists:
- When version and release exists:
-
+
- It reverts with
InvalidReleaseIncrement
if a release number is incremented by more than one
+ - It reverts with
EmptyReleaseMetadata
if no metadata is supplied inupdateReleaseMetadata
- It reverts with
AlreadyInPreviousRelease
ifcreateVersion
if the same source address
- - It returns correct release count for given major version upon calling
buildCount
+ - It emits
VersionCreated
whencreateVersion
is called with valid major version increment
+ - It emits
VersionCreated
whencreateVersion
is called with valid minor version increment
+ - It returns correct count for given major version upon calling
buildCount
- It returns correct
Version
ifgetVersion
is called with valid major and minor version
+ - It returns correct
Version
ifgetVersion
is called with valid tagHash - It returns correct
Version
ifgetLatestVersion(address)
is called - It returns correct
Version
ifgetLatestVersion(uint8)
is called - It emits
ReleaseMetadataUpdated
whenupdateReleaseMetadata
is called successfully
+ - It returns correct release count if
latestRelease
is called
- It reverts with
Optional requirementsIRankifyInstanceCommons
- It emits
Installer#
-installer must implement IRepoInstaller interface, functionality must fulfill following unit tests:
+Instantiator#
+installer must implement IInstantiator interface, functionality must fulfill following unit tests:
- it emits
RepositoryAdded
ifaddRepository
is called successfully. - it emits
Instantiated
ifinstantiate
is called successfully.
- - it reverts with
RepositoryDoesNotExist
ifinstantiate
is called with non-existing repository.
- - it reverts with
VersionDoesNotMatchRequirement
ifinstantiate
version does not match.
+ - it reverts with
NotDistributing
ifinstantiate
is called with non-existing repository.
+ - it reverts with
VersionOutOfBounds
ifinstantiate
version does not match. - it emits
Repositor
Removedwhen
removeRepository` is called successfully. - it emits
Instantiated
ifinstantiateLatest
is called successfully. - it reverts with
RepositoryDoesNotExist
ifinstantiateLatest
is called with non-existing repository. - when repository already exists:
-
-
- it emits
RepositoryRequirementUpdated
ifaddRepository
is called successfully with already existing repository.
+ - it emits
DistributionChanged
ifupgradeDistribution
is called successfully with already existing repository.
- - it emits
- when
RepositoryRequirementUpdated
was emitted:-
-
- it reverts with
VersionDoesNotMatchRequirement
if instance version does not match requirement anymore.
+ - when
DistributionChanged
was emitted:-
+
- it reverts with
VersionOutOfBounds
upon calling installation methods with outdated version.
+ - it reverts with
VersionDeprecated
upon outdated version instance attempting to call installation target. - it emits
Upgraded
ifupgrade
is called successfully.
- - it reverts with
VersionDoesNotMatchRequirement
ifupgrade
is called with version that does not match the required version.
+ - it reverts with
VersionOutOfBounds
ifupgrade
is called with version that does not match the required version.
- it reverts with
- It returns correct
Repository
ifgetRepository
is called with valid instance address
@@ -334,8 +346,8 @@
InstallerInstance [TBD]#
Security requirements#
@@ -370,7 +382,6 @@Rankify MultisigApp Instances#
-Installer [TBD]#
- it reverts with