!OWtwraqrytakpoHyga:matrix.org

RSKj

147 Members
7 Servers

Load older messages


Timestamp Message
15 Jan 2020
18:48:21@gitter_emiliorizzo:matrix.orgemi (Gitter) @horca17 , please provide the address of ZoKrates contract in RSK
19:13:18@gitter_jonathansmirnoff:matrix.orgJonathan Smirnoff (Gitter) @horca17 Also if you can share the github so we can test it, it would be great.
22:18:54@gitter_horca17:matrix.orghorca17 (Gitter) @jonathansmirnoff Thank you. The zokrates contract address on RSK is 0x6a8f06429f9b234bc50336535a05a4f25db48584, we are using our own node, but we try also using the RSK public node with same results. Some Tx hash where we expected events are: 0x8e43ae58f4f0c249c28b2972891bf542c39bf6e0e7188179834b49bb4b0b1d78, 0x55a76cf5d96bc13a521c3b5a395216a834b386076c390e18bab84f926d18388b, with 0 logs.
This is where we are trying it, https://www.qubistry.co/zkrjs/verifier/ it is the verifier, that deploy the contract, and wait/monitor until the prover runs the proof on verifierTx a function on Verifier.sol, and this is the prover, https://www.qubistry.co/zkrjs/prover/, that generate the proof and send the proof to the verifying contract. If the proof is ok the contract will be executed with no errors, and it suppose to generate events or logs so the monitor will provide the information regarding the validation of the witness and will indicated the address of the prover.
It works on Rinkeby, Kovan, Ropsten and Goerli. We also test it on ganache-cli with the same good results. Everything on RSK runs with no error and all are Confirmed Tx, done without mistakes but we are not able to make the events and logs work fine so we can use them to validate the witness of the prover and the proofs generated by zokrates. Hopefully it is clear enough. Let me know, thanks again.
23:58:09@gitter_horca17:matrix.orghorca17 (Gitter) @emiliorizzo @ajlopez thank you, answer above.
16 Jan 2020
16:08:03@gitter_juli:matrix.orgJuliano Rizzo (Gitter) @horca17 you need eip-196 support, right ?
16:12:04@gitter_juli:matrix.orgJuliano Rizzo (Gitter) @horca17 https://github.com/rsksmart/rskj/pull/1066
16:37:14@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter) joined the room.
16:37:17@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter)

We are trying to connect to the blockchain "https://public-node.testnet.rsk.co/1.1.0" and execute contract methods "0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B" (EthereumDIDRegistry) and "0x0BD84E81b719d8d3d8d3d8d3d8d3d8d3d8d3d8d3d8d3d8d3d3d8d3d4d3d4d3d4d2d4d2d2d4d3d4d3d2d4d3d2d3d2d2d4d2d2d4d2d4d2d2dc9c9c9c9c One time We are trying to connect to the blockchain" https://public-node.testnet.rsk.co/1.1.0 "and execute contract methods
To achieve this, we have two accounts that we create with metamask "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2" and "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3" and we pass them RBTC from "https://faucek.testnet.testnet".

Running the methods from "https://remix.ethereum.org/" there seems to be no problems:

But using the same blockchain, contracts, accounts, etc. from the app I still skip the same error:

This error occurs only in the methods that modify the contract, in this case, "addDelegate" throws the error, but "validDelegate" works correctly, which sounds like a problem with the signatures.

We try to make the same call in several different ways, but we always end up with the same error. Could you give us what we are doing wrong, or at least give us a simple example where what we set out to do (interact with the contract already deployed from an api node)?

20:01:34@gitter_jonathansmirnoff:matrix.orgJonathan Smirnoff (Gitter) @santos.ezequiel_gitlab Can you share the code with us so we can test it? Thanks!
17 Jan 2020
15:17:01@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter)

@jonathansmirnoff
We have tried in three different ways.
The first:

code
const { delegateTypes } = require("ethr-did-resolver");
const DidRegistryContract = require("ethr-did-registry");
const Tx = require("ethereumjs-tx");

var Web3 = require("web3");
const provider = new Web3.providers.HttpProvider("https://public-node.testnet.rsk.co/1.1.0");
const web3 = new Web3(provider);
const contract = web3.eth.contract(DidRegistryContract.abi).at("0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B");

