-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ethereum-compatible wallet (WIP) #56
Conversation
- integrationTest: no more need to use a public name to get to private names - change integrationTest to async function - { RNode, RHOCore } are powerless; OK to import at module scope* - phloPrice, phloLimit are plain numbers now* - fix type of listenForDataAtName(par) arg * please excuse the lack of atomic commits for these
Protobuf returns int64 as string, presumably because js numbers can only handle 53 bits.
I haven't decided to represent JSON { "x": 1 } as rholang {"x":1} instead of @#x"!(1) yet, but when going back the other way, I see no reason not to support both.
... using the registry and previewPrivateName
The ids from `previewPrivateNames` had to be wrapped up to make a channel to listen on. `previewPrivateChannels` does the wrapping. `previewPrivateIds` is more clear about what it returns.
- Don't swallow exceptions in `integrationTest()`. Have the caller handle them. - factor out defaultPayment - re-use deployData between preview and doDeploy - refactor xPar as idToPar
Only works if proxy is patched.
- refine documentation of toJSData / fromJSData - unit tests
esp. for use in signing wallet transactions IOU docs, tests
- never mind mapping GPrivate back to in-scope names
- no need to deploy the genesis contracts ourselves
- register rlp
- uses stupid Rholang tricks to handle bytes
... rather than stupid Rholang tricks
- hoist rlp import so verifySignature can run more than once :) - move test cases to the bottom
I found a nice way to factor encode, but decode is messy enough that after only a few days, I can hardly read it.
- compute signature using rlpEncode, keccak256Hash
uses findOrCreateWallet, EtherWallet
- refactor decode
- decode nonce, value - factor our sendIt
@edeykholt, @cboscolo and I went over this tonight: wallet Zoom meeting recording Of note: metamask doesn't do offline transactions after all: MetaMask/metamask-extension#3475 maybe the thing to build is a proxy that speaks the web3 HTTP/JSON interface (e.g. eth_sendrawtransaction), takes the transactions from metamask and forwards them to RChain. See also: |
subsumed by #57 |
We can use metamask in place of RSign if we make an analog to
BasicWallet
that uses RLP (recursive length prefix) in place of protobuf to serialize the signed parameters.I think I have the tedious details prototyped:
https://github.com/dckc/RChain-API/blob/ethWallet/src/rlp.rho
https://github.com/dckc/RChain-API/blob/ethWallet/src/ethSig.rho
ethSig includes
findOrCreateWallet
, a sort of "hitching post".cc @JoshOrndorff @cboscolo @edeykholt
depends on some ByteArray methods that didn't quite get into 0.8: rchain/rchain#1968