suave-geth icon indicating copy to clipboard operation
suave-geth copied to clipboard

suave-geth locally does not revert when a confidential request update state storage

Open haythemsellami opened this issue 1 year ago • 3 comments

What version of Suave are you on?

suave-geth version 0.1.5-23d7a718-20240404

What command(s) is the bug in?

No response

Operating System

macOS (Apple Silicon)

Describe the bug

I'm building something on top of Suave, and was following the documentation on how to make an off-chain call to ChatGPT.

In the example https://suave-alpha.flashbots.net/concepts/offchain-http, a new instance of ChatGPT is created inside of the offchain() and it updates the storage state of that contract apiKey = _apiKey;.

When running that example locally using suave-geth, and calling the offchain() method, it does not revert. When deploying the same contract on Rigil testnet, it does revert with panic: confidential request cannot modify state storage. I'm assuming this is a bug as the behaviour locally should mimic the one in production?

haythemsellami avatar May 02 '24 22:05 haythemsellami

How to reproduce:

  • https://github.com/eaglelabs-consulting/playground/blob/main/src/ChatGPTBug.sol & https://github.com/eaglelabs-consulting/playground/blob/main/app/deploy_chatgptbug.go.
  • Fill in .env file from .env.example
$ source .env
$ forge build && go run app/deploy_chatgptbug.go

haythemsellami avatar May 02 '24 22:05 haythemsellami

Is this valid issue, or I'm missing something?

haythemsellami avatar May 03 '24 20:05 haythemsellami

Hey, sorry for the delay. This is the expected behaviour, when you tried it the Rigil nodes were not updated to the latest version that included this PR which was introduced to make the uses cases like the ChatGPT example possible.

ferranbt avatar May 22 '24 11:05 ferranbt