vana-com / vana-dlp-chatgpt

Data liquidity pool for ChatGPT
14 stars 22 forks source link

Failed to Register Validator - 'execution reverted', 'no data' #61

Open pvsairam opened 2 months ago

pvsairam commented 2 months ago

I am trying to register a validator using this command ./vanacli dlp register_validator --stake_amount 10 and getting below error:

(chatgpt-py3.11) root@vmi1633926:~/vana-dlp-chatgpt# ./vanacli dlp register_validator --stake_amount 10
Enter wallet name (default): default
Enter hotkey name (default): default
Enter password to unlock key: 
INFO:vana: - Transaction hash: 0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5 - 
2024-08-06 04:44:14.628 |       INFO       |  - Transaction hash: 0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5 - 
INFO:vana: - Transaction hash: 0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5 - 
INFO:vana: - Transaction receipt: AttributeDict({'blockHash': HexBytes('0xfecff70be1d70a963b1c8534cf5903c869baaaa5f4b9c0e4bd69cd0e05e5fac4'), 'blockNumber': 940840, 'contractAddress': None, 'cumulativeGasUsed': 622635, 'effectiveGasPrice': 1000000000, 'from': '0x0362753abE54B97AAbb40Cde46Ff245380503F3a', 'gasUsed': 26179, 'logs': [AttributeDict({'address': '0x3db29b7ED68Ca561794039B4D675f68fb64D6ac3', 'topics': [HexBytes('0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925'), HexBytes('0x0000000000000000000000000362753abe54b97aabb40cde46ff245380503f3a'), HexBytes('0x000000000000000000000000154ba8e1c1fa293cf0358040209fc28982378d4d')], 'data': HexBytes('0x0000000000000000000000000000000000000000000000008ac7230489e80000'), 'blockNumber': 940840, 'transactionHash': HexBytes('0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5'), 'transactionIndex': 2, 'blockHash': HexBytes('0xfecff70be1d70a963b1c8534cf5903c869baaaa5f4b9c0e4bd69cd0e05e5fac4'), 'logIndex': 2, 'removed': False})], 'logsBloom': HexBytes('0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000004000000000000000000000000000000000000800000000000020000000000000000000000000000008010010000000000000000000000000000000000000000000000200000000000'), 'status': 1, 'to': '0x3db29b7ED68Ca561794039B4D675f68fb64D6ac3', 'transactionHash': HexBytes('0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5'), 'transactionIndex': 2, 'type': 0}) - 
INFO:vana: - View transaction on block explorer: https://satori.vanascan.io/tx/0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5 - 
INFO:vana: - Approved DLP contract at 0x154bA8E1C1Fa293cF0358040209fc28982378d4d to spend 10.0 DLPTokens - 
2024-08-06 04:44:19.241 |       INFO       |  - Transaction hash: 0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5 - 
2024-08-06 04:44:19.242 |       INFO       |  - Transaction receipt: AttributeDict({'blockHash': HexBytes('0xfecff70be1d70a963b1c8534cf5903c869baaaa5f4b9c0e4bd69cd0e05e5fac4'), 'blockNumber': 940840, 'contractAddress': None, 'cumulativeGasUsed': 622635, 'effectiveGasPrice': 1000000000, 'from': '0x0362753abE54B97AAbb40Cde46Ff245380503F3a', 'gasUsed': 26179, 'logs': [AttributeDict({'address': '0x3db29b7ED68Ca561794039B4D675f68fb64D6ac3', 'topics': [HexBytes('0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925'), HexBytes('0x0000000000000000000000000362753abe54b97aabb40cde46ff245380503f3a'), HexBytes('0x000000000000000000000000154ba8e1c1fa293cf0358040209fc28982378d4d')], 'data': HexBytes('0x0000000000000000000000000000000000000000000000008ac7230489e80000'), 'blockNumber': 940840, 'transactionHash': HexBytes('0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5'), 'transactionIndex': 2, 'blockHash': HexBytes('0xfecff70be1d70a963b1c8534cf5903c869baaaa5f4b9c0e4bd69cd0e05e5fac4'), 'logIndex': 2, 'removed': False})], 'logsBloom': HexBytes('0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000004000000000000000000000000000000000000800000000000020000000000000000000000000000008010010000000000000000000000000000000000000000000000200000000000'), 'status': 1, 'to': '0x3db29b7ED68Ca561794039B4D675f68fb64D6ac3', 'transactionHash': HexBytes('0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5'), 'transactionIndex': 2, 'type': 0}) - 
2024-08-06 04:44:19.242 |       INFO       |  - View transaction on block explorer: https://satori.vanascan.io/tx/0x9ad190906a6c09e193ee317416fb44155b12829b46bcb5900686746fcb8b12a5 - 
2024-08-06 04:44:19.244 |       INFO       |  - Approved DLP contract at 0x154bA8E1C1Fa293cF0358040209fc28982378d4d to spend 10.0 DLPTokens - 
ERROR:vana: - Failed to write to contract function: ('execution reverted', 'no data') - 
INFO:vana: - Registered validator 0x4084CefC48C3d2714be27C194Ba354AD8dcBBBca with owner 0x0362753abE54B97AAbb40Cde46Ff245380503F3a and staked 10.0 DLPTokens - 
2024-08-06 04:44:19.592 |      ERROR       |  - Failed to write to contract function: ('execution reverted', 'no data') - 
2024-08-06 04:44:19.592 |       INFO       |  - Registered validator 0x4084CefC48C3d2714be27C194Ba354AD8dcBBBca with owner 0x0362753abE54B97AAbb40Cde46Ff245380503F3a and staked 10.0 DLPTokens - 
(chatgpt-py3.11) root@vmi1633926:~/vana-dlp-chatgpt#

