Content pfp
Content
@
0 reply
0 recast
0 reaction

gilbert pfp
gilbert
@0xgib
Security question: If deploying a contract can take 100-1000x transactions, then how does upgrading a contract work for that same number of transactions? Will the contract still function? As its old version? Or do you upload to a buffer and switch to it in 1 tx instead?
1 reply
0 recast
0 reaction

shazow pfp
shazow
@shazow.eth
I believe it's the latter, you upload it into storage buffers then swap the pointer in the final transaction.
1 reply
0 recast
1 reaction

gilbert pfp
gilbert
@0xgib
That would be the sensible option, right? Still trying to find docs on it Might have to dig into the source code
3 replies
0 recast
0 reaction

shazow pfp
shazow
@shazow.eth
https://docs.solanalabs.com/cli/examples/deploy-a-program#using-an-intermediary-buffer-account Also the final section in these docs about how to do this offline.
2 replies
0 recast
0 reaction

shazow pfp
shazow
@shazow.eth
I remember this mentioned in the docs of how upgrading contracts, will check for it later
0 reply
0 recast
0 reaction

curiousapple pfp
curiousapple
@curiousapple
hmm is it enough tho ? if a upgrade is taking multiple transactions and pointer is redirected in end, can't a malicious actor see whats being updated and exploit before the patch is applied ? you also need pause function to pause it before, no ?
2 replies
0 recast
0 reaction