-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Adding casper deployment instruction to readme.md #152 #162
base: master
Are you sure you want to change the base?
Conversation
According to your README, params of init() like this.
But in https://github.com/ethereum/casper/blob/master/casper/contracts/simple_casper.v.py#L130
I do not have confidence, but I think that |
e.g.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see y'all made it through the deploy!
I generally want to be less verbose in the readme. The high level details are more important than the python specific implementation.
Take a look at my notes and let me know if you ahve any questions.
README.md
Outdated
|
||
### Step 1: Imports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want this to be way less system specific. Think, high level notes and a little bit of pseudocode. So we don't need to deal with imports
README.md
Outdated
|
||
### Step 2: Raise the Gas Limit | ||
|
||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just note that the contract costs a lot of gas (can give a number) and that if they are deploying via a normal CREATE tx, then they need to make sure the block gas limit is high enough
README.md
Outdated
|
||
[Link to the web3.py documentation.](https://github.com/ethereum/web3.py) | ||
```bash | ||
base_tester = EthereumTester(PyEVMBackend()) ## instantiates the eth-test suite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just assume a web3
object exists. People will be deploying via all sorts of framekworks so the particulars here aren't important.
README.md
Outdated
|
||
### Step 4: Deploy Helper Contracts | ||
NOTE: In addition to the two helper contracts `msg_hasher` and `purity_checker` you also need to deploy the `rlp_decoder` Contract. On a production chain, an `rlp_decoder` contract is already deployed and vyper’s standard internal library knows it’s address and gives vyper contracts access to some functionality at that address. | ||
**When using a test chain, these helper contract must be deployed before the casper contract.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important to note that rlp_decoder
must be deployed before compiling the casper contract.
README.md
Outdated
NOTE: In addition to the two helper contracts `msg_hasher` and `purity_checker` you also need to deploy the `rlp_decoder` Contract. On a production chain, an `rlp_decoder` contract is already deployed and vyper’s standard internal library knows it’s address and gives vyper contracts access to some functionality at that address. | ||
**When using a test chain, these helper contract must be deployed before the casper contract.** | ||
|
||
NOTE: these helper contracts are currently written in serpenat, so until they are converted to Vyper it is best to use the hardcoded transaction hex below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"These helper contracts can be deployed via the below pre-signed txs. Instructions for compiling and deploying via other methods will soon be available."
README.md
Outdated
### Step 6: Compiling and Deploying Casper | ||
```bash | ||
|
||
file = open(os.getcwd()+('/casper/contracts/simple_casper.v.py')) #this will change depending on where the casper contract is located relative to your current working directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should show how casper is compiled from the command line, rather than from python. Don't worry about showing how to open files.
vyper simple_casper.v.py
vyper -f abi simple_casper.v.py
I am glad to receive your reply. I understand your policy but your readme maybe incorrect. |
README.md
Outdated
w3.eth.sendTransaction({'to': casper_address, 'value': 10**21}) | ||
|
||
casper_contract = w3.eth.contract(address=casper_address, abi=casper_abi) | ||
casper_contract.functions.init(*casper_args).transact() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it will not work with the latest version because casper_args is not correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the hint. I will double check this issue.
I made a pull request to fix "casper_args". If you like, please refer it. Thanks. |
Add null_sender to the params of init()
Readmedeploy
@djrtwo I tried to incorporate your comments. Please review. |
Hi @djrtwo I think this one might be with you for review, no? Hope you're doing well 🙂 |
No description provided.