Comments (4)
Hi again, while waiting, I decided to use the underlying repos to achieve my goal and my goal is having a reproducible subnet dev env on my local machine. I'm also planning to write it as a tutorial for the community.
OS: Windows 10 with WSL2 (with WSL I can easily configure and run Ubuntu VM's as much as I need. I can also get snapshot of these VM's. So, If i break anything I can return back)
What I'd like to have: I'd like to prepare a configurable Ubuntu Subnet VM. And in my local Windows Machine I'd like to access this VM from hardhat and also from Metamask. By doing so, I can focus on development.
What I tried lastly on my Ubuntu VM:
- Installed GO
- Installed AvalancheGo from source
- Installed Subnet-EVM from source (as a plugin for avalanchego)
- Installed Subnet-CLI from source
- Installed AvalancheNetworkRunner from source
After these steps, I'm able to run server with the following command (I can set the port here, so I assume I can start mutliple servers by setting their ports different. I didn't try it yet)
avalanche-network-runner server --log-level debug --port=":8080" --grpc-gateway-port=":8081"
At this step, to deploy subnet I use the following commands
`
export CHAIN_ID=99999
export GENESIS_ADDRESS="0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC"
cat < /tmp/subnet-evm.genesis.json
{
"config": {
"chainId": $CHAIN_ID,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"subnetEVMTimestamp": 0,
"feeConfig": {
"gasLimit": 20000000,
"minBaseFee": 1000000000,
"targetGas": 100000000,
"baseFeeChangeDenominator": 48,
"minBlockGasCost": 0,
"maxBlockGasCost": 10000000,
"targetBlockRate": 2,
"blockGasCostStep": 500000
}
},
"alloc": {
"${GENESIS_ADDRESS}": {
"balance": "0x52B7D2DCC80CD2E4000000"
}
},
"nonce": "0x0",
"timestamp": "0x0",
"extraData": "0x00",
"gasLimit": "0x1312D00",
"difficulty": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
EOF
cat /tmp/subnet-evm.genesis.json
AVALANCHEGO_EXEC_PATH="~/avalanchego/build/avalanchego"
AVALANCHEGO_PLUGIN_PATH="~/avalanchego/build/plugins"
avalanche-network-runner control start
--log-level debug
--endpoint="0.0.0.0:8080"
--avalanchego-path ${AVALANCHEGO_EXEC_PATH}
--plugin-dir ${AVALANCHEGO_PLUGIN_PATH}
--custom-vms '{"subnetevm":"/tmp/subnet-evm.genesis.json"}'
`
And it's successfully starting. But everytime I run these commands, I get different rpc urls which I use in my hardhat config and metamask networks.
So, still I need to update my dev env daily. If someone can give me any idea or point me to the correct documentation, I'd be appreceated. As a non Go (not planning to be also) developer, it's really difficult to follow both docs and examples. Thanks.
from avalanche-cli.
It has been 16 days and you made too many changes during this period. Why is no one answering? @dasconnor @holisticode @yulin-dong @patrick-ogrady @michaelbnewman
from avalanche-cli.
Hi @huseyindeniz sorry for the delay and the silence. We are indeed making progress and many changes.
Snapshot support is already available. With snapshots, your state will be saved and thus will survive machine restarts. In the upcoming release we're adding the functionality to start from snapshots. Also, multiple subnets deploy will be available.
Please note we are still very early in this tool with 0.x releases. There is a lot of functionality missing, and at the same time things can change quickly. Thanks for being a user of the tool, all suggestions and feedback is welcome.
from avalanche-cli.
Hi @holisticode , thank you very much for the feedback. As I understand, I'll take a snapshot at the end of the day, and then I'll start with the snapshot on the next day. And multiple subnets will also be available in near future. It sounds good. Thanks again.
from avalanche-cli.
Related Issues (20)
- evm_token flag on avalanche subnet create should not be ignored when using a genesis file
- MR #1787 -- Cannot find AMI HOT 3
- [subnet create explore] Always deploy Teleporter and registry if Subnet uses token from another blockchain as native token HOT 1
- Make relayer logs accessible through command and format
- Teleporter: Potential ABI mismatch at runtime
- move AMI to separate AWS account from `experimental` HOT 2
- Need to replace teleporter object with teleporter SDK
- Commands to install avalanchego & subnetevm w/out starting a network or subnet
- Add API role to fuji clusters
- Improve language of Avalanche CLI UX revamp
- refactor instance provisioning to use tooling-sdk
- refactor teleporter code into sdk
- fix ledger dependence HOT 1
- enable deploying contracts from any teleporter commit
- refactor relayer setup code into separate command
- new ux for subnet deploy
- add TeleporterRegistryAddress/TeleporterManagerAddress setting to subnet import
- deploy registry downloaded from teleporter release HOT 1
- use fuji/mainnet c-chain teleporter info on deploy tools
- add a warning on allow list preview/confirm to warn the user if the allow list is empty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avalanche-cli.