Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev changes to master #111

Merged
merged 6 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/n3/Advances/Neo VM instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,13 @@ It's used to control the running process of NeoVM, including jump, call and othe
| Bytecode | 0x41 |
| Fee | 0 GAS |
| Function | Calls to an interop service. |

### Stack Operation

Copy, remove and swap the elements of the stack.

#### DEPTH

| Instruction | DEPTH |
|----------|------------------------------------------|
| Bytecode | 0x43 |
Expand Down Expand Up @@ -849,7 +851,6 @@ Copy, remove and swap the elements of the stack.
| Fee | 0.00000004 GAS |
| Function | Returns 0 if the input is 0. 1 otherwise. |


#### NUMEQUAL

| Instruction | NUMEQUAL |
Expand Down Expand Up @@ -906,7 +907,6 @@ Copy, remove and swap the elements of the stack.
| Fee | 0.00000008 GAS |
| Function | Returns the smaller of a and b. |


#### MAX

| Instruction | MAX |
Expand Down Expand Up @@ -1125,3 +1125,4 @@ It has implemented common operations for array, map, struct, etc.

The operation code with \* indicates that the result of the operation is not pushed back to the `EvaluationStack` using `PUSH()`.
:::

9 changes: 5 additions & 4 deletions docs/n3/Advances/Oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Neo Oracle Service is an out-of-chain data access service built into Neo N3. It

The commit-reveal mechanism is a sequential protocol that prevents data plagiarism for multiple Oracle nodes.

**Process**
#### Process

1. Oracle node submits ciphertext information (hash, signature, etc.) about data to other Oracle nodes and collects ciphertext information submitted by other Oracle nodes.

Expand All @@ -32,7 +32,7 @@ Neo Oracle Service adopts the request-response processing mechanism, which is an

![](assets/oralce_response.png)

**Process**
#### Process

1. The user writes the smart contract to call the `Request` method of the Oracle contract.

Expand All @@ -54,11 +54,11 @@ Oracle service currently supports two URL schemes, `https` and `neofs`. `https`

## Fees and rewards

- **Fees**
- ### Fees

Neo Oracle Service charges the user by the number of requests, 0.5 GAS by default for each. Besides, the user has to pay additional fees for the callback function. All the fees will be paid when the Request is created.

- **Rewards**
- ### Rewards

The fee paid by the user for the Request is distributed to the Oracle node in turn when executing the `PostPersist` logic.

Expand Down Expand Up @@ -240,3 +240,4 @@ The Code field defines the status Code for Oracle responses, including the follo
| `0x1a` | `ResponseTooLarge` | result size is out of limit | `byte` |
| `0x1c` | `InsufficientFunds` | the fee is insufficient | `byte` |
| `0xff` | `Error` | error occurs in the execution | `byte` |

2 changes: 1 addition & 1 deletion docs/n3/Advances/neofs/topics/acl-permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Note, there are multiple types of attribute filter you can apply, such as filter
Firstly we need two records. One for the `others` and one for our privileged key

