Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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)

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

    qianbin on vip-193-scratch

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

  • 08:30
    qianbin closed #441
  • 08:28
    libotony synchronize #441
  • 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
tomggokok
@tomggokok
@AdamBFriedman What is the application scenario for your dapp payment?
Daniil
@dvneverov
Hi! We are using Vechain in one of our projects and there's couple of things we couldn't find in docs:
1) As we see, gas, used for processing transaction can be paid by some Sponsor (not by Origin), but what is the way to add such Sponsor to the transaction? There's some property GasPayer, but we couldn't find how to affect on it. Would be great if there's any example with JS based tools.
2) According to docs: "It is suggested that transaction confirmation block should over 12". So 12 blocks is constant value and it shouldn't ever change or it's just a recommendation?
3) Some transactions have value of property 'reverted' equaled true and they were packed to valid block inside blockchain. As we found out, transaction should be rejected and not going to be packed inside block if there's not enough VET or gas for processing it or because of some other conditions. But how transaction can become reverted and at what moment?
For 2, it's a recommendation
For 3, revert = true means the execution of the tx is reverted(in the virtual machine ) all the previous action before(only during the tx execution) are all reverted. In a word, the tx is packed into the block but not taking effect except the payer needs to pay the txfee
Daniil
@dvneverov
@libotony Thanks for quick response! Ok, 1 and 3 are now clear for me. But in 2 I meant that is it absolutely proper way to check if transaction was executed successfully and was packed in blockchain, by searching for it 12 blocks within the height? And is this number (12) inside of blockchain algorithms or it can be changed somehow?
libotony
@libotony
Yes, it is a proper way of checking if the tx is executed
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)