function createUser(data) {
var time=Date()
var newUser=new User(data.username)
newUser.setCreateDate(time)
var res={result:newUser,duration:Date()-time}
return res
}
so maybe i'd like to put that on a smart contract, but i don't want the node to have even the slightest clue what's this function is doing however if it's a function, i could use the bandwidth to mix it with some extra side-noise, i.e. the function needs to be "sampled" into a 1000 smaller functions and encrypted or something like that. Does that mean it needs to be rewritten from imperative into functional?
It's probably only possible via obfuscation when run-time mutations are introduced to conceal the control-flow... I mean it's just when the contract is open, everyone can see my code right but it's kind of proprietary so there must be some way to use polynomials like in an encryption algorithm to automatically "encrypt" the function as well... that would be groundbreaking because that would mean that on the blockchain, aws-style lambda compute (homomorphically encrypted) could be performed but the fact that nodes get access to source code now is making the whole thing kind of. useless .