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
cargo r -p ol -- init --update-waypoint --waypoint $(shell cat ${DATA_PATH}/client_waypoint)
410
+
416
411
@echo client_waypoint:
417
412
@cat ${DATA_PATH}/client_waypoint
418
413
@@ -450,71 +445,65 @@ debug:
450
445
make smoke-onboard <<<$$'${MNEM}'
451
446
452
447
453
-
##### DEVNET TESTS #####
448
+
#### TESTNET #####
449
+
# The testnet is started using the same tools as genesis to have a faithful reproduction of a network from a clean slate.
454
450
455
-
devnet: clear fix dev-wizard dev-genesis start
456
-
# runs a smoke test from fixtures.
457
-
# Uses genesis blob from fixtures, assumes 3 validators, and test settings.
458
-
# This will work for validator nodes alice, bob, carol, and any fullnodes; 'eve'
451
+
# 1. The first thing necessary is initializing testnet genesis validators. All genesis nodes need to set up environment variables for their namespace/personas e.g. NS=alice. Also the TEST=y mode must be set, as well as a chain environment e.g. NODE_ENV=test. These settings must be done manually, preferably in .bashrc
# We want to simulate the onboarding/new validator fetching genesis files from the mock archive: dev-genesis-archive
453
+
# 2. Next those validators will register config data to a github repo OLSD/dev-genesis. Note: there could be github http errors, if validators attempt to write the same resource simultaneously
464
454
465
-
# mock restore backups from dev-epoch-archive
466
-
rm -rf ~/.0L/restore
467
-
# restore from MOCK archive OLSF/dev-epoch-archive
468
-
cargo r -p ol -- restore
469
-
# start a node with fullnode.node.yaml configs
470
-
make start-full
455
+
# THESE STEPS ARE ACHIEVED WITH `make testnet-register`
471
456
472
-
dev-wizard:
473
-
# REQUIRES there is a genesis.blob in the fixtures/genesis/<version> you are testing
474
-
MNEM='${MNEM}' cargo run -p onboard -- val --prebuilt-genesis ${DATA_PATH}/genesis.blob --skip-mining --chain-id 1 --genesis-ceremony
457
+
# 3. Wait. All genesis nodes need to complete registration. Otherwise buidling a genesis.blob (the first block), will fail.
458
+
#4. Each genesis node builds the genesis file locally, and submits to the github repo. (this remote genesis file is what subsequent non-genesis validators will use to bootstrap their db).
459
+
# 5. Genesis validators can start their nodes.
475
460
476
-
#### DEVNET RESTART ####
477
-
# usually do this on Alice, which has the dev-epoch-archive repo, and dev-genesis
461
+
# THESE STEPS ARE ACHIEVED WITH `make testnet`
478
462
479
-
# Do the ceremony: and also save the genesis fixtures, needs to happen before fix.
480
-
dev-register: clear fix dev-wizard gen-register
481
-
# Do a dev genesis on each node after EVERY NODE COMPLETED registration.
482
-
dev-genesis: genesis dev-save-genesis fix-genesis
483
463
484
-
#### DEVNET INFRA ####
485
-
# To make reproducible devnet files.
464
+
# 6. Assuming there is progress in the block production, subsequent validators can join.
486
465
487
-
# Save the files to mock infrastructure i.e. devnet github
488
-
dev-infra: dev-backup-archive dev-commit
466
+
# THIS IS ACHIEVED WITH: testnet-onboard
489
467
490
-
dev-save-genesis: set-waypoint
491
-
rsync -a ${DATA_PATH}/genesis*${SOURCE}/ol/devnet/genesis/${V}/
492
-
git add ${SOURCE}/ol/devnet/genesis/${V}/
493
468
494
-
dev-backup-archive:
495
-
cd${HOME}/dev-epoch-archive && make devnet-backup
469
+
#### 1. TESTNET SETUP ####
496
470
497
-
dev-commit:
498
-
git commit -a -m "save genesis fixtures to ${V}"|true
499
-
git push |true
471
+
testnet-init: clear fix
472
+
# REQUIRES there is a genesis.blob in the fixtures/genesis/<version> you are testing
473
+
MNEM='${MNEM}' cargo run -p onboard -- val --skip-mining --chain-id ${CHAIN_ID} --genesis-ceremony
500
474
475
+
# Do the genesis ceremony registration, this includes the step testnet-validator-init-wizard
476
+
testnet-register: testnet-init gen-register
477
+
# Do a dev genesis on each node after EVERY NODE COMPLETED registration.
478
+
479
+
# Makes the gensis file on each genesis validator, AND SAVES TO GITHUB so that other validators can be onboarded after genesis.
480
+
testnet-genesis: genesis set-waypoint
481
+
cargo run -p diem-genesis-tool ${CARGO_ARGS} -- create-repo \
482
+
--publish-genesis ${DATA_PATH}/genesis.blob \
483
+
--shared-backend ${GENESIS_REMOTE}
484
+
485
+
cargo run -p diem-genesis-tool ${CARGO_ARGS} -- create-repo \
# Do this to restart the network with new code. Assumes a registration has been completed, and the genesis validators are unchanged. If new IP addresses or number of genesis nodes changed, you must RERUN SETUP below.
492
+
# - builds stdlib from source
493
+
# - clears many of the home files
494
+
# - adds fixtures
495
+
# - initializes node configs
496
+
# - rebuids genesis files and shares to github genesis repo
Skip straight to [toubleshooting onboarding a node to network.](ol/documentation/node-ops/validators/troubleshoting_onboarding.md)
22
+
Skip straight to [troubleshooting onboarding a node to network.](ol/documentation/node-ops/validators/troubleshoting_onboarding.md)
23
23
24
24
Contribute to [issues](https://github.com/OLSF/libra/issues).
25
25
@@ -43,7 +43,7 @@ This is a non-exhaustive summary of the key features of the Diem architecture th
43
43
The smart-contract language of the platform is called Move. It is the most unique breakthrough of the team. This is a language that is designed to be extremely safe in adversarial environments, and for hurried, less experienced developers. It's a very ergonomic language, it's easy to approach it if you have even entry-level coding experience. In terms of safety it incorporates much from the Rust language concepts of "borrowing" memory. The compiler is pretty obnoxious, which is something you want when designing autonomous financial systems. One standout feature of the Move language is built-in Formal Verification. Adjacent to the code you can write specs for invariants which your code must preserve (i.e. this function should never be called by this type of account), and it can be checked during the development and build process. This is unique and powerful.
44
44
45
45
### Programming model
46
-
The execution of the smart contract and scripts has some subtle but important safety features. By design what are referred to in other platforms as smart-contracts are in fact "modules" here. Users can publish modules, which any other module or transaction can import. This is important. The transactions are scripts. So compared to Ethereum, much of what happens in a smart contract, can actually be split into longlived code in a module, and transaction-scripts which can import from the module (and other modules). This decoupling allows for powerful composability and reliability. The developer can evolve the application without necessarily needing to upgrade modules every time a new transaction use-case emerges.
46
+
The execution of the smart contract and scripts has some subtle but important safety features. By design what are referred to in other platforms as smartcontracts are in fact "modules" here. Users can publish modules, which any other module or transaction can import. This is important. The transactions are scripts. So compared to Ethereum, much of what happens in a smart contract, can actually be split into long-lived code in a module, and transaction-scripts which can import from the module (and other modules). This decoupling allows for powerful composability and reliability. The developer can evolve the application without necessarily needing to upgrade modules every time a new transaction usecase emerges.
47
47
48
48
Modules can have "resources" bound to them. A resource can be thought of as an object in memory, but with restrictions: they can only be modified by the module that instantiated them, and are restricted in how they get created and transferred. Writing a non-fungible token is basically just instantiating one such structure, and something like a fungible token, can be done in a handful of lines of code.
49
49
@@ -75,7 +75,7 @@ The technology we are inheriting is a spaceship. It is also purely infrastructur
75
75
76
76
But most importantly, the architecture is designed as a private, consortium chain.
77
77
78
-
For system administration, there is on omnipresent Diem Association account. Yes, a private key that controls many functions including: Freezing accounts (!), selecting validators for inclusion, paying transaction fees to validators, upgrading the system code. This is obviously a non-starter. So a lot of work had to go into making system policies execute in a permissionless environment.
78
+
For system administration, there is an omnipresent Diem Association account. Yes, a private key that controls many functions including: Freezing accounts (!), selecting validators for inclusion, paying transaction fees to validators, upgrading the system code. This is obviously a non-starter. So a lot of work had to go into making system policies execute in a permissionless environment.
79
79
80
80
We also had to add Sybil resistance mechanisms. Typically communities have been choosing Proof-of-Stake as the Sybil resistance method for BFT networks. This is not the route we chose given community growth considerations (as well as regulatory). Elsewhere we've talked in detail about our Delay Towers complement to consensus.
81
81
@@ -134,10 +134,10 @@ We've made some additions to the MoveVM that were necessary for us to implement
134
134
135
135
- Decimal - we needed a number type that could be used for financial math that could lead into polynomial curves etc. So we added the Rust Decimal library and some initial APIs and their corresponding native instructions.
136
136
137
-
- VDF verification - to verify the Delay Towers proofs we added the ChiaVDF verifier to the VM. The prover is not needed in the VM. The VDF prover can accept a number of parameters (not hardcoded for 0L's use-case). So application builders could leverage it in their own games.
137
+
- VDF verification - to verify the Delay Towers proofs we added the ChiaVDF verifier to the VM. The prover is not needed in the VM. The VDF prover can accept a number of parameters (not hardcoded for 0L's usecase). So application builders could leverage it in their own games.
138
138
139
139
### Auto Pay
140
-
The ability to create payments in the future, and regular payments as a percent of account balance or of new income. This was a feature requested early by the community. It powers a number of use-cases important at the start of a network.
140
+
The ability to create payments in the future, and regular payments as a percent of account balance or of new income. This was a feature requested early by the community. It powers a number of usecases important at the start of a network.
141
141
Namely it is useful for anyone that wants to run a community program. In this case an entity or a person is seeking to accomplish a goal or a project, and is asking for donations. Autopay allows for set-it-and-forget-it donations to programs. Most people in 0L use this to send a portion of their mining rewards to programs automatically.
0 commit comments