You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
Funding issue when using docker-compose with Mumbai as Rootchain
Description
I have modified the docker-compose.yml and the polygon-edge.sh file as follows in order to run Mumbai as Rootchain in place of the local geth instance. I'm pretty sure I have got most of it right except the part where we transfer Rootchain Stake Tokens to the Validators on the rootchain. In the local setup I used to do this manually but there does not seem to be a way to doing this using the rootchain fund command.
The rootchain fund command deducts native rootchain tokens from the deployer's private key and transfers it to the validators. What it does NOT seem to do is transfer Rootchain Stake Tokens to the validators. Kindly suggest solutions or workarounds for this. I believe modifying the command to transfer Rootchain Stake Tokens in the presence of the --stake-token flag and transferring native rootchain tokens otherwise would be ideal.
Clone the repo, install and compile the core-contracts
replace the docker-compose.yml and polygon-edge.sh files inside the /docker/local folder with the above files
run the containers using
export EDGE_CONSENSUS=polybft
docker-compose -f ./docker/local/docker-compose.yml up -d --build
Expected behavior
I expect this to crash since the validators on the rootchain (Mumbai) have been funded with native tokens but not Rootchain Stake Tokens
Logs from the polygon-edge-bootstrapper container
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1870312
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1146506
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1767122
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 196429
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1146686
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1442395
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1321573
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 2595019
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 826639
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1458136
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1590998
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 682127
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 1793675
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 2460706
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 2072916
Gas Price = 1500000017
[ROOTCHAIN - DEPLOY CONTRACT]
Name = StateSender
Contract (address) = 0xAF0950FC118d9Bcea4178c1B52d2EE4F84eccAAD
Transaction (hash) = 0x01c18816d4b9426c22f67f096478ff585ba9df09225d85d03e363b49a7866057
Transaction (gas used) = 196429
[ROOTCHAIN - DEPLOY CONTRACT]
Name = CheckpointManager
Contract (address) = 0xe2B10f089d92B60F1859F7C8F11Db1BF3847804f
Transaction (hash) = 0x9185d7efd44e778eb9c410d354175806f6f4d10acd0470e306ee6b91ce552295
Transaction (gas used) = 1321573
[ROOTCHAIN - DEPLOY CONTRACT]
Name = BLS
Contract (address) = 0xE30973316252496918ee0faF4fE6621f58785999
Transaction (hash) = 0x36b51ac2162e15527a6a8ffaec97ed90b9a5bb05f31a9d1423e5761537b22fd3
Transaction (gas used) = 2595019
[ROOTCHAIN - DEPLOY CONTRACT]
Name = BN256G2
Contract (address) = 0x71d4E02E6A80c0f80dE177f4978d6D52d50743f7
Transaction (hash) = 0x51645ae25ea7daa3614a711f134c6ece789200e3eb9d24f73c0d133f49c12773
Transaction (gas used) = 826639
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ExitHelper
Contract (address) = 0xB8F5c9C04d5816604caA480745087F454754Cda4
Transaction (hash) = 0xb7b77a6012e21b88379493c07bf225fccdc9b9cab12fe3287d4c280dfd726a43
Transaction (gas used) = 682127
[ROOTCHAIN - DEPLOY CONTRACT]
Name = RootERC20Predicate
Contract (address) = 0xf120b5f58048583c616644D8fd87D5817b554288
Transaction (hash) = 0xf6598cf7e0d20feb5b9276a595baed8c6490fe08a7bf9b736fb4da8440e6b121
Transaction (gas used) = 1146506
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ChildERC20MintablePredicate
Contract (address) = 0x5116b608b3920394d7172799bdAFDbA65F33747A
Transaction (hash) = 0xe1b8f5614a7990d3b1b15714b5246b580dca7b3bc37100ed390b52d0369a53a6
Transaction (gas used) = 1146686
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ERC20Template
Contract (address) = 0xcdd5338f80fD21f4135A4fdeABB797cC4e793912
Transaction (hash) = 0x3ca4a9cfd77ec2efec32bafc1c985663a1aaa426f51c1457619cac5d5d08f420
Transaction (gas used) = 1442395
[ROOTCHAIN - DEPLOY CONTRACT]
Name = RootERC721Predicate
Contract (address) = 0x37c6aDaa5F589b3F32C5cCd0551a2e8D5c35543E
Transaction (hash) = 0x80c74749707386a53274b0560d3469ce0261f58357d8cdd3ca4b977c67a682ec
Transaction (gas used) = 1458136
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ChildERC721MintablePredicate
Contract (address) = 0x52B8ee5fBB121Ec0b87F1fA2Ed09602fFd2e356C
Transaction (hash) = 0x142d3a195c7600ab3ce8495040d2e7554e4ac57166c47d0b8655fe4abbed5e03
Transaction (gas used) = 1767122
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ERC721Template
Contract (address) = 0xC8eDb9FfCc919303ac440eF7e3a472f766e8Af4F
Transaction (hash) = 0x52da76fe83ce349f2ff66c3af78bea453f786110cbcf3b812f3ee9bd5be77c49
Transaction (gas used) = 2072916
[ROOTCHAIN - DEPLOY CONTRACT]
Name = RootERC1155Predicate
Contract (address) = 0xf8Dfe096867559eAdD5057f468c5FC1489422F01
Transaction (hash) = 0x93b3110daea94d3cf4ddb6f01c47c6a98c3063540429d8414d49987d82c1bdec
Transaction (gas used) = 1590998
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ChildERC1155MintablePredicate
Contract (address) = 0x030E368A0A5086948ECD1f9aF9A298a5B98FA309
Transaction (hash) = 0x803cd8fb2f11e2a4472565db4e5e58a1e0fe275cfae994d2b6ee308785d085f7
Transaction (gas used) = 1793675
[ROOTCHAIN - DEPLOY CONTRACT]
Name = ERC1155Template
Contract (address) = 0x112F1435933f992025ab38Cc4B41b4f9A1bc47B6
Transaction (hash) = 0x156fd0c783df2acc59388b26d5a91e192a715b602f4d55b112e5d397f71f0626
Transaction (gas used) = 2460706
[ROOTCHAIN - DEPLOY CONTRACT]
Name = CustomSupernetManager
Contract (address) = 0x2252e4A7f4fCfBc8DFA22513a32b64EcF3FaCF74
Transaction (hash) = 0x18a19b20530c4c7e946d3560f833e6718682cbec0a88a582316bb7c956fa98fc
Transaction (gas used) = 1870312
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 115064
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 71735
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 115064
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 114911
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 115020
Gas Price = 1500000017
[ROOTCHAIN - CONTRACTS DEPLOYMENT] ChildERC721MintablePredicate contract is initialized
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 114758
Gas Price = 1500000017
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 114780
Gas Price = 1500000017
[ROOTCHAIN - CONTRACTS DEPLOYMENT] ExitHelper contract is initialized
[ROOTCHAIN - CONTRACTS DEPLOYMENT] RootERC20Predicate contract is initialized
[ROOTCHAIN - CONTRACTS DEPLOYMENT] ChildERC1155MintablePredicate contract is initialized
[ROOTCHAIN - CONTRACTS DEPLOYMENT] ChildERC20MintablePredicate contract is initialized
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 232215
Gas Price = 1500000017
[ROOTCHAIN - CONTRACTS DEPLOYMENT] RootERC721Predicate contract is initialized
[ROOTCHAIN - CONTRACTS DEPLOYMENT] RootERC1155Predicate contract is initialized
[ROOTCHAIN - CONTRACTS DEPLOYMENT] CustomSupernetManager contract is initialized
[TxRelayer.SendTransaction]
From = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Gas = 117658
Gas Price = 1500000017
[ROOTCHAIN - CONTRACTS DEPLOYMENT] finished. All contracts are successfully deployed and initialized.
[ROOTCHAIN FUND] Successfully funded following accounts
failed to send mint native tokens transaction to validator '0x74eBB8341F08C3334d60487876dD9B984dfA218A'. err: {"code":-32000,"message":"execution reverted"}
Proposed solution
I believe modifying the rootchain fund command to transfer Rootchain Stake Tokens in the presence of the --stake-token flag and transferring native rootchain tokens otherwise would be ideal.
Thanks for your time!
The text was updated successfully, but these errors were encountered:
I will try adding a line in the polygon-edge.sh file that curls the JSON-RPC of the rootchain to transfer Rootchain Stake Tokens to the validators and that should resolve the issue. Will update the result here shortly!
@Stefan-Ethernal turns out the funding issue inside the polygoin-edge.sh file cannot be fixed by editing the shell file itself. Kindly review this, thanks!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Funding issue when using docker-compose with Mumbai as Rootchain
Description
I have modified the
docker-compose.yml
and thepolygon-edge.sh
file as follows in order to run Mumbai as Rootchain in place of the local geth instance. I'm pretty sure I have got most of it right except the part where we transfer Rootchain Stake Tokens to the Validators on the rootchain. In the local setup I used to do this manually but there does not seem to be a way to doing this using therootchain fund
command.The
rootchain fund
command deducts native rootchain tokens from the deployer's private key and transfers it to the validators. What it does NOT seem to do is transferRootchain Stake Tokens
to the validators. Kindly suggest solutions or workarounds for this. I believe modifying the command to transferRootchain Stake Tokens
in the presence of the--stake-token
flag and transferring native rootchain tokens otherwise would be ideal.docker-compose.yml
polygon-edge.sh
Your environment
Steps to reproduce
docker-compose.yml
andpolygon-edge.sh
files inside the/docker/local
folder with the above filesExpected behavior
Rootchain Stake Tokens
Logs from the polygon-edge-bootstrapper container
Proposed solution
I believe modifying the
rootchain fund
command to transferRootchain Stake Tokens
in the presence of the--stake-token
flag and transferring native rootchain tokens otherwise would be ideal.Thanks for your time!
The text was updated successfully, but these errors were encountered: