Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into system-method
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhitong committed Sep 18, 2024
2 parents c8b05b7 + 7d959de commit d08886d
Show file tree
Hide file tree
Showing 121 changed files with 5,254 additions and 1,565 deletions.
1,128 changes: 0 additions & 1,128 deletions docs/n3/Advances/Neo VM instructions.md

This file was deleted.

10 changes: 2 additions & 8 deletions docs/n3/Advances/neofs/_index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
---
title: 'Neo FS Go SDK Documentation'
description: "This section covers the elements of NeoFS and the NeoFS SDK written in Go"
author: ngdenterprise
tags: [ "NEOFS"]
skill: intermediate
sidebar: true
---
# Neo FS Go SDK Documentation

## Neo Community Documentation

Please join us on the Neo discord server if you would like any support and please contribute back if you have something to add!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
---
title: "Concepts"
date: 2022-01-18T21:13:48Z
---
# Concepts

NeoFS is very carefully designed to offer the power of a filesytem with all the expected capabilities, on top of a decentralised network.

This means that files/folders etc can have permissions to who can read/write to them who can delete etc etc.

As NeoFS is built on top of the Neo blockchain, these permissions are based on wallet addresses of users.

### Objects
## Objects

[Objects](/docs/n3/neofs/topics/objects) represent all files/data that is stored on NeoFS. Objects are accessed via SessionTokens or Bearer Tokens

### Containers
## Containers

A [container](/docs/n3/neofs/topics/containers) controls the basic permissions that are applied to all content within it. Think of a container like a drive on a computer or network (and not a folder per se).

All objects must live within a container, their permissions will default to the permissions of the container

### OwnerID
## OwnerID

OwnerID is derived from the public or private key of a wallet and is unique to that wallet.

### Policies
## Policies

Container policies define the way objects will be placed among storage nodes. That is, you as the container owner can decide what type of node should store a file for you.

### EACL
## EACL

Containers and sessions/bearer tokens can have differeing permissions. By default permissions will be the same as the container's however if permissions are attached as a table to the container, or a bearer token is sent as part of a request, then they can override the permissions of the container

Read more about [ACL here](https://github.com/nspcc-dev/neofs-spec/blob/master/01-arch/07-acl.md)

### Access
## Access

Access is made using session tokens (derived from the private key), or bearer tokens, which are distributed by the container owner to others they want to be able to offer restricted capabilities (and time limits) to other users

### Wallets
## Wallets

A wallet is specifically an item that takes the NEP-6 format and contains any number of accounts. Accounts contain a public address, a private key and other information (read more here)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
title: "Libraries"
date: 2022-01-18T21:13:48Z
---
# Libraries

The Go SDK is the basis of all the functionality that is available to you as a developer with regards to NeoFS.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
title: "Overview"
date: 2022-01-18T21:13:48Z
---
# Overview

This chapter outlines the [concepts](/docs/n3/neofs/introduction/concepts) and top level points required to understand and enjoy building on neo & NeoFS

### Starting out
## Starting out

The topics here are primarily in Go, however where we have code snippets for other languages we will endeavour to add them.

Expand All @@ -31,14 +28,14 @@ This documentation is not a tutorial, it is a reference to using the SDK, howeve
5. To do so however, you will need a session token (or a bearer token but start with a session token). The session token contains a signature that validates your wallet against NeoFS.
6. You might create a container, put an object in a container, or delete an object.

### Libraries
## Libraries

[Libraries](/docs/n3/neofs/introduction/libraries) covers the packages and libraries that are required to interact with Neo and NeoFS in Go

### References
## References

* [neofs-spec](https://nspcc.ru/upload/neofs-spec-latest.pdf#13)

### With Thanks To
## With Thanks To

* [NSPCC team](https://github.com/nspcc-dev/) - team behind NeoFS, the [neo-go-sdk](https://github.com/nspcc-dev/neofs-sdk-go) and the [neo-go](github.com/nspcc-dev/neo-go) packages
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
---
title: "ACL Permissions"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# ACL Permissions

NeoFS has an awesome set of permissions you can give to containers.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Clients"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Clients

There are two types of client to be aware of and as they are both clients it can get confusing. You have a wallet client and an NeoFS client.
Interactions with NeoFS will require a NeoFS client, whereas wallet actions will require a wallet client. Note they do not reside in the same package
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Containers"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Containers

Containers manage the permissions/access of a group of objects that are being stored. Before being able to store an object, you need to create a container.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Helper functions"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Helper functions

There are some functions that don't quite fit into another topic. They will be referenced as `helper.X` in other topics

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Objects"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Objects

Objects represent items stored within a [container](/docs/n3/neofs/topics/containers). These are subject to the permissions of the container being the most relaxed possible permissions that can be applied to an object. It is possible using [Session/Bearer Tokens](/docs/n3/neofs/topics/tokens) to restrict permissions further on objects within a container however

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Policies"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Policies

Before we can create a container, we need to define the policy. A policy defines which storage nodes on NeoFS you are happy to store your data on.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Tokens"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Tokens

Tokens are required to act on any [objects](/docs/n3/neofs/topics/objects) within a [container](/docs/n3/neofs/topics/containers). Sessions last for limited time and are restricted by permissions. [Session tokens](/docs/n3/neofs/topics/tokens) use the private key to sign them while [bearer tokens](/examples/tokens) are issued to wallets by a container owner.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
title: "Wallets"
date: 2022-01-18T21:13:48Z
---

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Wallets

Almost everything you may want to do with NeoFS will require access to a wallet. Here are a few handy ways to get a wallet

Expand Down
2 changes: 1 addition & 1 deletion docs/n3/develop/write/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public string Name { [Safe] get => "name of the token"; }

When you develop the smart contract, you have to store your application data on the blockchain. When a Smart Contract is created or when a transaction awakens it, the Contract’s code can read and write to its storage space. All data stored in the storage of the smart contract are automatically persisted between invocations of the smart contract. Full nodes in the blockchain store the state of every smart contract on the chain.

Neo has provided data access interface based on key-value pairs. Data records may be read or deleted from or written to the smart contracts using keys. Besides, smart contracts may retrieve and send their storage contexts to other contracts, thereby entrusting other contracts to manage their storage areas. In C# development, smart contract can use the `Storage` Class to read/write the persistent storage The `Storage` class is a static class and does not require a constructor. The methods of `Storage` class can be viewed in this [API References](../../reference/scapi/framework/services/Storage.md)
Neo has provided data access interface based on key-value pairs. Data records may be read or deleted from or written to the smart contracts using keys. Besides, smart contracts may retrieve and send their storage contexts to other contracts, thereby entrusting other contracts to manage their storage areas. In C# development, smart contract can use the `Storage` Class to read/write the persistent storage The `Storage` class is a static class and does not require a constructor. The methods of `Storage` class can be viewed in this [API References](../../reference/scapi/framework/services/Storage/index.md)

For instance, if you want to store the total supply of your token into storage:

Expand Down
2 changes: 1 addition & 1 deletion docs/n3/foundation/Transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The system fee depends on the transaction's script, i.e., its size, number and t

![](images/transaction/system_fee.png)

where *OpcodeSet* is opcode set, *OpcodePrice<sub>i</sub>* is the cost of opcode i, *n<sub>i</sub>* is the execution times of instruction i in the contract script. For each opcode fee refer to [Fees for Instructions](../Advances/Neo VM instructions.md).
where *OpcodeSet* is opcode set, *OpcodePrice<sub>i</sub>* is the cost of opcode i, *n<sub>i</sub>* is the execution times of instruction i in the contract script. For each opcode fee refer to [Fees for Instructions](../fees.md).

### netfee

Expand Down
6 changes: 4 additions & 2 deletions docs/n3/foundation/Wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ The address script in Neo N3 has changed not using the Opcode.CheckSig and OpCod

#### Ordinary Address

1. Build a `CheckSig` script with the public key, and the format is as follows:
1. Build a `CheckSig` script with the public key, and the format is as follows:


```0x0C + 0x21 + Public Key (Compressed 33 bytes) + 0x41 + 0x56e7b327```
```
0x0C + 0x21 + Public Key (Compressed 33 bytes) + 0x41 + 0x56e7b327
```


![Account Address](images/wallets/account_address_script_checksign.png)
Expand Down
2 changes: 1 addition & 1 deletion docs/n3/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ A special system call that invokes another contract within a contract. It can be

## Storage

Each smart contract deployed on the Neo blockchain has a private storage area for storing application data. When creating a smart contract or transaction to use this contract, the contract code needs to read and write its storage. Each contract can declare a storage area. For more information refer to [Storage](reference/scapi/framework/services/Storage.md).
Each smart contract deployed on the Neo blockchain has a private storage area for storing application data. When creating a smart contract or transaction to use this contract, the contract code needs to read and write its storage. Each contract can declare a storage area. For more information refer to [Storage](reference/scapi/framework/services/storage/index.md).

## NEF

Expand Down
2 changes: 1 addition & 1 deletion docs/n3/node/gui/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Neo-GUI is an open source project, thus you can download the installation packag

:::note

- Make sure your Windows / macOS system has [.NET Core 5.0](https://dotnet.microsoft.com/download/dotnet-core/current/runtime) installed.
- Make sure your Windows / macOS system has [.NET 8.0](https://dotnet.microsoft.com/download) installed.

- When installing on the Windows system, do not install Neo-GUI under the default path C:\Program Files, or you have to run the client with the administrator privileges to connect the client to the network and download the blockchain data.

Expand Down
Loading

0 comments on commit d08886d

Please sign in to comment.