I do have enough $VANA in owner, cold & hot wallets. Could you please look into this issue?

RottenToTheBone commented 2 weeks ago

I had the same problem. May I ask if you solved it?

截屏2024-10-17 上午3 36 20
RottenToTheBone commented 2 weeks ago

Never mind. I know what causes it.

pvsairam commented 2 weeks ago

Not yet I am still facing issues. I was able to create validator but facing issues while approving the validator.

RottenToTheBone commented 2 weeks ago

Try using this version to deploy DLP smart contracts. https://github.com/Josephtran102/vana-dlp-smart-contracts

pvsairam commented 2 weeks ago

Deploying smart contract and creating validator is already done. I am facing issues while approving the validator.

RottenToTheBone commented 2 weeks ago

Is it still ‘Failed to write to contract function: (’execution reverted‘, “no data”)’? Or something new?

pvsairam commented 2 weeks ago
root@vmi1633926:~/vana-dlp-chatgpt# ./vanacli dlp approve_validator --validator_address=0x3969Aff9Eb547D7911b924FF06741d6Fd32737eD
Enter wallet name (default): default
Enter password to unlock key: 
ERROR:vana: - Failed to write to contract function: OwnableUnauthorizedAccount(0xcb582286c259deb2f62a37bbed16db8ebc7c04f5) - 
2024-10-16 13:04:07.466 |      ERROR       |  - Failed to write to contract function: OwnableUnauthorizedAccount(0xcb582286c259deb2f62a37bbed16db8ebc7c04f5) - 
2024-10-16 13:04:07.467 |       INFO       |  - Approved validator 0x3969Aff9Eb547D7911b924FF06741d6Fd32737eD - 
INFO:vana: - Approved validator 0x3969Aff9Eb547D7911b924FF06741d6Fd32737eD - 
RottenToTheBone commented 2 weeks ago

OwnableUnauthorisedAccount error. This usually means that the operation you are trying to perform does not have sufficient privileges. 0x01113cFc8a1aca2915FcEd7da9dfFBB08B9bB095 This is your DLP proxy contract address right? It is owned by 0xF9810b951d45D19754435D8e44b7761aA1635D72. Snipaste_2024-10-17_22-50-21 So you can't call approveValidator's function via 0xCB582286c259DEB2f62A37bbeD16dB8EbC7c04f5. image So you should use 0xF9810b951d45D19754435D8e44b7761aA1635D72 to call approveValidator or transfer the contract ownership to 0xCB582286c259DEB2f62A37bbeD16dB8EbC7c04f5.

pvsairam commented 2 weeks ago

I did transferred contract ownership to 0xCB582286c259DEB2f62A37bbeD16dB8EbC7c04f5 yesterday but still unable to Approve validator. What else can i check?

RottenToTheBone commented 2 weeks ago

I saw it. But what you transferred yesterday was the ownership of the DLP Token's contract (0xba24510Fa7b99Afa762D5b71B199e7401a4456e4). You should transfer the ownership of DLP's proxy contract (0x01113cFc8a1aca2915FcEd7da9dfFBB08B9bB095) to 0xcb582286c259deb2f62a37bbed16db8ebc7c04f5.

RottenToTheBone commented 2 weeks ago

Or directly use 0xF9810b951d45D19754435D8e44b7761aA1635D72 to call 0x01113cFc8a1aca2915FcEd7da9dfFBB08B9bB095's approveValidator method, validatorAddress Fill in 0x3969Aff9Eb547D7911b924FF06741d6Fd32737eD. Please differentiate between the DLPT contract and the DLP contract, the DLPT contract is responsible for the tokens you create while the DLP contract has the function of managing the validator like registerValidator and approveValidator.

pvsairam commented 2 weeks ago

Thanks for the help. I have manually approved the validator using explorer - https://moksha.vanascan.io/tx/0x33c299cecf092f334c92572b17addf6c42738570a98188721d2b7af9d7931fae

Hope this is correct!

RottenToTheBone commented 2 weeks ago

You're welcome. I'm glad I could help.