Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 24 15:29

    qianbin on vip-193-scratch

    poa: collect beta from block he… Revert "chain: save beta from b… Merge pull request #442 from li… (compare)

  • Feb 24 15:29
    qianbin closed #442
  • Feb 24 08:48
    libotony opened #442
  • Feb 24 08:30

    qianbin on vip-193-scratch

    block: store alpha in header apply new block signer's signat… consensus: tests and 2 more (compare)

  • Feb 24 08:30
    qianbin closed #441
  • Feb 24 08:28
    libotony synchronize #441
  • Feb 24 03:09
    libotony opened #441
  • Feb 22 03:57
    AsbertMa closed #442
  • Feb 22 03:55
    yahehe commented #442
  • Feb 22 02:36
    AsbertMa commented #442
  • Feb 21 16:52
    yahehe commented #442
  • Feb 21 16:52
    yahehe commented #442
  • Feb 21 12:04
    Fpaspapa commented #442
  • Feb 21 07:58
    radishzz commented #463
  • Feb 21 07:57
    radishzz commented #462
  • Feb 21 07:41
    radishzz commented #463
  • Feb 21 07:35
    radishzz commented #461
  • Feb 21 07:34
    radishzz commented #461
  • Feb 21 04:51
    roygilbo commented #464
  • Feb 21 04:50
    roygilbo closed #464
libotony
@libotony
check this doc, same concept here
Daniil
@dvneverov
@libotony Ok, thanks a lot!
libotony
@libotony
with pleasure
Daniil
@dvneverov

Hi again!
Can you please help me with understanding VIP-191 concept of signing delegated transactions?
I checked and tried this demo: https://github.com/zzGHzz/ThorDemo3 and it works pretty well, but it uses connex.vendor.sign('tx').request() method for singing and sending transactions.
What I need is to sign delegated transaction avoiding use of wallet. So I just want to send delegated transaction like that:

const tx = new Transaction(body);
const signingHash = cry.blake2b256(tx.encode());
tx.signature = cry.secp256k1.sign(signingHash, Buffer.from(sk.slice(2), 'hex'));
const encoded = tx.encode();

const raw = '0x' + encoded.toString('hex');
let ret = await net.http("POST", 'transactions', {
headers: { 'x-genesis-id': connex.thor.genesis.id },
query: {},
body: { raw }
});

So before sending it, I also have to sign it by gasPayer like that:
const tx = new Transaction(body);
const hash = cry.blake2b256(tx.encode());
const delegatorSigningHash = cry.blake2b256(hash, Buffer.from(origin.slice(2), 'hex'));
const sig = cry.secp256k1.sign(delegatorSigningHash, Buffer.from(skDelegator.slice(2), 'hex'));

As it said in VIP-191 docs, signature of delegated transaction consists of 2 parts:
Bytes | Attribute |Type | Optional
0-64 | senderSignature | byte[65] | no
65-129 | gasPayerSignature | byte[65] | yes

According that, how to concatenate both signatures properly to achieve raw transaction which is ready to send?
Thanks in advance.

Daniil
@dvneverov
@libotony yes, working perfect!
I tried to concatenate signatures the same way, but I didnt know about "reserved" field in transaction body. After adding it, everything worked as it should be.
Thank you very much!
libotony
@libotony
you are welcome
abdulakeem50
@abdulakeem50
Hello, everyone...pls I have a problem and I hope I can get ideas to get it solved here
I just transferred VET from BINANCE to Imtoken when I thought the wallet address is the same.. Can it be retrieved?
I expect your urgent and modest answers
libotony
@libotony
Hi @abdulakeem50, the best way to reach out support is to mail support@vechain.com
I have a suggestion regarding your situation, import the recipient's KeyStore(which is stored in imToken) to Sync or mobile wallet and remember only KeyStore works
abdulakeem50
@abdulakeem50
Yeah...Thanks solved with keystore
I appreciate all
libotony
@libotony
: - )
OliverNChalk
@OliverNChalk
any update on pruning / reducing the blockchain size?
Qian Bin
@qianbin
@OliverNChalk working in progress
Jeevan
@lpfloyd
@libotony how do i calculate the total gas price of a transaction?
is calculate the intrinsicGas enough?
calculating*
libotony
@libotony

is calculate the intrinsicGas enough?

nope, you need add vm gas also

killianbellesoe
@killianbellesoe
Hi, I have some question about a new project in python. Firstly I would like to know where can I found a rest api list with all the routes ? Do you have an python library ? Thanks !
libotony
@libotony
@killianbellesoe the node will start with an open API document which is hosted at http://localhost:8669/
killianbellesoe
@killianbellesoe
@libotony Perfect thanks. An another question: I didn't see a route for creating a smart contract. This is possible ?
libotony
@libotony
a clause with to set to null and data set to code will create a contract
it's the same with ethereum
killianbellesoe
@killianbellesoe
ok thanks for this information :)
libotony
@libotony
with pleasure
Rogelio Morrell
@molekilla
hi, any one knows who's looking for Vechain devs? let me know, I'm available
Qian Bin
@qianbin
@molekilla Join the tg dev group https://t.me/VeChainDevCommunity
Abir Hasan Mubin
@abirhasanmubin
Hey guys, I want to send transactions in the chain without signing. Is there any way? Can anyone help me?
Daniil
@dvneverov
libotony
@libotony
@dvneverov I did quick research regarding your first tx, balance not enough for the tx
The tx is trying to send 0xabce2eb3c43b85aeb000/811328063099000000000000 wei but the address only hold 0xabce2eb3c43b859df000/811328063098999998902272 wei
Daniil
@dvneverov
Oh, yes, looks like there was some problem with rounding on our side
Thank you!
libotony
@libotony
you are welcome
Dan DeGreef
@dadeg
regarding multiparty payments, how do factories work? Specifically, if a contract deploys another contract, the contract becomes the master. How can we set a new master? If we have the factory immediately call prototype.setMaster(newContractAddress, desiredMaster), will that work?
I am worried it will not work, because the msg.sender would be the person's account who initiated the original transaction to have the factory create the contract.
libotony
@libotony
It would work, msg.sender is the one who called the func, in your scenario, the sender will be the factory contract(txSigner->factory->new contract)
Dan DeGreef
@dadeg
ah okay, great. Thanks for correcting my misunderstanding. Is there a more preferred way to handle this sort of thing?
or is calling setMaster immediately after contract creation the best way in your experience?
libotony
@libotony
I think there are two ways. One is your way, another one adds a method in the factory setMaster(targetContract, newMaster)
either way works
depending on your scenario
Dan DeGreef
@dadeg
understood. thanks!
libotony
@libotony
you are welcome