These are chat archives for Nethereum/Nethereum

14th
Apr 2018
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 05:41
image.png
@CryptoAlphaOne - when you use SendRequestAsync or similar you will have overrides for the gas price.
Just remember to pass the parameter as a HexBigInteger.
Wow so many good questions and answers popped up over the last week when I wasn't around. Time to read...
EKostan
@EKostan
Apr 14 2018 06:46
hello, I can't send function parametr uint[1318] ?
image.png
remix send it ok
TarrahArshad
@TarrahArshad
Apr 14 2018 07:05
?
@CryptoAlphaOne but i passed GAS 1 and work fine in testnet our problem is on mainnet
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 08:03
@TarrahArshad - I assume you sent 1gwei. Sometimes 1gwei on mainnet can get stuck for quite a while; lesser people use testnet so it tends to confirm a lot faster. Do you have the transaction hash?
@EKostan - what is the value of input? Mind showing us please?
TarrahArshad
@TarrahArshad
Apr 14 2018 08:04
@EnigmaticUnreal_twitter yes i have tx sametime
sametime i get tx but in etherscan can't find tx i wait 1 hr but no txt listed
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 08:09
@TarrahArshad - you're using infura? Or connecting through geth? Could you also try bumping gas price to 2gwei to see if that helps? Though I admit I do see ethgasstation listing the standard at 1gwei but just give it a shot.
TarrahArshad
@TarrahArshad
Apr 14 2018 08:10
@EnigmaticUnreal_twitter infura
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 08:10
I'm out at the moment but when I'm home I can do a transaction or two on mainnet to see if 1gwei have problems confirming.
TarrahArshad
@TarrahArshad
Apr 14 2018 08:11
@EnigmaticUnreal_twitter i tested with 20 gas but always i set gas i see problem or no verified tx but when i remove set gasprice i see in network with defaukt gas
@EnigmaticUnreal_twitter // get estimate
            var gas = await transferHandler.EstimateGasAsync(transactionMessage, txtTokenAddress.Text);

            transactionMessage.Gas = gas;
            transactionMessage.GasPrice = (BigInteger)gasprice ; // 1 or 2 or ... 20
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 08:17
Instead of BigInteger could you try HexBigInteger for gasPrice? I don't recall
TarrahArshad
@TarrahArshad
Apr 14 2018 08:18
@EnigmaticUnreal_twitter but in testnet i get result good all fine
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 08:20
Oops fat fingers. I don't recall there was an overload for BigInt for gasPrice. I'll test this out to see what happened when I'm home, might be implicit type casting, but do give HexBigInteger a try.
Juan Blanco
@juanfranblanco
Apr 14 2018 08:20
yes it does TypeCasting
but better to use HexBigInteger
TarrahArshad
@TarrahArshad
Apr 14 2018 08:20
@juanfranblanco juan in testnet all is oky
@juanfranblanco but this line is syntax error
transactionMessage.GasPrice = (HexBigInteger)gasprice ; // 1 or 2 or ... 20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:21
yes the gas price defers from the Testnet to Mainnet
like @EnigmaticUnreal_twitter said check gas station for the price
but the price changes depending the time of the day
so if you want to save money on the gas price
you will need to validate what is the current price trend
TarrahArshad
@TarrahArshad
Apr 14 2018 08:22
@juanfranblanco i can run in low traffic time no problem only i need make sure my code is work fine
Juan Blanco
@juanfranblanco
Apr 14 2018 08:22
or fire and wait to be mined... (might take a while)
then use the default gas price
TarrahArshad
@TarrahArshad
Apr 14 2018 08:23
@juanfranblanco i can't use default gas , i need set my gas
Juan Blanco
@juanfranblanco
Apr 14 2018 08:23
the gas price is set
for you already in Nethereum if you don't include it
TarrahArshad
@TarrahArshad
Apr 14 2018 08:23
@juanfranblanco i need my own custom 1-5 gas
Juan Blanco
@juanfranblanco
Apr 14 2018 08:24
then.. there is your answer
TarrahArshad
@TarrahArshad
Apr 14 2018 08:24
@juanfranblanco this is code for get gas is oky ?
            var gas = await transferHandler.EstimateGasAsync(transactionMessage, txtTokenAddress.Text);

            transactionMessage.Gas = gas;
            transactionMessage.GasPrice = (BigInteger)gasprice ; // 1 or 2 or ... 20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:24