module.exports.addDelegate = async function() {
web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2";

const bytecode = await contract
    .addDelegate(
                    "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2",
                     delegateTypes.Secp256k1SignatureAuthentication2018, 
                     "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 
                     9999999
                 )
    .encodeABI();

const gasPrice = web3.eth.gasPrice;
const tra = {
    gasPrice: web3.toHex(gasPrice),
    gasLimit: web3.toHex(3000000),
    data: bytecode,
    from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"
};

const tx = new Tx(tra);
tx.sign(new Buffer( #privateKey, "hex"));
const stx = tx.serialize();

const result = await web3.eth.sendRawTransaction("0x" + stx.toString("hex"));
console.log(result);
return result;

};
```

The second:

Third:

15:19:37@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter) (edited) ... require("ethereumjs-tx"); var Web3 = require("web3"); const provider = new Web3.providers.HttpProvider("https://public-node.testnet.rsk.co/1.1.0"); const web3 = new Web3(provider); const contract = web3.eth.contract(DidRegistryContract.abi).at("0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B"); module.exports.addDelegate = async function() { web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"; const bytecode = await contract .addDelegate( "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", delegateTypes.Secp256k1SignatureAuthentication2018, "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 9999999 ) .encodeABI(); const gasPrice = web3.eth.gasPrice; const tra = { gasPrice: web3.toHex(gasPrice), gasLimit: web3.toHex(3000000), data: bytecode, from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2" }; const tx = new Tx(tra); tx.sign(new Buffer( #privateKey, "hex")); const stx = tx.serialize(); const result = await web3.eth.sendRawTransaction("0x" + stx.toString("hex")); console.log(result); return result; }; ``` The ... => ... require("ethereumjs-tx"); var Web3 = require("web3"); const provider = new Web3.providers.HttpProvider("https://public-node.testnet.rsk.co/1.1.0"); const web3 = new Web3(provider); const contract = web3.eth.contract(DidRegistryContract.abi).at("0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B"); module.exports.addDelegate = async function() { web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"; const bytecode = await contract .addDelegate( "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", delegateTypes.Secp256k1SignatureAuthentication2018, "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 9999999 ) .encodeABI(); const gasPrice = web3.eth.gasPrice; const tra = { gasPrice: web3.toHex(gasPrice), gasLimit: web3.toHex(3000000), data: bytecode, from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2" }; const tx = new Tx(tra); tx.sign(new Buffer( #privateKey, "hex")); const stx = tx.serialize(); const result = await web3.eth.sendRawTransaction("0x" + stx.toString("hex")); console.log(result); return result; }; The ...
15:20:27@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter) (edited) ... first: `code` const { delegateTypes } = require("ethr-did-resolver"); const DidRegistryContract = require("ethr-did-registry"); const Tx = require("ethereumjs-tx"); var Web3 = require("web3"); const provider = new Web3.providers.HttpProvider("https://public-node.testnet.rsk.co/1.1.0"); const web3 = new Web3(provider); const contract = web3.eth.contract(DidRegistryContract.abi).at("0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B"); module.exports.addDelegate = async function() { web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"; const bytecode = await contract .addDelegate( "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", delegateTypes.Secp256k1SignatureAuthentication2018, "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 9999999 ) .encodeABI(); const gasPrice = web3.eth.gasPrice; const tra = { gasPrice: web3.toHex(gasPrice), gasLimit: web3.toHex(3000000), data: bytecode, from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2" }; const tx = new Tx(tra); tx.sign(new Buffer( #privateKey, "hex")); const stx = tx.serialize(); const result = await web3.eth.sendRawTransaction("0x" + stx.toString("hex")); console.log(result); return result; }; The ... => ... first: ``` const { delegateTypes } = require("ethr-did-resolver"); const DidRegistryContract = require("ethr-did-registry"); const Tx = require("ethereumjs-tx"); var Web3 = require("web3"); const provider = new Web3.providers.HttpProvider("https://public-node.testnet.rsk.co/1.1.0"); const web3 = new Web3(provider); const contract = web3.eth.contract(DidRegistryContract.abi).at("0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B"); module.exports.addDelegate = async function() { web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"; const bytecode = await contract .addDelegate( "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", delegateTypes.Secp256k1SignatureAuthentication2018, "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 9999999 ) .encodeABI(); const gasPrice = web3.eth.gasPrice; const tra = { gasPrice: web3.toHex(gasPrice), gasLimit: web3.toHex(3000000), data: bytecode, from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2" }; const tx = new Tx(tra); tx.sign(new Buffer( #privateKey, "hex")); const stx = tx.serialize(); const result = await web3.eth.sendRawTransaction("0x" + stx.toString("hex")); console.log(result); return result; }; ``` The ...
15:20:50@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter) (edited) ... second: Third: ... => ... second: ``` Third: ...
15:21:59@gitter_santos.ezequiel_gitlab:matrix.orgEzequiel Santos (Gitter) (edited) ... second: ``` Third: ... => ... second: ``` const { delegateTypes } = require("ethr-did-resolver"); const DidRegistryContract = require("ethr-did-registry"); const Contract = require("@truffle/contract"); var Web3 = require("web3"); const web3 = new Web3("https://public-node.testnet.rsk.co/1.1.0"); let contract = null; const getContract = function() { const DidReg = Contract(DidRegistryContract, "0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B"); DidReg.setProvider(web3.currentProvider); DidReg.deployed().then(reg => (contract = reg)); }; getContract(); module.exports.addDelegate = async function() { web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"; const result = await contract.addDelegate( "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", delegateTypes.Secp256k1SignatureAuthentication2018, "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 999999, {from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", key: #privateKey } ); console.log(result); return result; }; ``` Third: ``` const { delegateTypes } = require("ethr-did-resolver"); const DidRegistryContract = require("ethr-did-registry"); var Web3 = require("web3"); const provider = new Web3.providers.HttpProvider("https://public-node.testnet.rsk.co/1.1.0"); const web3 = new Web3(provider); const contract = web3.eth.contract(DidRegistryContract.abi).at("0x2998c93Eb2e8eA605Bf1D80065eA16B451E1678B"); module.exports.addDelegate = async function() { web3.eth.defaultAccount = "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2"; const result = await contract.addDelegate( "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", delegateTypes.Secp256k1SignatureAuthentication2018, "0x688Fb7909536C1Cd3c4977726592580EaA48ACE3", 999999 ).call({from: "0xDFA518ceaEd1bfe6f704E51A18d4bB0A14714cd2", key: #privateKey }); console.log(result); return result; }; ``` ...
17:45:31@gitter_jonathansmirnoff:matrix.orgJonathan Smirnoff (Gitter) @santos.ezequiel_gitlab thanks for the information that you gave us. We'll try to test it. We'll tell you how it goes.
18 Jan 2020
00:06:13@gitter_horca17:matrix.orghorca17 (Gitter)
00:06:14@gitter_horca17:matrix.orghorca17 (Gitter)
00:06:14@gitter_horca17:matrix.orghorca17 (Gitter)
00:06:49@gitter_horca17:matrix.orghorca17 (Gitter) Trying to find the problem I deploy the Verifier.sol using Truffle to Ganache-cli, to Ropsten and RSK the public node, and I run the same proof on them and I have these different results. Can you help me? thanks.
20 Jan 2020
20:32:27@gitter_juli:matrix.orgJuliano Rizzo (Gitter) @horca17 did you read my message above ^ ? If you need eip-196 support it is not going to work
20:50:47@gitter_horca17:matrix.orghorca17 (Gitter)ok, let me see!
21:40:39@gitter_horca17:matrix.orghorca17 (Gitter) @juli Ok, I am working with Zokrates zk-SNARKs and everything is ok, and I am trying to make it work deploying with Truffle and/or Remix to RSK, but as you said is must be EIP-196 support compatible, is it RSK compatible? I am using RSK, Truffle, Remix, Ganache-cli and ZoKrates, and all of them seems to be Byzantium compatible and using last versions, can you tell me please which one it suppose to be EIP 196 compatible? Thanks.
21 Jan 2020
13:19:18@gitter_itirabasso:matrix.orgIgnacio Mariano Tirabasso (Gitter) joined the room.
13:19:18@gitter_itirabasso:matrix.orgIgnacio Mariano Tirabasso (Gitter)Hi guys, does the RIF storage service documentation public?
13:56:23@gitter_juli:matrix.orgJuliano Rizzo (Gitter) @horca17 RSK did not release the EIP-196 compatible node yet. You can experiment with a branch in regtest mode. There are at least 2 implementations in branches. Anyway if you continue development with ethereum nodes it should work without changes once RSK releases
14:16:41@gitter_horca17:matrix.orghorca17 (Gitter) @juli thank you, I am working on the testnet, can you tell me which one are the implementations working? thanks
14:17:01@gitter_juli:matrix.orgJuliano Rizzo (Gitter) @horca17 I sent a link to a PR in my first message
14:41:06@gitter_horca17:matrix.orghorca17 (Gitter) @juli ok, let me see!! thanks
15:42:33@gitter_horca17:matrix.orghorca17 (Gitter) @juli sorry to bother again, but when do you think EIP196 will be total release?
16:21:04@gitter_juli:matrix.orgJuliano Rizzo (Gitter) @horca17 I don't know,

There are no newer messages yet.


Back to Room List