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

fix typos #364

Merged
merged 3 commits into from
Oct 7, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can see the current public network status on [Aergoscan](https://aergoscan.i
* Various Smart Contract Examples
* Provide some standard smart contracts
* TestNet
* Launch the Test Network to provide network for community and experment
* Launch the Test Network to provide network for community and experiment
* We provide https://aergoscan.io.

### 1st: Aergo Alpha (31, Oct, 2018)
Expand Down
12 changes: 6 additions & 6 deletions cmd/brick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This also provides a batch function to test and help to develop smart contracts.

### Aergo VM for Testing

* provides an way to run smart contracts in same environment with aergo
* provides a way to run smart contracts in same environment with aergo
* supports state db, sql
* alias for account and contract address
* able to debug smart contracts
Expand Down Expand Up @@ -42,7 +42,7 @@ powered by [go-prompt](https://github.com/c-bata/go-prompt)

### inject

creates an account and deposite aergo. `inject inject <account_name> <amount>`
creates an account and deposit aergo. `inject inject <account_name> <amount>`

``` lua
0> inject tester 100
Expand Down Expand Up @@ -148,7 +148,7 @@ clear all txs and reset the chain. `reset`
0>
```

Number before cursor is a block height. Each block contains one tx. So after reset, number becames 0
Number before cursor is a block height. Each block contains one tx. So after reset, number became 0

### batch in command line

Expand Down Expand Up @@ -189,7 +189,7 @@ $ ./brick ./example/hello.brick -v
Batch is successfully finished
INF batch exec is finished cmd=batch module=brick
```
Or user can set the option `-w` to display the batch execution results continuously according to the file changes. This is an useful feature for the development phase.
Or user can set the option `-w` to display the batch execution results continuously according to the file changes. This is a useful feature for the development phase.

## Debugging

Expand All @@ -213,7 +213,7 @@ Clear all breakpoints. `resetb`

### setw (brick / debugmode)

Set an watchpoint expression. If one of watchpoint expressions is satisfied without regard to which contract is being executed, debug mode is activated. `setw <watch_expression>`
Set a watchpoint expression. If one of watchpoint expressions is satisfied without regard to which contract is being executed, debug mode is activated. `setw <watch_expression>`

### delw (brick / debugmode)

Expand All @@ -236,7 +236,7 @@ When vm enters debugmode, prompt changes to `[DEBUG]>`. In debugmode, command se
Here we describe GUI based debugging using the zerobrane studio.

1. download [zerobrane studio](https://studio.zerobrane.com/support) (lua ide)
2. set envoronment var `LUA_PATH, LUACPATH` following an [instruction](https://studio.zerobrane.com/doc-remote-debugging)
2. set environment var `LUA_PATH, LUACPATH` following an [instruction](https://studio.zerobrane.com/doc-remote-debugging)
3. Paste `require('mobdebug').start()` at the beginning of a smart contract, you want to investigate
4. Open the contract file you want to investigate in the editor
5. In the editor, run debug server `project -> start debugger server`
Expand Down
4 changes: 2 additions & 2 deletions pkg/trie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ For example, a proof that key=0000 is not included in the tree is a proof that L
### Deleting from the tree
When a leaf is removed from the tree, special care is taken by the Update() function to keep leaf nodes at the highest subtree containing only 1 key. Otherwise, if a node has a different position in the tree, the resulting trie root would be different even though keys and values are the same.

So, when a key is deleted, Update() checks if it’s sibling is also a leaf node and moves it up until the highest subtree root containing only that non-default key.
So, when a key is deleted, Update() checks if its sibling is also a leaf node and moves it up until the highest subtree root containing only that non-default key.

![deleted](pictures/deleted.png)
*Figure 3. The same tree after deleting a blue key : LeafNode1 moves up to the highest subtree containing one key*
Expand All @@ -67,7 +67,7 @@ A node is encoded as follows:

For example, to get the children of node 3–0 at index id=1 in the array, we can access the left child 2–0 at index (2 * id + 1) = index 3 and the right child 2–1 at index (2 * id + 2) = index 4.

To each node, we append a byte flag to recognize the leaf nodes. Since the nature of Root is not know ahead of time, the byte flag is stored at the first index of the nodes array.
To each node, we append a byte flag to recognize the leaf nodes. Since the nature of Root is not known ahead of time, the byte flag is stored at the first index of the nodes array.

![batch](pictures/batch.png)
*Figure 4. A visual representation of node batching. The first batch is blue, and all 16 leaves of a batch are roots to other batches (green). A batch contains 30 nodes.*
Expand Down
Loading