to me looks good
although I don't know that values are you passing
TarrahArshad
@TarrahArshad
Apr 14 2018 08:25
@juanfranblanco juan i check all i need know my code is oky and why with 20 gas not work also
@juanfranblanco i get number from textbox 1-20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:25
what textbox
your textbox
TarrahArshad
@TarrahArshad
Apr 14 2018 08:25
1 or 2 ... 20
@juanfranblanco
decimal gasprice = Convert.ToDecimal(txtGasPrice.Text);
Juan Blanco
@juanfranblanco
Apr 14 2018 08:26
you know that there is a unit conversion
TarrahArshad
@TarrahArshad
Apr 14 2018 08:26
this is my full code
           // prepare account
            var web3 = new Web3(new Account(txtPrivateKey.Text), NetworkAddress);
            var decNum = Convert.ToInt32(txtDecimal.Text);
            var dec = (decimal)Math.Pow( 10 , decNum);
            var totalToken = amount * dec;
            decimal gasprice = Convert.ToDecimal(txtGasPrice.Text);
          //  var gastPrice = (BigInteger)(web3.Eth.GasPrice.Client.) * 1.40;

            // define message transaction
            var transactionMessage = new TransferFunction()
            {
                FromAddress = senderAddress,
                To = receiverAddress,
                TokenAmount = (BigInteger)totalToken
                //, GasPrice = (BigInteger)gasprice
            };

            // get contract
            var transferHandler = web3.Eth.GetContractTransactionHandler<TransferFunction>();

            // get estimate

            var gas = await transferHandler.EstimateGasAsync(transactionMessage, txtTokenAddress.Text);

            transactionMessage.Gas = gas;
            transactionMessage.GasPrice = (BigInteger)gasprice ; // 1 or 2 or ... 20

            // send request
            //var transferReceipt = await transferHandler.SendRequestAsync(transactionMessage, txtTokenAddress.Text);
            var transferReceipt = await transferHandler.SendRequestAsync(transactionMessage, txtTokenAddress.Text);

            // add to log


            jsonResult.Json = transferReceipt;
            jsonResult.Message = "";
            jsonResult.Success = true;
Juan Blanco
@juanfranblanco
Apr 14 2018 08:27
decimal gasprice = Convert.ToDecimal(txtGasPrice.Text);
TarrahArshad
@TarrahArshad
Apr 14 2018 08:27
if i remove code for gas work fine on mainnet but when i set it only in testnet workfine
all value 1-20 or 41 not work
Juan Blanco
@juanfranblanco
Apr 14 2018 08:28
transactionMessage.GasPrice = (BigInteger)gasprice ;
????
Is that it?
You are goingto find 2 problems here
TarrahArshad
@TarrahArshad
Apr 14 2018 08:29
@juanfranblanco this code work fine and after transaction i see gast is my custom
Juan Blanco
@juanfranblanco
Apr 14 2018 08:30
but you know what the code is doing
let me explain
First... you are going to lose precision
TarrahArshad
@TarrahArshad
Apr 14 2018 08:30
but always i test on mainnet i get problem sametime i get tx sametime no , only when i remove gas on mainnet work fine with default gas
Juan Blanco
@juanfranblanco
Apr 14 2018 08:30
again...
TarrahArshad
@TarrahArshad
Apr 14 2018 08:31
@juanfranblanco this is wrong ?
      transactionMessage.GasPrice = (BigInteger)gasprice ;
