PIP 50: - Deploy Upgraded Compass-EVM on Paloma Mainnet After Paloma v10.0.1 Upgrade

PIP Name: PIP #50: - Deploy Upgraded Compass-EVM on Paloma Mainnet After Paloma v10.0.1 Upgrade

Status:

Author(s): @LARRY

Type: EVM Proposal

Discussions-to:

Created: 11/29/2023

Simple Summary

The Compass-EVM for Gravity Bridge functionality requires that all events observed by Pigeons contain an event nonce, that is continuously increased with every event emitted by the contract. Currently gravity events emitted from the contract have the following signature:

  • SendToPalomaEvent(address,address,string,uint256)
  • BatchSendEvent(address,uint256)

However, this is not enough to ensure that each batch is once. This upgrade will require a new deployment of the Compass-EVM contract to the Paloma Messenger Mainnet. The old Compass-EVM will be abandoned by the flock and all users of Paloma will need to update their EVM smart-contracts to use the newest address for Paloma’s compass-EVM client.

Abstract

Paloma Compass-EVM is the arbitrary logic call contract that deploys to each supported EVM-chain on the Paloma network. The Compass-EVM manages arbitrary contract calls as well as bridge functionality secured by the Paloma validator set of Paloma validators. From time to time, the Compass-EVM undergoes upgrades for increased security and performance.

Motivation

Paloma is meant to monitor and deliver messages across multiple blockchains via its network of validator datacenters. We are relaunching deployment on EVM target chains with new upgrades the Pigeon relay messaging system with the new messenger mainnet that comes with features required for the Paloma bridge to be fully functional.

Specification Overview

Technical Specification

  1. Run the governance command to deploy the smart contract to all evm chains AFTER Paloma Upgrades to v10.0.1 on Friday 12/1/2023
palomad tx gov submit-legacy-proposal evm propose-new-smart-contract '[JSON ABI BLOB]' [HEX BLOB] \
--title "Vote to Deploy the new and improved Paloma CompassEVM to the Paloma Messenger Mainnet" \
--description "PIP-50 Paloma Deploys a new Paloma CompassEVM on Paloma's Messenger mainnet to supported EVM Mainnet chains for Pigeons to send messages on EVM mainnet chains from the Paloma Mainnet." \
--deposit 10000000ugrain \
--fees 6000ugrain \
--gas auto \
--from <From Paloma Address> \
--chain-id messenger \
--yes

If the proposal passes, Compass EVM will be deployed to all existing and future supported EVM target chains.

Rationale

Compass EVM manages arbitrary contract calls as well as bridge functionality secured by the Paloma validator set. In order to send messages cross-chain securely, Compass EVM needs to be deployed. The new Compass-EVM will include new event emitters as well as new functions for blueprint ERC20 contracts that will be launched from Paloma and owned by the Paloma validator set.

The ‘[JSON ABI BLOB]’ [HEX BLOB] for proposal is outlined below is based on the commit hash:

'[{"name": "ValsetUpdated", "inputs": [{"name": "checkpoint", "type": "bytes32", "indexed": false}, {"name": "valset_id", "type": "uint256", "indexed": false}, {"name": "event_id", "type": "uint256", "indexed": false}], "anonymous": false, "type": "event"}, {"name": "LogicCallEvent", "inputs": [{"name": "logic_contract_address", "type": "address", "indexed": false}, {"name": "payload", "type": "bytes", "indexed": false}, {"name": "message_id", "type": "uint256", "indexed": false}, {"name": "event_id", "type": "uint256", "indexed": false}], "anonymous": false, "type": "event"}, {"name": "SendToPalomaEvent", "inputs": [{"name": "token", "type": "address", "indexed": false}, {"name": "sender", "type": "address", "indexed": false}, {"name": "receiver", "type": "string", "indexed": false}, {"name": "amount", "type": "uint256", "indexed": false}, {"name": "event_id", "type": "uint256", "indexed": false}], "anonymous": false, "type": "event"}, {"name": "BatchSendEvent", "inputs": [{"name": "token", "type": "address", "indexed": false}, {"name": "batch_id", "type": "uint256", "indexed": false}, {"name": "event_id", "type": "uint256", "indexed": false}], "anonymous": false, "type": "event"}, {"name": "ERC20DeployedEvent", "inputs": [{"name": "paloma_denom", "type": "string", "indexed": false}, {"name": "token_contract", "type": "address", "indexed": false}, {"name": "name", "type": "string", "indexed": false}, {"name": "symbol", "type": "string", "indexed": false}, {"name": "decimals", "type": "uint8", "indexed": false}, {"name": "event_id", "type": "uint256", "indexed": false}], "anonymous": false, "type": "event"}, {"stateMutability": "nonpayable", "type": "constructor", "inputs": [{"name": "_compass_id", "type": "bytes32"}, {"name": "_event_id", "type": "uint256"}, {"name": "valset", "type": "tuple", "components": [{"name": "validators", "type": "address[]"}, {"name": "powers", "type": "uint256[]"}, {"name": "valset_id", "type": "uint256"}]}], "outputs": []}, {"stateMutability": "nonpayable", "type": "function", "name": "update_valset", "inputs": [{"name": "consensus", "type": "tuple", "components": [{"name": "valset", "type": "tuple", "components": [{"name": "validators", "type": "address[]"}, {"name": "powers", "type": "uint256[]"}, {"name": "valset_id", "type": "uint256"}]}, {"name": "signatures", "type": "tuple[]", "components": [{"name": "v", "type": "uint256"}, {"name": "r", "type": "uint256"}, {"name": "s", "type": "uint256"}]}]}, {"name": "new_valset", "type": "tuple", "components": [{"name": "validators", "type": "address[]"}, {"name": "powers", "type": "uint256[]"}, {"name": "valset_id", "type": "uint256"}]}], "outputs": []}, {"stateMutability": "nonpayable", "type": "function", "name": "submit_logic_call", "inputs": [{"name": "consensus", "type": "tuple", "components": [{"name": "valset", "type": "tuple", "components": [{"name": "validators", "type": "address[]"}, {"name": "powers", "type": "uint256[]"}, {"name": "valset_id", "type": "uint256"}]}, {"name": "signatures", "type": "tuple[]", "components": [{"name": "v", "type": "uint256"}, {"name": "r", "type": "uint256"}, {"name": "s", "type": "uint256"}]}]}, {"name": "args", "type": "tuple", "components": [{"name": "logic_contract_address", "type": "address"}, {"name": "payload", "type": "bytes"}]}, {"name": "message_id", "type": "uint256"}, {"name": "deadline", "type": "uint256"}], "outputs": []}, {"stateMutability": "nonpayable", "type": "function", "name": "send_token_to_paloma", "inputs": [{"name": "token", "type": "address"}, {"name": "receiver", "type": "string"}, {"name": "amount", "type": "uint256"}], "outputs": []}, {"stateMutability": "nonpayable", "type": "function", "name": "submit_batch", "inputs": [{"name": "consensus", "type": "tuple", "components": [{"name": "valset", "type": "tuple", "components": [{"name": "validators", "type": "address[]"}, {"name": "powers", "type": "uint256[]"}, {"name": "valset_id", "type": "uint256"}]}, {"name": "signatures", "type": "tuple[]", "components": [{"name": "v", "type": "uint256"}, {"name": "r", "type": "uint256"}, {"name": "s", "type": "uint256"}]}]}, {"name": "token", "type": "address"}, {"name": "args", "type": "tuple", "components": [{"name": "receiver", "type": "address[]"}, {"name": "amount", "type": "uint256[]"}]}, {"name": "batch_id", "type": "uint256"}, {"name": "deadline", "type": "uint256"}], "outputs": []}, {"stateMutability": "nonpayable", "type": "function", "name": "deploy_erc20", "inputs": [{"name": "_paloma_denom", "type": "string"}, {"name": "_name", "type": "string"}, {"name": "_symbol", "type": "string"}, {"name": "_decimals", "type": "uint8"}, {"name": "_blueprint", "type": "address"}], "outputs": []}, {"stateMutability": "view", "type": "function", "name": "compass_id", "inputs": [], "outputs": [{"name": "", "type": "bytes32"}]}, {"stateMutability": "view", "type": "function", "name": "last_checkpoint", "inputs": [], "outputs": [{"name": "", "type": "bytes32"}]}, {"stateMutability": "view", "type": "function", "name": "last_valset_id", "inputs": [], "outputs": [{"name": "", "type": "uint256"}]}, {"stateMutability": "view", "type": "function", "name": "last_event_id", "inputs": [], "outputs": [{"name": "", "type": "uint256"}]}, {"stateMutability": "view", "type": "function", "name": "last_batch_id", "inputs": [{"name": "arg0", "type": "address"}], "outputs": [{"name": "", "type": "uint256"}]}, {"stateMutability": "view", "type": "function", "name": "message_id_used", "inputs": [{"name": "arg0", "type": "uint256"}], "outputs": [{"name": "", "type": "bool"}]}]' 0x616600515034610337576020611c17600039600051602081611bd701600039600051810160c8602082611bd7016000396000511161033757602081611bd70160003960005160008160c8811161033757801561008757905b60208160051b6020860101611bd7016000396000518060a01c610337578160051b60600152600101818118610057575b5050806040525050602060208201611bd701600039600051810160c8602082611bd7016000396000511161033757602081611bd70160003960005160208160051b018083611bd70161196039505050602060408201611bd70161328039506020611bd7600039600051616600526040366132a037600060405160c8811161033757801561017257905b8060051b606001516132e0526132a0516132c051611960518110156103375760051b611980015180820182811061033757905090506132a05263aaaaaaaa6132a0511061015c57610172565b60016132c051016132c052600101818118610110575b505063aaaaaaaa6132a05110156101e95760126132e0527f496e73756666696369656e7420506f7765720000000000000000000000000000613300526132e0506132e0518061330001601f826000031636823750506308c379a06132a05260206132c052601f19601f6132e05101166044016132bcfd5b63299018c261330452600460808061332452806133240160006040518083528060051b60008260c8811161033757801561023c57905b8060051b606001518160051b60208801015260010181811861021f575b50508201602001915050905081019050806133445280613324016000611960518083528060051b60008260c8811161033757801561029457905b8060051b61198001518160051b602088010152600101818118610276575b505082016020019150509050810190506132805161336452616600516133845201613300526133008051602082012090506132e0526132e051600055613280516001556020611bf76000396000516002557fb7ca5e46e360950244488bf096bf742a1f63183cf1ee5b3b0c53045b6247bf5b6132e0516133005261328051613320526020611bf7613340396060613300a161188561033c614d7b396118a5614d7bf35b600080fd60003560e01c6002600c820660011b61186d01601e39600051565b6384d38f2c8118611510573461186857602061188560403960206040f3611510565b63a9a4a983811861005857346118685760005460405260206040f35b631029ae6f8118611510576101e43610341761186857600435600401803581018035810160c881351161186857803560008160c881116118685780156100c057905b8060051b6020850101358060a01c611868578160051b618060015260010181811861009a575b5050806180405250506020810135810160c881351161186857803560208160051b01808361996037505050604081013561b28052506020810135810160c881351161186857803560206060820201808361b2a0375050505060243560040180358060a01c6118685761fdc05260208101358101612800813511611868576020813501808261fde0375050506064354211156101c457600762012600527f54696d656f757400000000000000000000000000000000000000000000000000620126205262012600506201260051806201262001601f826000031636823750506308c379a0620125c0526020620125e052601f19601f62012600510116604401620125dcfd5b60046044356020526000526040600020541561024957600f62012600527f55736564204d6573736167655f49440000000000000000000000000000000000620126205262012600506201260051806201262001601f826000031636823750506308c379a0620125c0526020620125e052601f19601f62012600510116604401620125dcfd5b60016004604435602052600052604060002055613260604061326061804060045afa5061027862012600611786565b620126005160005418156102f557601462012620527f496e636f727265637420436865636b706f696e74000000000000000000000000620126405262012620506201262051806201264001601f826000031636823750506308c379a0620125e05260206201260052601f19601f62012620510116604401620125fcfd5b63980721b2620126245260046080806201264452806201264401604061fdc0518252806020830152808201602061fde0510180828261fde060045afa50508051806020830101601f82600003163682375050601f19601f82516020010116905081019050905081019050604435620126645260206118856201268439606435620126a452016201262052620126208051602082012090506201260052617d806101a0617d8061804060045afa506201260051617f20526103b36115c1565b61fdc0515a61fde06000600082516020840160008787f19050905090506103df573d600060003e3d6000fd5b600160025401620126205262012620516002557f0594b174e11e17c2cb4d0d303c2125060bea4f4da113a4e79edce87465592d00608061fdc0516201264052806201266052806201264001602061fde0510180828261fde060045afa50508051806020830101601f82600003163682375050601f19601f8251602001011690508101905060443562012680526201262051620126a05262012640a100611510565b634da6ecc9811861049c57346118685760015460405260206040f35b6338d6172d81186115105760243610341761186857600460043560205260005260406000205460405260206040f3611510565b6319429b8d811861151057346118685760025460405260206040f3611510565b63fa822567811861052c57602436103417611868576004358060a01c61186857604052600360405160205260005260406000205460605260206060f35b63eadf4af78118611510576101e43610341761186857600435600401803581018035810160c881351161186857803560008160c8811161186857801561059457905b8060051b6020850101358060a01c611868578160051b618060015260010181811861056e575b5050806180405250506020810135810160c881351161186857803560208160051b01808361996037505050604081013561b28052506020810135810160c881351161186857803560206060820201808361b2a037505050506024356004018035810160c881351161186857803560008160c8811161186857801561063a57905b8060051b6020850101358060a01c611868578160051b61fde00152600101818118610614575b50508061fdc05250506020810135810160c881351161186857803560208160051b018083620116e037505050604081013562013000525061b280516201300051116106ee57601162013020527f496e76616c69642056616c736574204944000000000000000000000000000000620130405262013020506201302051806201304001601f826000031636823750506308c379a062012fe05260206201300052601f19601f6201302051011660440162012ffcfd5b6040366201302037600061fdc05160c8811161186857801561077857905b8060051b61fde00151620130605262013020516201304051620116e0518110156118685760051b6201170001518082018281106118685790509050620130205263aaaaaaaa62013020511061076057610778565b6001620130405101620130405260010181811861070c575b505063aaaaaaaa620130205110156107f957601262013060527f496e73756666696369656e7420506f7765720000000000000000000000000000620130805262013060506201306051806201308001601f826000031636823750506308c379a0620130205260206201304052601f19601f620130605101166044016201303cfd5b613260604061326061804060045afa5061081562013060611786565b6201306051600054181561089257601462013080527f496e636f727265637420436865636b706f696e74000000000000000000000000620130a0526201308050620130805180620130a001601f826000031636823750506308c379a0620130405260206201306052601f19601f620130805101166044016201305cfd5b613260604061326061fdc060045afa506108ae62013080611786565b62013080516201306052617d806101a0617d8061804060045afa506201306051617f20526108da6115c1565b62013060516000556201300051600155600160025401620130805262013080516002557fb7ca5e46e360950244488bf096bf742a1f63183cf1ee5b3b0c53045b6247bf5b6201306051620130a0526201300051620130c0526201308051620130e0526060620130a0a100611510565b63b39dcd5e811861151057608436103417611868576004358060a01c611868576040526024356004016040813511611868576020813501808260603750506040516370a0823160e0523061010052602060e0602460fc845afa6109b1573d600060003e3d6000fd5b60203d106118685760e090505160c0526040516323b872dd60e0523361010052306101205260443561014052602060e0606460fc6000855af16109f9573d600060003e3d6000fd5b3d610a1057803b1561186857600161016052610a28565b60203d106118685760e0518060011c61186857610160525b610160905051610a98576007610180527f5446206661696c000000000000000000000000000000000000000000000000006101a0526101805061018051806101a001601f826000031636823750506308c379a061014052602061016052601f19601f61018051011660440161015cfd5b6040516370a0823160e0523061010052602060e0602460fc845afa610ac2573d600060003e3d6000fd5b60203d106118685760e090505160c051808203828111611868579050905060c05260c051610b4957600d60e0527f5a65726f205472616e73666572000000000000000000000000000000000000006101005260e05060e0518061010001601f826000031636823750506308c379a060a052602060c052601f19601f60e051011660440160bcfd5b60016002540160e05260e0516002557ffe15510abe06d325676e9b14cbd5ae05ee35422f1c0d5bfa734f3ccdcc23635c60a060405161010052336101205280610140528061010001602060605101808282606060045afa50508051806020830101601f82600003163682375050601f19601f825160200101169050810190506044356101605260e05161018052610100a100611510565b630ffc0bdb811861122a576102243610341761186857600435600401803581018035810160c881351161186857803560008160c88111611868578015610c4857905b8060051b6020850101358060a01c611868578160051b6180600152600101818118610c22575b5050806180405250506020810135810160c881351161186857803560208160051b01808361996037505050604081013561b28052506020810135810160c881351161186857803560206060820201808361b2a037505050506024358060a01c6118685761fdc05260443560040180358101604081351161186857803560008160408111611868578015610cfd57905b8060051b6020850101358060a01c611868578160051b61fe000152600101818118610cd7575b50508061fde052505060208101358101604081351161186857803560208160051b018083620106003750505050608435421115610da357600762010e20527f54696d656f75740000000000000000000000000000000000000000000000000062010e405262010e205062010e20518062010e4001601f826000031636823750506308c379a062010de052602062010e0052601f19601f62010e2051011660440162010dfcfd5b606435600361fdc05160205260005260406000205410610e2c57600e62010e20527f57726f6e6720626174636820696400000000000000000000000000000000000062010e405262010e205062010e20518062010e4001601f826000031636823750506308c379a062010de052602062010e0052601f19601f62010e2051011660440162010dfcfd5b61fde05162010e2052620106005162010e20511815610eb457601062010e40527f556e6d61746368656420506172616d730000000000000000000000000000000062010e605262010e405062010e40518062010e6001601f826000031636823750506308c379a062010e0052602062010e2052601f19601f62010e4051011660440162010e1cfd5b613260604061326061804060045afa50610ed062010e40611786565b62010e40516000541815610f4d57601462010e60527f496e636f727265637420436865636b706f696e7400000000000000000000000062010e805262010e605062010e60518062010e8001601f826000031636823750506308c379a062010e2052602062010e4052601f19601f62010e6051011660440162010e3cfd5b63ecaa10b962010e6452600460a061fdc05162010e84528062010ea4528062010e84016040808252808201600061fde0518083528060051b60008260408111611868578015610fb657905b8060051b61fe0001518160051b602088010152600101818118610f98575b50508201602001915050905081019050806020830152808201600062010600518083528060051b6000826040811161186857801561100f57905b8060051b6201062001518160051b602088010152600101818118610ff0575b5050820160200191505090508101905090508101905060643562010ec452602061188562010ee43960843562010f04520162010e605262010e6080516020820120905062010e4052617d806101a0617d8061804060045afa5062010e4051617f20526110796115c1565b60006040905b8062010e605262010e205162010e605110611099576111bb565b61fdc05163a9059cbb62010e805262010e605161fde0518110156118685760051b61fe00015162010ea05262010e605162010600518110156118685760051b62010620015162010ec052602062010e80604462010e9c6000855af1611103573d600060003e3d6000fd5b3d61111b57803b1561186857600162010ee052611136565b60203d106118685762010e80518060011c6118685762010ee0525b62010ee09050516111b057600762010f00527f5472206661696c0000000000000000000000000000000000000000000000000062010f205262010f005062010f00518062010f2001601f826000031636823750506308c379a062010ec052602062010ee052601f19601f62010f0051011660440162010edcfd5b60010181811861107f575b505060016002540162010e605262010e6051600255606435600361fdc0516020526000526040600020557fe33c10972f01a4d59d918f9c60929137db01805dd24267065165bdfc75b13af061fdc05162010e805260643562010ea05262010e605162010ec052606062010e80a1005b6308a92ad781186115105761010436103417611868576004356004016040813511611868576020813501808260403750506024356004016040813511611868576020813501808260a0375050604435600401602081351161186857602081350180826101003750506064358060081c61186857610140526084358060a01c61186857610160523033181561131e576007610180527f496e76616c6964000000000000000000000000000000000000000000000000006101a0526101805061018051806101a001601f826000031636823750506308c379a061014052602061016052601f19601f61018051011660440161015cfd5b610160516080306101a0526101a0516101e0528061020052806101e001602060a0510180828260a060045afa50508051806020830101601f82600003163682375050601f19601f825160200101169050810190508061022052806101e0016101005181526101205160208201528051806020830101601f82600003163682375050601f19601f82516020010116905081019050610140516101c0526101c051610240526003823b0359600182126118685781600382863c8181018381856101e060045afa5050828201816000f08015611868579050905090509050610180526001600254016101a0526101a0516002557f82fe3a4fa49c6382d0c085746698ddbbafe6c2bf61285b19410644b5b26287c760c0806101c052806101c001602060405101808282604060045afa50508051806020830101601f82600003163682375050601f19601f82516020010116905081019050610180516101e0528061020052806101c001602060a0510180828260a060045afa50508051806020830101601f82600003163682375050601f19601f825160200101169050810190508061022052806101c0016101005181526101205160208201528051806020830101601f82600003163682375050601f19601f8251602001011690508101905061014051610240526101a051610260526101c0a1005b60006000fd5b6000601c610100527f19457468657265756d205369676e6564204d6573736167653a0a333200000000610120526101008051602082018361016001815181525050808301925050506060518161016001526020810190508061014052610140905080516020820120905060e05260006101805260e051610100526080516101205260a0516101405260c051610160526020610180608061010060015afa506101805160405114815250565b604036617f403760006134005160c8811161186857801561170d57905b60608102613420018051617f80526020810151617fa0526040810151617fc05250617f8051156116f757617f40516101a0518110156118685760051b6101c00151604052617f2051606052617f8051608052617fa05160a052617fc05160c052611649617fe0611516565b617fe0516116b7576011618000527f496e76616c6964205369676e61747572650000000000000000000000000000006180205261800050618000518061802001601f826000031636823750506308c379a0617fc0526020617fe052601f19601f618000510116604401617fdcfd5b617f6051617f4051611ac0518110156118685760051b611ae001518082018281106118685790509050617f605263aaaaaaaa617f6051106116f75761170d565b6001617f405101617f40526001018181186115de575b505063aaaaaaaa617f60511015611784576012617f80527f496e73756666696369656e7420506f7765720000000000000000000000000000617fa052617f8050617f805180617fa001601f826000031636823750506308c379a0617f40526020617f6052601f19601f617f80510116604401617f5cfd5b565b63299018c26132a45260046080806132c452806132c40160006040518083528060051b60008260c881116118685780156117d957905b8060051b606001518160051b6020880101526001018181186117bc575b50508201602001915050905081019050806132e452806132c4016000611960518083528060051b60008260c8811161186857801561183157905b8060051b61198001518160051b602088010152600101818118611813575b505082016020019150509050810190506132805161330452602061188561332439016132a0526132a0805160208201209050815250565b600080fd151015100949003c15100480151004ef001a04cf15100be0841918858118181820a16576797065728300030a0016