You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mentioned 4 object categories in previous issue. The Core object is collected in the crate cyfs-core.Many object types have been collected, most of those support the functions of the current CYFS system.
common
Text
It's a common Object to describe a String.You can save a short(<=31Bytes) string in the ObjectId immediately building with the ObjectIdDataBuilder.Otherwise, you can use the Text object.
It contains 3 fields:
id: immutable
header: immutable
value mutable I can't tell the design intent from the field name, maybe it need to rename or redesign?
You can flexibly use these three fields according to your needs, for example:
Make a mutable Text,fill the id with key, and file the value with the content, header for other immutable annotation.
Make a immutable simple Text,fill the id with the content, header for immutable annotation, and value for mutable annotation.
Make a immutable large(>=64KBytes,Actually less for the header of Desc) Text, fill the value with the content, and fill the id with the hash of content to verify the value, header for immutable annotation.
Other usage
Storage
It's a common Object to describe a binary buffer(Vec),it can describe both the immutable and mutable buffer.
It contains 3 fields:
id: immutable,set by the creator.
hash: immutable,the hash of the buffer,set None if the buffer is mutable to avoid the ObjectId is changed when the buffer is changed.
value: mutable, the content of the buffer.
app
It supports the running of the system service app-manager,Various related entity objects and behavior objects are defined here.
DecApp
Describe App Details, the main fields as follow:
id: immutable, UniqueId?
source: mutable, what?
icon: mutable
desc: mutable, the description for the App
source_desc: mutable, what?
tags: tags for the App
AppCmd: Describe the control commands for APP, it has 2 fields:
app id
command code:
Add: add the app to the app list.
Remove: remove the app from the app list
Install: install the app in my zone
Uninstall: uninstall the app from my zone
Start: start the app
Stop
SetPermission: update the permission for the app
SetQuota: config the limit amout of resource for the app
SetAutoUpdate
AppCmdList
Use this object when we need to execute multiple commands sequentially.
AppList
APP list organized by category, the main fields as follow:
category: immutable, the name of the APP category
id: immutable, set by user to manage the APP category when the AppList is created, What's the different with category field? It's unique?
list of applications: mutable,The latest version is maintained by OOD in the zone.
AppLocalList What does the Local mean?
AppLocalStatus What does the Local mean?
AppManagerAction Is it related to the implementation logic of AppManager?
AppSetting
Configuration for the app.
AppStatus
id: immutable,DecAppId.
version: mutable
status: mutable, Why is it a boolean?
The latest version is maintained by OOD in the zone.
DefaultAppList
APPs that are automatically installed after the CYFS system is installed.
We use the blockchain structure to record the state evolution process of the Group.The consensus algorithm is Hotstuff.
GroupProposal
The object that prompts the infomation of group to update.It will answer the DECApp 3 questions:
Who want to update?
What does he want to update?
How to update?
The fields is follow:
rpath: immutable, rpath the blockchain is running on.there is a blockchain is running for each rpath of the group.
method: immutable,the method provided by the DECApp,it will be called with the proposal.
params: immutable, the parameters for the method, it's defined and parsed by the DECApp.
meta_block_id: immutable,the highest block on MetaChain currently,Indicates that this proposal was made after the block on MetaChain.
effective_begining: immutable, when the proposal will effective.
effective_ending: immutable, when the proposal will invalid, The proposal should be discarded if it has not reached consensus after effective_ending.
payload: mutable, A buffer reserved for DECApp, the DECApp guarantees its correctness. It's usefull when the params is large.
GroupQuorumCertificate
The certificate to the blocks for Hotstuff.It has 2 types:
QC: the quorum certificate for the previous block.
block_id: immutable,current blockid.
prev_block_id: immutable,the previous block will be proven.
round: immutable,the round of the previous block.
votes: immutable,the set of signatures for the QC.
voter: the signer
signature: the signature
TC:the timeout certificate for last round.
round: immutable,the timeout round number
votes: immutable,the set of signatures for the round
voter: the signer
high_qc_round: the max round of the block which has collect the QC.
signature: the signature
GroupConsensusBlock GroupConsensusBlock is used to describe the content of each block.
The fields is follow:
rpath: immutable, rpath the blockchain is running on.there is a blockchain is running for each rpath of the group.
body_hash: immutable, the hash of GroupConsensusBlock, is used to verify the body.
result_state_id: immutable, the ObjectId of the result calculated by the DECApp,
height: immutable, the height of the block.
meta_block_id: immutable,the highest block on MetaChain currently,Indicates that this block was constructed after the block on MetaChain.
round: immutable,the round to vote for the block,used by Hotstuff.
group_chunk_id: immutable,the version of Group the block is depend on.
proposals: immutable,save in body, verify by body_hash,the set of the proposals(proposal/result/receipt/context) collected by the block.
qc: immutable,save in body, verify by body_hash,the quorum certificate for the previous block.
tc: immutable,save in body, verify by body_hash,the timeout certificate for last round.
nft
NFT is a popular application scenario in recent years.CYFS collect and defined its own NFT objects.In theory,any named data is NFT in CYFS,but most NFTs are files in fact.So NFT is limited to file types.
* NFTList
Is a file list:
* nft_list: immutable, file list.
trans
I don't know this part?
TransContext
zone
It's the manager of the devices belonging to the same owner.
Zone
The field is follow:
owner: immutable
ood_list: mutable
known_device_list: mutable How to maintain the latest version of the Body?
The text was updated successfully, but these errors were encountered:
streetycat
changed the title
Introduction CYFS for Developers(Part6-2): Components (cyfs-core) Docs
Introduction CYFS for Developers(Part6-2): Components (cyfs-core)
Mar 25, 2023
streetycat
changed the title
Introduction CYFS for Developers(Part6-2): Components (cyfs-core)
Introduction CYFS for Developers(Part6-2): Components:cyfs-core
Mar 25, 2023
streetycat
changed the title
Introduction CYFS for Developers(Part6-2): Components:cyfs-core
Introduction CYFS for Developers(Part6-2): Components(cyfs-core)
Mar 25, 2023
cyfs-core
I mentioned 4 object categories in previous issue. The
Core
object is collected in the cratecyfs-core
.Many object types have been collected, most of those support the functions of the currentCYFS
system.common
Text
It's a common
Object
to describe aString
.You can save a short(<=31Bytes) string in theObjectId
immediately building with theObjectIdDataBuilder
.Otherwise, you can use theText
object.It contains 3 fields:
I can't tell the design intent from the field name, maybe it need to rename or redesign?
You can flexibly use these three fields according to your needs, for example:
Text
,fill theid
with key, and file thevalue
with the content,header
for other immutable annotation.Text
,fill theid
with the content,header
for immutable annotation, andvalue
for mutable annotation.Desc
)Text
, fill thevalue
with the content, and fill theid
with the hash of content to verify thevalue
,header
for immutable annotation.Storage
It's a common
Object
to describe a binary buffer(Vec),it can describe both the immutable and mutable buffer.It contains 3 fields:
None
if the buffer is mutable to avoid theObjectId
is changed when the buffer is changed.app
It supports the running of the system service
app-manager
,Various related entity objects and behavior objects are defined here.Describe App Details, the main fields as follow:
Use this object when we need to execute multiple commands sequentially.
APP list organized by category, the main fields as follow:
What does the
Local
mean?What does the
Local
mean?Is it related to the implementation logic of AppManager?
Configuration for the app.
The latest version is maintained by OOD in the zone.
APPs that are automatically installed after the CYFS system is installed.
group
There is a issue for it.The core objects for
group
is implemented incyfs-core
.We use the blockchain structure to record the state evolution process of the
Group
.The consensus algorithm isHotstuff
.GroupProposal
The object that prompts the infomation of group to update.It will answer the
DECApp
3 questions:The fields is follow:
rpath
the blockchain is running on.there is a blockchain is running for eachrpath
of thegroup
.DECApp
,it will be called with theproposal
.DECApp
.MetaChain
currently,Indicates that this proposal was made after the block onMetaChain
.DECApp
, theDECApp
guarantees its correctness. It's usefull when the params is large.GroupQuorumCertificate
The certificate to the
blocks
forHotstuff
.It has 2 types:QC
.QC
.GroupConsensusBlock
GroupConsensusBlock
is used to describe the content of each block.The fields is follow:
rpath
the blockchain is running on.there is a blockchain is running for eachrpath
of thegroup
.GroupConsensusBlock
, is used to verify thebody
.ObjectId
of the result calculated by theDECApp
,MetaChain
currently,Indicates that this block was constructed after the block on MetaChain.Hotstuff
.Group
the block is depend on.body
, verify bybody_hash
,the set of the proposals(proposal/result/receipt/context) collected by the block.body
, verify bybody_hash
,the quorum certificate for the previous block.body
, verify bybody_hash
,the timeout certificate for last round.nft
NFT is a popular application scenario in recent years.CYFS collect and defined its own NFT objects.In theory,any
named data
isNFT
inCYFS
,but most NFTs are files in fact.So NFT is limited to file types.* NFTList
Is a file list:
* nft_list: immutable, file list.
trans
I don't know this part?
zone
It's the manager of the devices belonging to the same owner.
The field is follow:
How to maintain the latest version of the
Body
?The text was updated successfully, but these errors were encountered: