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

core/statedb: Update Copy function #6

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3f10d1f
fix link to technical white paper in README.md
vuvoth Feb 10, 2022
2adc0cf
Merge pull request #343 from vuvth/fix-link-to-technical-white-paper-…
thanhnguyennguyen Feb 10, 2022
ee84d21
README: update block explorer
thanhnguyennguyen Feb 10, 2022
8792618
update version
endale98 Jun 2, 2023
4f8fd03
Chore: Add Tomo docs
Jun 5, 2023
3e2c671
Chore: Add Tomo docs
Jun 5, 2023
e125369
Chore: Change Tomo docs
Jun 5, 2023
e2d98f3
Chore: Change Tomo docs
Jun 5, 2023
bbe4565
Chore: Change Tomo docs
Jun 5, 2023
69e9f2c
Chore: Change Tomo docs
Jun 5, 2023
63f9117
Fix: Tomo docs
c98tristan Jun 6, 2023
0f973d0
Merge pull request #1 from c98tristan/chore/add-berlin
c98tristan Jun 6, 2023
a4ef027
Chore: Update tomo deps
c98tristan Jun 6, 2023
2c6a865
Chore: Update golang version
c98tristan Jun 6, 2023
012d363
Merge pull request #2 from c98tristan/chore/add-berlin
c98tristan Jun 6, 2023
76420ee
Merge pull request #354 from endale98/develop
tungng98 Jun 12, 2023
fd38a6d
Merge branch 'master' of github.com:tomochain/tomochain into chore/ad…
c98tristan Jun 12, 2023
7a6abf8
Merge branch 'master' of github.com:tomochain/tomochain into chore/ad…
c98tristan Jun 12, 2023
1b46246
Merge branch 'master' of github.com:tomochain/tomochain into chore/ad…
c98tristan Jun 12, 2023
de49761
Merge pull request #4 from c98tristan/chore/add-berlin
c98tristan Jun 12, 2023
b8f08e8
core/state: rework dirty handling to avoid quadratic overhead
holiman Oct 1, 2017
f6f972b
core/statedb: fix SubRefund
c98tristan Jun 19, 2023
0fc35a7
Chore: Remove old docs
c98tristan Jun 19, 2023
55d9450
core/state: avoid linear overhead on journal dirty listing
karalabe Mar 27, 2018
c29f6a6
Merge pull request #5 from c98tristan/merge-go-ethereum
c98tristan Jun 19, 2023
52517e9
core/state: fix ripemd-cornercase in Copy
holiman Apr 11, 2018
acdafb1
core/state: fix bug in copy of copy State
holiman Apr 10, 2018
65ca164
core/statedb_test: update TestCopyOfCopy
c98tristan Jun 20, 2023
f64af04
core/asm: accept uppercase instructions (#16531)
dm4 Apr 19, 2018
69746b1
core/asm: correct comments typo (#16974)
caesarchad Jun 14, 2018
bab87b0
core/state: cache missing storage entries (#16584)
fjl Apr 27, 2018
5af6373
core: fix typo in comment code
hadv Jun 5, 2018
d32c7b8
chore: add access list
c98tristan Jul 4, 2023
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ profile.cov
/dashboard/assets/package-lock.json

**/yarn-error.log


.env
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Security, stability, and chain finality are guaranteed via novel techniques such
Tomochain supports all EVM-compatible smart-contracts, protocols, and atomic cross-chain token transfers.
New scaling techniques such as sharding, private-chain generation, and hardware integration will be continuously researched and incorporated into Tomochain's masternode architecture. This architecture will be an ideal scalable smart-contract public blockchain for decentralized apps, token issuances, and token integrations for small and big businesses.

More details can be found at our [technical white paper](https://tomochain.com/docs/technical-whitepaper---1.0.pdf)
More details can be found at our [technical white paper](https://tomochain.com/wp-content/uploads/2020/07/technical-whitepaper-1.0.pdf)

Read more about us on:

- our website: http://tomochain.com
- our blogs and announcements: https://medium.com/tomochain
- our documentation portal: https://docs.tomochain.com
- our blockchain explorer: https://scan.tomochain.com/
- our blockchain explorer: https://tomoscan.io

## Building the source

Expand Down
187 changes: 187 additions & 0 deletions SimpleDocs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
## Install

### Golang

[https://go.dev/dl/](https://go.dev/dl/)

Golang MacOS - amd64

Set GOROOT và GOPATH (arcording to computer)

```bash
curl -o golang.pkg https://dl.google.com/go/go1.20.4.darwin-amd64.pkg
sudo open golang.pkg
```

```bash
export GOROOT=$HOME/usr/local/go
export GOPATH=$HOME/go
```

### Tomo

Create tomo folder

```bash
mkdir tomo
cd tomo
```

Install Tomo and library

```bash
git clone https://github.com/tomochain/tomochain/
cd tomochain
go mod tidy -e
make all
cd ..
```

Alias for tomo:

```bash
alias tomo=$PWD/tomochain/build/bin/tomo
alias puppeth=$PWD/tomochain/build/bin/puppeth
alias bootnode=$PWD/tomochain/build/bin/bootnode
```

## Setup node and account

- Create nodes file
```bash
mkdir nodes
cd nodes
mkdir 1
cd ..
```
- Create account or import account (with your private key) (at least 2 account)

- Create Keystore directory:
`mkdir keystore`

- Create a password directory:
Example: `mkdir $HOME/pw`

`export PASSWORD_DIRECTORY=[DIRECTORY TO STORE PASSWORD OF KEYSTORE FILE]`

- Create new account:
```bash
touch $PASSWORD_DIRECTORY/pw.txt
echo [YOUR_PASSWORD] >> $PASSWORD_DIRECTORY/pw.txt
```
```bash
tomo account new \
--password $PASSWORD_DIRECTORY/pw.txt \
--keystore $PWD/keystore/1
```
- Import account:

- Create a private key directory:
Example: `mkdir $HOME/pk`

`export PRIVATE_KEY_DIRECTORY=[DIRECTORY TO STORE PRIVATE KEY]`

```bash
touch $PRIVATE_KEY_DIRECTORY/pk.txt
echo [YOUR_PRIVATE_KEY] >> $PRIVATE_KEY_DIRECTORY/pk.txt
```

```bash
tomo account import $PRIVATE_KEY_DIRECTORY/pk.txt \
--keystore $PWD/keystore/1 \
--password $PRIVATE_KEY_DIRECTORY/pk1txt
```

## Create genesis file with `puppeth`

- Run `puppeth`
```bash
puppeth
```
- Set chain name: `c98chain`
- Configure new genesis: `2`
- Select `POSV` consensus: `3`
- Set blocktime (default 2 seconds): `Enter`
- Set reward of each epoch: `250`
- Set addresses to be initial masternodes: Account address created before
- Set account to seal: Account 1
- Set number of blocks of each epoch (default 900): `Enter`
- Set gap: `5`
- Set foundation wallet address: `Enter`
- Account confirm Foundation MultiSignWallet: Account address created before
- Require for confirm tx in Foudation MultiSignWallet: `1`
- Account confirm Team MultiSignWallet: Account address created before
- Require for confirm tx in Team MultiSignWallet: `1`
- Enter swap wallet address for fund 55 million TOMO: Account address created before
- Enter account be pre-funded:
```bash
1BE6F1C0BAc392980262b084306751FD34Ab4462
32911b48d723F04c92B8fda38CBa6dC1D2B4d058
951564eD947442dF0088df5a52CC8F665520a45f
1BE6F1C0BAc392980262b084306751FD34Ab4462
756A6142dd54dD0b19cC6589Cffd81b23E67171b
c980E9513D8983cA507F4A44946036ea069239d1
```
- Enter network ID: `3172`
- Export genesis file
- Select `2. Manage existing genesis`
- Select `2. Export genesis configuration`
- Enter genesis filename: `genesis.json`
- `Ctrl + C` to end

## Init node with genesis file

```bash
tomo --datadir nodes/1 init genesis.json
```

## Setup bootnode

- Init bootnode key
```bash
bootnode -genkey bootnode.key
```
- Start bootnode

```bash
bootnode -nodekey ./bootnode.key
```

Get bootnode info

`BOOTNODE_INFO` example: `"enode://372853cfc9cc509bdd79db961cf791e8b2c8fdbadd5b4a25b0e59187f3be9a6e1d26e381f8ed4ae71d81c72ad7f53430af605955293df66660232ad235633880@[::]:30301"`

## Run node

- Open new terminal
`export PASSWORD_DIRECTORY=[DIRECTORY TO STORE PASSWORD OF KEYSTORE FILE]`

`alias tomo=$PWD/tomochain/build/bin/tomo`

`YOUR_ACCOUNT_ADDRESS` example: `"0x79d3620f9379d043eaea262f1cac689fc906d5a1"`

- Node 1

```bash
tomo --syncmode "full" \
--datadir nodes/1 --networkid 3172 --port 10303 \
--keystore keystore/1 --password $PASSWORD_DIRECTORY/pw.txt \
--rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 1545 --rpcvhosts "*" \
--rpcapi "admin,db,eth,net,web3,personal,debug" \
--gcmode "archive" \
--ws --wsaddr 0.0.0.0 --wsport 1546 --wsorigins "*" --unlock [YOUR_ACCOUNT_ADDRESS] \
--identity "NODE1" \
--mine --gasprice 2500 \ --bootnodesv5 [BOOTNODE_INFO] \
console
```

- Node 1 can Commit and seal block

## Connect node to sync and execute

- Open IPC node 1
```bash
tomo attach nodes/1/tomo.ipc
```

→ Successful create node.
Loading