Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchaintraining90 authored Mar 19, 2023
1 parent da079a4 commit a65df81
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 9 deletions.
20 changes: 13 additions & 7 deletions class 7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,23 @@ GETH Installation:
Steps to run a GETH node:
--------------------------

1. geth --datadir ethdata account new
2. nano genesis.json
1. geth --datadir ethdata account new ---> take backup or copy the address in this step
2. nano genesis.json ---> copy the contents fro, genesis.jso file from github link (https://github.com/blockchaintraining90/batch6)
3. geth --datadir=”ethdata” init genesis.json
4. geth --datadir=”ethdata” --networkid 15 --nodiscover --networkid 1999 console
5. web3.setEtherbase("0x3d2B8532E6f758068402DF5B4C105678C31cc4c7")
5. miner.start()
6. miner.stop()
5. geth attach ipc:/home/corresponding VM name/”ethdata”/geth.ipc
6. miner.setEtherbase("your account address")
7. miner.start(8)
8. web3.eth.getBalance("your account address")

7. geth attach ipc:/home/goudjagadeeshgm/Downloads/”ethdata”/geth.ipc

0x3d2B8532E6f758068402DF5B4C105678C31cc4c7
Process to get accounts:
-------------------------
cd ethdata/
cd keystore/
copy the address
use prefix of 0x




Expand Down
113 changes: 113 additions & 0 deletions class 8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
Genesis file is the configuration file to start the network for first time
Genesis block is the first block in the chain/network


get Genesis block details

Query blockchain by blockid:
-----------------------------

block id = 0

func querydata (blocknum int)


https://web3js.readthedocs.io/en/v1.8.2/

https://docs.ethers.org/v5/


Fungible tokens --> erc20 ---> same token has same face value

Non Fungible tokens --> erc721 --> diff tokens have diff values and attributes




Enterprise Blockchains:
-----------------------

Reference links ---> https://www.hyperledger.org/


Sawtooth, Iroha, Burrow, Indy, Fabric, Corda

90% ----> Fabric (praticals and labs on fabric)

1. Security
2. Faster block creation (uses diff consensus)
3. No anonimity
4. No Transaction/block fee


5 top banks wants to join a CREDIT scoring ledger use case

network details :

{
bank1 (sbi), bank2 (axis), bank3 (icici), bank4 (idfc), bank5 (hsbc)
VPC network ---->
}


Sawtooth: Linux, IBM and Intel
---------
bank1 initiated a txn to store on the ledger for customer 1 data

{

validateCust()
validateaccountStatus()
validatecreditdata()
checkanydefaultlonas()

}




Iroha:
------
1. PBFT
2. Light weight client applications

Indy:
-----
1. DID's


generateDID (name, age, mobile, mail) -----> DID0980-9890jhghgkh97979

Name: Akshay , Graduate

DID1 --> college fee reiumbersment program
DID2 --> Scholarships from international colleges
DID3 --> graduation details for eligible


Burrow/Besu:
-------------
1. ethereum specific use cases
2. solidty for smart comtracts
3. no gas fee/txn fee
4. can be used by enterprises





Ethereum --- solidity, web3.js, ethers.js
Indy --- Decentralized identity (read thru)
Fabric --- 80% of enterprise adopt this (node js, java, golang)
Corda --- (java, kotlin)



TRuffle:
---------

sudo truffle migrate inside the Metacoin directory

Hardhat:
---------

42 changes: 40 additions & 2 deletions genesis.json.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Create genesis file:
----------------------
Create genesis file: (Proof of Work)
-------------------------------------

{
"nonce": "0x0000000000000042",
"timestamp": "0x00",
Expand All @@ -19,3 +20,40 @@ Create genesis file:
"eip158Block": 0
}
}

nonce --> 64 bit hash value specified in hexadecimal for genesis block to start with (nonce should start with 98980980987097098798)

timestamp --> indicates when the network started/deployed
march 19 2023, 8:55 PM IST ----> 12365468768 ----> 0xx897907987

ParentHash ---> hexadecimal value which says previous block hash

extraData ---> unique hexadecimal value while starting the network (unique data thru which u can identify the network)

gaslimit ---> max gaslimit that can be consumed

difficulty ---> random value for each and every block in hexadecimal

mixhash ---> combination if nonce and difficulty

coinbase ---> specify the miner address as part of network (10 node address for miner process)

chainid ---> unique id for each and every blockchain (1--> Maninet, 5--> Goerli, 7545 -- Ganache)

eipblocks ---> we start the network with latest EIP blocks



https://www.asynclabs.co/blog/blockchain-development/params-in-ethereum-genesis-block-explained/

process of publishing the changes to protocol is EIP (Ethererum improvement proposals)

2017 ---> ERC20

2019 ---> ERC721

2021 ---> ERC1155

2023 ---> ERC4337

https://eips.ethereum.org/

0 comments on commit a65df81

Please sign in to comment.