Open lksrnrz opened 1 year ago
Similar issue here with 1.0.0 trying to deploy rootchain contracts on Mumbai:
failed to deploy rootchain contracts: failed sending StateSender contract deploy transaction: {"code":-32000,"message":"INTERNAL_ERROR: could not replace existing tx"}
The contract failing is different on each execution.
Description
I'm trying to set up a supernet on a number of nodes. The problem, however, arises during the configuration of the rootchain.
Your environment
I'm working on a machine with Linux Ubuntu 22.04. To install the binaries, I downloaded the latest release (v.1.0.0-rc1) .tar.gz file and extracted it.
Steps to reproduce
./polygon-edge polygft-secrets --insecure <additional args>
./polygon-edge genesis
with all the necessary arguments about the chain parameters as well as the validator nodes../polygon-edge rootchain server
. This starts a local chain which produces blocks as it should../polygon-edge polybft stake-manager-deploy --genesis ./genesis.json --jsonrpc http://127.0.0.1:8545 --test
./polygon-edge rootchain deploy --genesis ./genesis.json --json-rpc http://127.0.0.1:8545 --test --stake-token <stake-token-address> --stake-manager <stake-manager-address>
Expected behavior
This is now where the error occurs. All rootchain contracts are deployed as far as I can see, eight contracts are initialised successfully. But then, I get the following error message:
failed to deploy rootchain contracts: transaction execution failed on CheckpointManager contract
It should, however, successfully deploy and initialise all contracts.
Logs
The command in step 6 above produces the following output:
<--Start of logs--> [ROOTCHAIN - CONTRACTS DEPLOYMENT] started... Rootchain JSON RPC address http://127.0.0.1:8545. [ROOTCHAIN - DEPLOY CONTRACT] Name = RootERC20 Contract (address) = 0x0eEBae803F685565492DF1a77793354038D02A3e Transaction (hash) = 0x4839f4109aeb94ee153030bcb6460f28ca514bf5cbc85e3b6d0a82b5d88f7e3d
[ROOTCHAIN - DEPLOY CONTRACT] Name = RootERC721 Contract (address) = 0xd1B986E1f2A7a1A368df246150999F27be60c61B Transaction (hash) = 0x87e026cc91bfc4def9d89dfb38f00eb5c208a8438a450b1d649ba4dafa7229be
[ROOTCHAIN - DEPLOY CONTRACT] Name = RootERC1155 Contract (address) = 0x08e0e9643aB61C87D971288Be9276A6aA95e53a3 Transaction (hash) = 0x49599358a4ffce07614005870cbd3e145dc1e2d692d2ae9b258ad634536212cd
[ROOTCHAIN - DEPLOY CONTRACT] Name = StateSender Contract (address) = 0x436604426F31A05f905C64edc973E575BdB46471 Transaction (hash) = 0xcb1d9674f1c928527a470d74532a6fe1e755e64909c8ecd5cce014d7330fb500
[ROOTCHAIN - DEPLOY CONTRACT] Name = CheckpointManager Contract (address) = 0x1BfAdFDc7554f618665e3EAE7C22DE2B5ab54786 Transaction (hash) = 0x5468a7d9b0b170c94ae66a27e75c91bded19e68ae2c77f5df42c5101aefd3c93
[ROOTCHAIN - DEPLOY CONTRACT] Name = BLS Contract (address) = 0x22C246401ed6e52C525644659C5304aed63516C7 Transaction (hash) = 0x92115fab99744b51343b6556cba2fd17e6d73068194a63a6186283dfcc957564
[ROOTCHAIN - DEPLOY CONTRACT] Name = BN256G2 Contract (address) = 0x88d3678C1e99Fc0b699fCA4cf2BC1c2C75C7f272 Transaction (hash) = 0xf96d2b2f423661f4052e09825deeaac21a76915d2ba905f2f4c86d57c1cc67f2
[ROOTCHAIN - DEPLOY CONTRACT] Name = ExitHelper Contract (address) = 0xB3A64e1ffB0867E93665Da1052b3dbAb427A538C Transaction (hash) = 0x3f2e95abcbcf888aec5773c0360883554acad3c5c5929236991c543ab7462c4c
[ROOTCHAIN - DEPLOY CONTRACT] Name = RootERC20Predicate Contract (address) = 0xaCB3Eb2f3c167B56410F0351B6C6EBac9256f553 Transaction (hash) = 0xd5681604672a8ae5b8d9c56376056d70b32a43ed773c4a30842f93ee18ece631
[ROOTCHAIN - DEPLOY CONTRACT] Name = ChildERC20MintablePredicate Contract (address) = 0xA1DFe8536732EB98BBCA36A7f97C72e3395EaB8E Transaction (hash) = 0xb836e4d0cd1eb2c6cd833c23bcc08ebd05ccb219943bfda4e0de4518c178788d
[ROOTCHAIN - DEPLOY CONTRACT] Name = ERC20Template Contract (address) = 0x8d83F76FB303d30d35E1A8FAafB69294C8bD4069 Transaction (hash) = 0x219a6dab3c7fa02f80cc341a92755a31c8ed320156981b8337fdaccbfc9480f3
[ROOTCHAIN - DEPLOY CONTRACT] Name = RootERC721Predicate Contract (address) = 0x0e3C79887960455083c5F063035C723c61906811 Transaction (hash) = 0x2afcc8a8487bbb2f4dde0c3574d6d6e073e0fca57ffe912438b78c207d224012
[ROOTCHAIN - DEPLOY CONTRACT] Name = ChildERC721MintablePredicate Contract (address) = 0x7e5BB8F3721C594Af6aB04D5bDf5C52742F37403 Transaction (hash) = 0x793fbeb164a07f00aafed6eb600e2f43bc0ee621fc69517bfe7d820647d7d4f0
[ROOTCHAIN - DEPLOY CONTRACT] Name = ERC721Template Contract (address) = 0x811068e4106f7A70D443684FF4927eC3940439Ec Transaction (hash) = 0x83da18a0a411e75a73706c59b930779121f144d17109b4ab241b4ada5cbebedd
[ROOTCHAIN - DEPLOY CONTRACT] Name = RootERC1155Predicate Contract (address) = 0x75aA024A2292A3FD3C17d67b54B3d00435437246 Transaction (hash) = 0xa79376d4fdc535cda74fcb772f88022cf9a5afd371b87fb01bc1a10d34859720
[ROOTCHAIN - DEPLOY CONTRACT] Name = ChildERC1155MintablePredicate Contract (address) = 0x3a050ae9f452d4d0EF0029dEdf790985D133A8bf Transaction (hash) = 0xfe7385546107cb924e9dd1c18aa42c09ac9ef401d01ff9a3c7c02a4c8b431652
[ROOTCHAIN - DEPLOY CONTRACT] Name = ERC1155Template Contract (address) = 0x861F89324C60E5158C7f5b38F84E9b2AB76552f7 Transaction (hash) = 0xa336830a6febaaf717d36908c46733d19ee2478daede7ede9cbb84f73c720dc2
[ROOTCHAIN - DEPLOY CONTRACT] Name = CustomSupernetManager Contract (address) = 0x947a581B2713F58A8145201DA41BCb6aAE90196B Transaction (hash) = 0x967c7417bdd324191756230940cba4b371b2bf47f3e743acefc5f51b507654c4
[ROOTCHAIN - CONTRACTS DEPLOYMENT] RootERC1155Predicate contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] RootERC721Predicate contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] ChildERC721MintablePredicate contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] CustomSupernetManager contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] ChildERC20MintablePredicate contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] ChildERC1155MintablePredicate contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] ExitHelper contract is initialized [ROOTCHAIN - CONTRACTS DEPLOYMENT] RootERC20Predicate contract is initialized
failed to deploy rootchain contracts: transaction execution failed on CheckpointManager contract <--End of logs-->
Proposed solution
I don't know how to fix the error, but interestingly running
./polygon-edge rootchain server --no-console
instead of./polygon-edge rootchain server
in step 3 to start a local chain (i.e. using the official Geth image here) produces no error during the contract deployment and initialisation.