Juan Blanco
@juanfranblanco
Apr 14 2018 08:31
First.. you are going to lose precision
TarrahArshad
@TarrahArshad
Apr 14 2018 08:31
@juanfranblanco ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:31
you are converting a decimal, casting it as a BigInteger
BigInteger don't have decimals
that is a general first point
TarrahArshad
@TarrahArshad
Apr 14 2018 08:32
@juanfranblanco but in testnet workfine
Juan Blanco
@juanfranblanco
Apr 14 2018 08:32
Now second part
Testnet might not care about the price
it is a testnet
if you are actually expecting a user
enter a value in a textbox
they will want to have the data to be correct
i would suggest to unit test before touching mainnet
TarrahArshad
@TarrahArshad
Apr 14 2018 08:34
@juanfranblanco bro i check data is correct
Juan Blanco
@juanfranblanco
Apr 14 2018 08:35
mainly dont use mainnet until you have fully tested in testnet
you are wasting money
that is my point
TarrahArshad
@TarrahArshad
Apr 14 2018 08:35
@juanfranblanco but we get work fine in testnet problem is in mainnet i think ur system have a bug
Juan Blanco
@juanfranblanco
Apr 14 2018 08:36
ok.. so if that is your code it is incorrect
first for the precission
hence unit testing expectations is a good idea
just a thought..
everybody makes mistakes
now.. next thing
TarrahArshad
@TarrahArshad
Apr 14 2018 08:37
0x66ba20028b84ebdab66f79f6a1b75e4015681af35cbc0399d455cd7b989f5c15
Juan Blanco
@juanfranblanco
Apr 14 2018 08:37
pricing
what values are you entering in the "textbox"
TarrahArshad
@TarrahArshad
Apr 14 2018 08:38
i get this now
1
Juan Blanco
@juanfranblanco
Apr 14 2018 08:38
ok so you are passing 1 as a gas price
so that is the next issue
TarrahArshad
@TarrahArshad
Apr 14 2018 08:39
i tested with 20 but i get tx but no see block
Juan Blanco
@juanfranblanco
Apr 14 2018 08:39
yes that will take forever to be mined as the gas price is very low
the gas price if you look at the gas station (as an example)
it is entered in Gwei
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 08:40
Ah. That's not gwei.....
Juan Blanco
@juanfranblanco
Apr 14 2018 08:41
TarrahArshad
@TarrahArshad
Apr 14 2018 08:41
@juanfranblanco bro why u no understand i test now with gas 20 stile problem
0x75722414582da00916e50b629fbe0f45edc13232f0d3ee9c5c0318f05c084e7c
this is tx with gas 20
on mainnet all gas value not work , issue gas is not
0x703ddcb8d299d1b5c3f172bb4a00376ce167a4be5777cde0f4e5233e8583e804
Juan Blanco
@juanfranblanco
Apr 14 2018 08:43
so this may help you to see the different units
or.. in Nethereum
TarrahArshad
@TarrahArshad
Apr 14 2018 08:45
@juanfranblanco but why i get tx ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:45
as you can see the gas price which is gwei or shannon
TarrahArshad
@TarrahArshad
Apr 14 2018 08:45
@juanfranblanco u give me value i set on gas fix in bigint without convert i test it now
TarrahArshad
@TarrahArshad
Apr 14 2018 08:47
@juanfranblanco this is correwct ?
    [Function("transfer", "bool")]
    public class TransferFunction : ContractMessage
    {
        [Parameter("address", "_to", 1)]
        public string To { get; set; }

        [Parameter("uint256", "_value", 2)]
        public BigInteger TokenAmount { get; set; }


    }
@juanfranblanco i try send token no etherem
Juan Blanco
@juanfranblanco
Apr 14 2018 08:48
about how to send transactions
the units need to be converted
to wei
TarrahArshad
@TarrahArshad
Apr 14 2018 08:48
juan i sent u full my code

this is my full code

           // prepare account
            var web3 = new Web3(new Account(txtPrivateKey.Text), NetworkAddress);
            var decNum = Convert.ToInt32(txtDecimal.Text);
            var dec = (decimal)Math.Pow( 10 , decNum);
            var totalToken = amount * dec;
            decimal gasprice = Convert.ToDecimal(txtGasPrice.Text);
          //  var gastPrice = (BigInteger)(web3.Eth.GasPrice.Client.) * 1.40;

            // define message transaction
            var transactionMessage = new TransferFunction()
            {
                FromAddress = senderAddress,
                To = receiverAddress,
                TokenAmount = (BigInteger)totalToken
                //, GasPrice = (BigInteger)gasprice
            };

            // get contract
            var transferHandler = web3.Eth.GetContractTransactionHandler<TransferFunction>();

            // get estimate

            var gas = await transferHandler.EstimateGasAsync(transactionMessage, txtTokenAddress.Text);

            transactionMessage.Gas = gas;
            transactionMessage.GasPrice = (BigInteger)gasprice ; // 1 or 2 or ... 20

            // send request
            //var transferReceipt = await transferHandler.SendRequestAsync(transactionMessage, txtTokenAddress.Text);
            var transferReceipt = await transferHandler.SendRequestAsync(transactionMessage, txtTokenAddress.Text);

            // add to log


            jsonResult.Json = transferReceipt;
            jsonResult.Message = "";
            jsonResult.Success = true;

check this plz

Juan Blanco
@juanfranblanco
Apr 14 2018 08:48
i have told you
First you are losing precision with your conversion
TarrahArshad
@TarrahArshad
Apr 14 2018 08:49
@juanfranblanco i no want convert only u tell me how to add fix examle 4
Juan Blanco
@juanfranblanco
Apr 14 2018 08:49
Second the data that you are inputting needs to be converted to wei
TarrahArshad
@TarrahArshad
Apr 14 2018 08:49
            transactionMessage.GasPrice = gasprice ; // 1 or 2 or ... 20
tell me fix 4 for set in this line
Juan Blanco
@juanfranblanco
Apr 14 2018 08:49
you have Web3.ConverToWei
which will accept that
also whilst all the step by step instructions are good
TarrahArshad
@TarrahArshad
Apr 14 2018 08:50
@juanfranblanco transactionMessage.GasPrice = Web3.Convert.ToWei(gasprice); // 1 or 2 or ... 20
correct ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:51
i have gave you a few links which include how to send a transaction
TarrahArshad
@TarrahArshad
Apr 14 2018 08:51
gasprice now is int 1 -20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:51
the different units
etc
TarrahArshad
@TarrahArshad
Apr 14 2018 08:51
@juanfranblanco its oky or no ?
transactionMessage.GasPrice = Web3.Convert.ToWei(gasprice); // 1 or 2 or ... 20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:52
no you need to pass the unit
you are converting from
TarrahArshad
@TarrahArshad
Apr 14 2018 08:52
gasprice is int 1 - 20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:53
so what unit are you using
maybe i am sounding too pedantic
but i just want to help you to understand how to send the transaction and the different units
TarrahArshad
@TarrahArshad
Apr 14 2018 08:54
@juanfranblanco my god juan for god tell me this line what is left ?
@juanfranblanco juan i developed 2 system and all token transfer work fine but now with gas i have problem
Juan Blanco
@juanfranblanco
Apr 14 2018 08:54
well i don't know what is 1 or 2
TarrahArshad
@TarrahArshad
Apr 14 2018 08:55
gas price
Juan Blanco
@juanfranblanco
Apr 14 2018 08:55
or 20 what unit
TarrahArshad
@TarrahArshad
Apr 14 2018 08:55
integer
my user set 1 ,2 , ... 20 and i convert to gasprice and transfer token
all is integer by textbox
Juan Blanco
@juanfranblanco
Apr 14 2018 08:55
there are many different units in Ethereum
TarrahArshad
@TarrahArshad
Apr 14 2018 08:56
@juanfranblanco its wrong now i tested
                  transactionMessage.GasPrice = Web3.Convert.ToWei(gasprice); // 1 or 2 or ... 20
