Daohub-io / cap9

Capability-based security protocol for smart contracts
Apache License 2.0
22 stars 10 forks source link

Implement the Procedure Call syscall #172

Closed JakeOShannessy closed 5 years ago

JakeOShannessy commented 5 years ago

Implement the Procedure Call syscall as per #164.

JakeOShannessy commented 5 years ago

@Latrasis I'm having a little trouble with the line at: https://github.com/Daohub-io/cap9/blob/51c2167eaabf44ef1e59565558dc8f9d92e41efe/kernel-ewasm/cap9-std/src/proc_table/cap.rs#L187

If I place a constant on there I can read it out the other end fine, but no other value. The ’key’ value is fine, but even when I copy that value across goes to zero. If you're looking at the code again, can you read over those few lines and see if it all makes sense?

Latrasis commented 5 years ago

@Latrasis I'm having a little trouble with the line at:

https://github.com/Daohub-io/cap9/blob/51c2167eaabf44ef1e59565558dc8f9d92e41efe/kernel-ewasm/cap9-std/src/proc_table/cap.rs#L187

If I place a constant on there I can read it out the other end fine, but no other value. The ’key’ value is fine, but even when I copy that value across goes to zero. If you're looking at the code again, can you read over those few lines and see if it all makes sense?

Looks like a bug during encoding with big-endian, fixed when set as: val.byte(31).

JakeOShannessy commented 5 years ago

Really? Damn, I swear I tried that and it didn't work. Make sense though. We should probably try and use H256 as much as possible I guess.