```go
import "github.com/nspcc-dev/neofs-sdk-go/eacl"
import "github.com/nspcc-dev/neofs-sdk-go/eacl"

othersRecord := eacl.NewRecord()
privRecord := eacl.NewRecord()
Expand Down
2 changes: 1 addition & 1 deletion docs/n3/Advances/neofs/topics/objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fileNameAttr.SetValue(path.Base(filepath)) //path.Base(filepath) returns the las

expirationEpochAttr := new(object.Attribute)
expirationEpochAttr.SetKey("__NEOFS__EXPIRATION_EPOCH") // Reserved case for when the life of the object should expire
expirationEpochAttr.SetValue(strconv.Itoa(epoch))) //The epoch at which the object will expire
expirationEpochAttr.SetValue(strconv.Itoa(epoch)) //The epoch at which the object will expire

attributes = append(attributes, []*object.Attribute{timeStampAttr, fileNameAttr, expirationEpochAttr}...)

Expand Down
210 changes: 105 additions & 105 deletions docs/n3/Advances/neons/api/getAllRecords.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ curl --request POST \
"jsonrpc": "2.0",
"method": "invokefunction",
"params": [ "0x538355b776538a5da0b2a08c139b9900b9c0cbb6", "getAllRecords",
[
{
"type":"String","value":"flamincome.neo"
}
],
[]
[
{
"type":"String","value":"flamincome.neo"
}
],
[]
],
"id": 1
}
Expand All @@ -38,90 +38,90 @@ Response body #1

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DA5mbGFtaW5jb21lLm5lbxHAHwwNZ2V0QWxsUmVjb3JkcwwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
"state": "HALT",
"gasconsumed": "725394",
"exception": null,
"stack": [
{
"type": "InteropInterface",
"iterator": [
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "c3ViMS5mbGFtaW5jb21lLm5lbw=="
},
{
"type": "Integer",
"value": "1"
},
{
"type": "ByteString",
"value": "MTY1LjIzLjM0LjU0"
}
]
},
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "ZmxhbWluY29tZS5uZW8="
},
{
"type": "Integer",
"value": "5"
},
{
"type": "ByteString",
"value": "YWxpYXMubmVv"
}
]
},
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "ZmxhbWluY29tZS5uZW8="
},
{
"type": "Integer",
"value": "16"
},
{
"type": "ByteString",
"value": "TlpIZjFOSnZ6MXR2RUxHTFdaamhwYjNOcVpKRkZVWXB4VA=="
}
]
},
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "ZmxhbWluY29tZS5uZW8="
},
{
"type": "Integer",
"value": "28"
},
{
"type": "ByteString",
"value": "MjAwMToxZGI4OjA6Og=="
}
]
}
],
"truncated": false
}
]
}
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DA5mbGFtaW5jb21lLm5lbxHAHwwNZ2V0QWxsUmVjb3JkcwwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
"state": "HALT",
"gasconsumed": "725394",
"exception": null,
"stack": [
{
"type": "InteropInterface",
"iterator": [
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "c3ViMS5mbGFtaW5jb21lLm5lbw=="
},
{
"type": "Integer",
"value": "1"
},
{
"type": "ByteString",
"value": "MTY1LjIzLjM0LjU0"
}
]
},
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "ZmxhbWluY29tZS5uZW8="
},
{
"type": "Integer",
"value": "5"
},
{
"type": "ByteString",
"value": "YWxpYXMubmVv"
}
]
},
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "ZmxhbWluY29tZS5uZW8="
},
{
"type": "Integer",
"value": "16"
},
{
"type": "ByteString",
"value": "TlpIZjFOSnZ6MXR2RUxHTFdaamhwYjNOcVpKRkZVWXB4VA=="
}
]
},
{
"type": "Array",
"value": [
{
"type": "ByteString",
"value": "ZmxhbWluY29tZS5uZW8="
},
{
"type": "Integer",
"value": "28"
},
{
"type": "ByteString",
"value": "MjAwMToxZGI4OjA6Og=="
}
]
}
],
"truncated": false
}
]
}
}
```

Expand All @@ -137,12 +137,12 @@ curl --request POST \
"jsonrpc": "2.0",
"method": "invokefunction",
"params": [ "0x538355b776538a5da0b2a08c139b9900b9c0cbb6", "getAllRecords",
[
{
"type":"String","value":"expired.neo"
}
],
[]
[
{
"type":"String","value":"expired.neo"
}
],
[]
],
"id": 1
}
Expand All @@ -153,14 +153,14 @@ Response body #2

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DAtleHBpcmVkLm5lbxHAHwwNZ2V0QWxsUmVjb3JkcwwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
"state": "FAULT",
"gasconsumed": "622077",
"exception": "An unhandled exception was thrown. The name has expired.",
"stack": []
}
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DAtleHBpcmVkLm5lbxHAHwwNZ2V0QWxsUmVjb3JkcwwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
"state": "FAULT",
"gasconsumed": "622077",
"exception": "An unhandled exception was thrown. The name has expired.",
"stack": []
}
}
```
18 changes: 9 additions & 9 deletions docs/n3/Advances/neons/api/getRecord.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ Response body #5

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "IAwLZXhwaXJlZC5uZW8SwB8MCWdldFJlY29yZAwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
"state": "FAULT",
"gasconsumed": "1083138",
"exception": "An unhandled exception was thrown. The name has expired.",
"stack": []
}
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "IAwLZXhwaXJlZC5uZW8SwB8MCWdldFJlY29yZAwUtsvAuQCZmxOMoLKgXYpTdrdVg1NBYn1bUg==",
"state": "FAULT",
"gasconsumed": "1083138",
"exception": "An unhandled exception was thrown. The name has expired.",
"stack": []
}
}
```
40 changes: 20 additions & 20 deletions docs/n3/Advances/neons/api/roots.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ Response body

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "wh8MBXJvb3RzDBQaidSNifjBpm09PQ70gyzrzqkvFUFifVtS",
"state": "HALT",
"gasconsumed": "228888",
"exception": null,
"stack": [
{
"type": "InteropInterface",
"iterator": [
{
"type": "ByteString",
"value": "bmVv"
}
],
"truncated": false
}
]
}
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "wh8MBXJvb3RzDBQaidSNifjBpm09PQ70gyzrzqkvFUFifVtS",
"state": "HALT",
"gasconsumed": "228888",
"exception": null,
"stack": [
{
"type": "InteropInterface",
"iterator": [
{
"type": "ByteString",
"value": "bmVv"
}
],
"truncated": false
}
]
}
}
```
Loading
Loading