Juan Blanco
@juanfranblanco
Apr 14 2018 08:56
do you want to mimic https://ethgasstation.info/
TarrahArshad
@TarrahArshad
Apr 14 2018 08:56
@juanfranblanco i check this
Juan Blanco
@juanfranblanco
Apr 14 2018 08:56
in ethgastation they use Gwei
TarrahArshad
@TarrahArshad
Apr 14 2018 08:56
Gas Price (Gwei)* = 1 - 20
u can see writed 1 - 20 for gasprice
Juan Blanco
@juanfranblanco
Apr 14 2018 08:57
it could be wei or Ether for all I know
right
TarrahArshad
@TarrahArshad
Apr 14 2018 08:57
@juanfranblanco so is i like gas 4 what is my code ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:58
so the Gwei / Shannon (which is the same unit ) needs to be converted to Wei
TarrahArshad
@TarrahArshad
Apr 14 2018 08:58
@juanfranblanco
// get estimate
            var gas = await transferHandler.EstimateGasAsync(transactionMessage, txtTokenAddress.Text);

            transactionMessage.Gas = gas;
            transactionMessage.GasPrice = Web3.Convert.ToWei(4); // 1 or 2 or ... 20
its oky ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:58
all the transaction values need to be converted to Wei
No it is not
TarrahArshad
@TarrahArshad
Apr 14 2018 08:59
poroblem is gas or gasprice ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:59
okey as you need to pass the unit you are converting from
TarrahArshad
@TarrahArshad
Apr 14 2018 08:59
@juanfranblanco how to ?
Juan Blanco
@juanfranblanco
Apr 14 2018 08:59
Web3.Convert.ToWei(value, Unit);
TarrahArshad
@TarrahArshad
Apr 14 2018 08:59
what is unit here ?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:00
this is why I am asking you to understand the units
so you can test it
TarrahArshad
@TarrahArshad
Apr 14 2018 09:00
@juanfranblanco transactionMessage.GasPrice = Web3.Convert.ToWei(gasprice, Nethereum.Util.UnitConversion.EthUnit.Wei); // 1 or 2 or ... 20
This message was deleted
Juan Blanco
@juanfranblanco
Apr 14 2018 09:00
no
that means you are converting from wei to wei
and as you have said before you were using Gwei or Shannon
TarrahArshad
@TarrahArshad
Apr 14 2018 09:01
i unknow my number is integer 1,2,20
@juanfranblanco ?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:02
image.png
TarrahArshad
@TarrahArshad
Apr 14 2018 09:02

@juanfranblanco i can't find integer in this enum

Nethereum.Util.UnitConversion.EthUnit

@juanfranblanco i checked this what is our issue now ?
@TarrahArshad u say we need first convert GWEI to X ?
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 09:04

Put 10000000000 for gas price. This is equivalent to 10gwei. 9 zeros at the back.
1gwei is 1000000000.

transactionMessage.GasPrice = New HexBigInteger(10000000000)

I have checked through your previous transactions - The ones you said work on testnet does not appear on Ropsten, Kovan, Rinkeby. So the testnet is your local testnet, which isn't reflective of mainnet gas price requirements.

@juanfranblanco - You have the patience of a saint!
TarrahArshad
@TarrahArshad
Apr 14 2018 09:06
@EnigmaticUnreal_twitter but u have 10 zero
@juanfranblanco jaun its correct for fix 1 GWEI ?
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 09:06

Yes, first one was 10gwei. Second one was an example which shows 1gwei is 9 zeros.

The code example uses 10gwei so 10 + 9 zeros = 10 zeros.

Thanks @EnigmaticUnreal_twitter
TarrahArshad
@TarrahArshad
Apr 14 2018 09:08
@EnigmaticUnreal_twitter how to we can convert int to GWEI ?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:08
From Gwei
Web3.ConvertToWei(value, Unit);
Gwei is the Unit
Ok:
Start again..
I am assuming you are trying to mimic gas station. So you are using GWei / Shannon units (the are the same)
TarrahArshad
@TarrahArshad
Apr 14 2018 09:11
@juanfranblanco
transactionMessage.GasPrice = new HexBigInteger(Web3.Convert.ToWei(gasprice, Nethereum.Util.UnitConversion.EthUnit.Gwei)); // 1 or 2 or ... 20
its oky ?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:11
All the transactions values (Ether.. GasPrice) are in weit
wei* which is the lowest unit in Ethereum
you need to convert everything to wei
TarrahArshad
@TarrahArshad
Apr 14 2018 09:12
@juanfranblanco oh god work now
Juan Blanco
@juanfranblanco
Apr 14 2018 09:12
you have Web3.Convert.ToWei which helps you to do the conversions
TarrahArshad
@TarrahArshad
Apr 14 2018 09:13
@TarrahArshad my tx available in etherscan now
transactionMessage.GasPrice = new HexBigInteger(Web3.Convert.ToWei(gasprice, Nethereum.Util.UnitConversion.EthUnit.Gwei)); // 1 or 2 or ... 20
this is correct
@juanfranblanco thank u juan thank u enigma
Juan Blanco
@juanfranblanco
Apr 14 2018 09:14
also i gave you some interesting links so you can read further. Imagine if somebody asks you the same question for support in your application. Also we need a section for this in our docs
TarrahArshad
@TarrahArshad
Apr 14 2018 09:14
@juanfranblanco juan i can call my transfer for 5k wallet with 2 sec delay ?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:16
Nethereum/Nethereum.Workbooks#22
TarrahArshad
@TarrahArshad
Apr 14 2018 09:17
@juanfranblanco i have all code now gas problem solved my question is if i start send bulk network accept or no ?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:17
TarrahArshad
@TarrahArshad
Apr 14 2018 09:17
@TarrahArshad before confirm other transfercation we can transfer new ?
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 09:22

@TarrahArshad - Juan is pointing you some really fundamental things about developing on Ethereum. Better to study what he said if you want to go further.

Simple answer yes you can send other transactions before it is confirmed. Thorough answer, depending on your use case and global network activity, it might not be a good idea sometimes as when the network gets congested, one transaction not confirming = the remainder 4999 transactions getting stuck as well.

If I recall correctly a counter for nonce is kept in memory so that bit is fine (feel free to correct me if I am wrong @juanfranblanco)
Juan Blanco
@juanfranblanco
Apr 14 2018 09:27
@EnigmaticUnreal_twitter @TarrahArshad yes transactions keep an order using the nonce, if you want to do a bulk transfer the simplest thing is to use the same web3 instance
TarrahArshad
@TarrahArshad
Apr 14 2018 09:28
@juanfranblanco web3 in contract >?
Juan Blanco
@juanfranblanco
Apr 14 2018 09:28
which keeps a counter in memory, this is needed as pending transactions may not be recorded straight away. (Which is also a way to get the next nonce)
web3 as in
var web3 = new Web3();
just use the same 'web3'
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 09:35

A bit of a random question please: How do you all generally deal with the non-deterministic nature of .NET garbage collection when it comes to private key handling?

blushes

TarrahArshad
@TarrahArshad
Apr 14 2018 09:46
@juanfranblanco @EnigmaticUnreal_twitter thank u friends
TarrahArshad
@TarrahArshad
Apr 14 2018 09:53
@juanfranblanco juan for next transaction i get this error
"replacement transaction underpriced"
Enigmatic
@EnigmaticUnreal_twitter
Apr 14 2018 10:02
I would suspect you are redeclaring web3. Reuse the same web3 object. You can declare it outside of your loop for this. This was the nonce discussion we had just now.
TarrahArshad
@TarrahArshad
Apr 14 2018 10:05
@EnigmaticUnreal_twitter but my transfer is another function and loop is in another event button click
Greatsamps
@Greatsamps
Apr 14 2018 10:19
Hi, so i am seeing something weird. I have written a function that on each new block, it gets the list of transactions, and parses them into a database. What i am seeing is that some transaction hashes are appearing in multiple blocks. For example hash abc is parsed on block 123, then it also appears on block 124. Looking at etherscan.io shows that it is in block 124, not 123, and restarting the app has no issues. This is with both local Geth and Infura, but happens A LOT more on infura. I have added some console logging that is just after we get the response back from the web3 call, so i can confirm that this is where its coming from
any idea what could be causing this?
TarrahArshad
@TarrahArshad
Apr 14 2018 10:50
@juanfranblanco what is this error sametime ? {"nonce too low"}
Greatsamps
@Greatsamps
Apr 14 2018 12:13
So did a bit more digging, this issue just happened on block 5438970. On etherscan.io that shows 126 transactions, yet i got returned 126 when i did a call. It seems that there is leakage from later blocks.