I am install eth node and wait while all blockchain will be actual. I have created address with personal_newAccount and try to send some money to this account.
Address - 0x11754F088d2C1D679D49D89dB402b87c609baB08
https://etherscan.io/address/0x11754f088d2c1d679d49d89db402b87c609bab08
I sent and nothing come. I am unlock account(for sure) and try(sent money) again, but nothing come again.
eth.syncing
{
currentBlock: 12800589,
highestBlock: 12800705,
knownStates: 0,
pulledStates: 0,
startingBlock: 12798108
}
and i can fount transaction by hash in my node but i have zero value on balance and as you can see there is some OUT transaction(i did't do it). What can be wrong?
I had sucurity issue, someone stolen my etn coins when it come to wallet address. One big advise from me - if you want to install eth node on server you need to protect the server at first. In my case I did in reverse and got a big problem.
Related
I'm Beginner of Ethereum and now test the transaction in My testnet
when I testing the sendtransaction below
eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value:web3.toWei(10), chainId: 0})
Return error like this "Error: only replay-protected (EIP-155) transactions allowed over RPC"
How can I modify it?
enter image description here
EIP-155 introduced to include the chainId inside the transaction to avoid replays of the transaction on different chain, check which chainId corresponds to the network you are using and update the chainId value accordingly.
I am basically setting up a smart contract where if a second transaction isnt in same block the first transaction should fail.
A long time ago I saw documentation which showed how to get the current state I think it called it.
Which suggested it was possible to get information such as the block ID at the time the transaction was being confirmed.
I do not have any example at the moment as I can't find any information to test which is why I am asking here.
So does anybody know a way for the contract to check if another transaction is in the current block?
Thanks alot for any help.
I am basically setting up a smart contract where if a second transaction isnt in same block the first transaction should fail.
I'm uncertain what exactly it is you're trying to do but I can't imagine this is a secure operation in practice. Ultimately the second transaction will not have any way to guarantee that the first transaction is the one that actually ends up getting mined in that current block (it could be replaced by a replacement/cancel tx, or it could have insufficient gas price and get mined in the next block, etc).
All that being said, you can use the contract state to store persistent data in the contract on-chain, but that state won't be updated until it a 'mined' contract call updates it. In other words, you won't be able to check if a tx is in the same block, but you can check if a tx is in a previous block.
pragma solidity >=0.4.0 <0.9.0;
contract SimpleStorage {
mapping (string => blockNumber) public transactions;
function recordMyTransaction(string memory _id) public {
transactions[_id] = block.number;
}
function executeThingIfTransactionExists(string memory _id) public {
// string comparison
require(transactions[_id] != 0);
// ... do the thing
}
}
See solidity 0.8.7 docs.
Otherwise, you could do something like this using an oracle. But again, no guarantee that the transaction you're looking at is the one that goes through.
What's the simplest way to spoof a ping reply with Scapy? I have a compiled script that keep pinging a certain domain and I need to investigate it's behavior when it receive a ping reply. I thought Scapy would be my best option to do so, but I can't figured it out.
So far I've found the class scapy.layers.inet.ICMPEcho_am, but trying to import it from scapy.layers.inet throws an ImportError. Beside, I also need to fake a DNS respond, and I'm even more clueless on that.
Thanks in advance for any hint, solution, etc.
A ping (echo) reply is just an ICMP packet with a type and code of 0:
IP(src="FAKE INITIATOR ADDRESS", dst="THE SERVER ADDRESS") / ICMP(type=0, code=0)
or, alternatively:
IP(src="FAKE INITIATOR ADDRESS", dst="THE SERVER ADDRESS") / ICMP(type="echo-reply", code=0)
Obviously, "FAKE INITIATOR ADDRESS" and "THE SERVER ADDRESS" should be replaced by strings that hold the fake client address and the server address that you're spoofing a reply to.
The code=0 isn't actually necessary since 0 is the default, but I figured explicit it nice.
I made this program to send spoof IPv6 pings on a given interface. You need to take care of proper sequence number also in the packet
def sniffer(interface):
#scapy.sniff(iface=interface, filter="icmp6 && ip6[40] == 128", store=False, prn=process_packet)
scapy.sniff(iface=interface,filter="icmp6", store=False, prn=process_packet)
def process_packet(packet):
print("DUMP\n")
print(packet.show())
print(packet[Ether].src)
print(Ether().src)
if packet[Ether].src == Ether().src:
print("OUTGOING PACKET")
print(packet[IPv6].dst)
if packet.haslayer(ICMPv6EchoRequest):
print("OUTGOING ECHO REQUEST")
reply_packet = Ether(dst=packet[Ether].src)\
/IPv6(dst=packet[IPv6].src,
src=packet[IPv6].dst) \
/ ICMPv6EchoReply(seq=packet[ICMPv6EchoRequest].seq,
id=0x1)
scapy.sendp(reply_packet, iface="Wi-Fi")
else:
print("INCOMING PACKET")
interface = "Wi-Fi"
sniffer(interface)
Can anyone explain to me what address(0) is in Solidity? I found the following in the docs but it doesn't really make sense to me:
If the target account is the zero-account (the account with the address 0), the transaction creates a new contract. As already mentioned, the address of that contract is not the zero address but an address derived from the sender and its number of transactions sent (the “nonce”). The payload of such a contract creation transaction is taken to be EVM bytecode and executed. The output of this execution is permanently stored as the code of the contract. This means that in order to create a contract, you do not send the actual code of the contract, but in fact code that returns that code.
http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html?highlight=address(0)#index-8
Within an Ethereum transaction, the zero-account is just a special case used to indicate that a new contract is being deployed. It is literally '0x0' set to the to field in the raw transaction.
Every Ethereum transaction, whether it's a transfer between two external accounts, a request to execute contract code, or a request to deploy a new contract, are encoded in the same way. A raw transaction object will look something like this:
transaction = {
nonce: '0x0',
gasLimit: '0x6acfc0', // 7000000
gasPrice: '0x4a817c800', // 20000000000
to: '0x0',
value: '0x0',
data: '0xfffff'
};
If to is set to something other than '0x0', this request will result in transferring ether to the address (if value is non-zero), and execute the function encoded in the data field. Remember, the address can either be a contract or an external account.
When the to address is the zero-address, a new contract will be created by executing the code in data (this is what is meant by "code that returns the code"). The address of the newly created contract is technically known beforehand as it's based on the address of the sender and it's current nonce. That address becomes the official address of the contract after mining.
For a pretty good read on Ethereum transactions, check out this blog post.
Note: There is also the actual Solidity code statement address(0) which is the initial value of a variable of type address. The documentation you posted, however, is referring to specifically when the to account address in a transaction is set to '0x0'.
It's not actually true that a contract creation transaction has a "to" field set to the zero address (meaning 0x00...000). This is an easy mistake to make (and I've made it too) as it is described that way in many resources.
The passage you cite from the Solidity docs were updated to state this:
If the target account is not set (the transaction does not have a
recipient or the recipient is set to null), the transaction creates a
new contract. As already mentioned, the address of that contract is
not the zero address but an address derived from the sender and its
number of transactions sent (the “nonce”).
So you can see they realized at some point that the recipient field should be empty. I've actually looked at serialized creation transactions and found 0x80 there instead of an RLP-ed zero address.
In fact, 0x80 is the RLP encoding of an empty byte array, which is what the Yellow Paper states is the recipient for a contract creation:
The address hash $T_t$ is slightly different: it is either a 20-byte
address hash or, in the case of being a contract-creation transaction
(and thus formally equal to ∅), it is the RLP empty byte sequence and
thus the member of $B_0$
As I said, this is a common source of confusion. In that vein, this GitHub PR rolling back a mistakenly "fixed" test is amusing. It has the comment:
RLP encoding of 0 is encoding of empty byte array, so 0x80 is correct.
0x00 is encoding of byte array of length 1 containing one byte 0, not
encoding of integer 0.
I am trying to send a mass mailing campaign using PHPList. I have everything working as I need but I am getting an error message from emails sent to Google.
This error occurs in the header of the message:
Received-SPF: permerror (google.com: permanent error in processing during lookup of bounce#planemover.com: exceeds recursive limit) client-ip=xxx.xx.xxx.xx;
Authentication-Results: mx.google.com;
spf=permerror (google.com: permanent error in processing during lookup of bounce#planemover.com: exceeds recursive limit) smtp.mailfrom=bounce#planemover.com
Does anyone know what would cause this error? Will this error cause my domain to be blacklisted?
At the present time, the SPF record on your domain is:
planemover.com. 3600 IN TXT "v=spf1 mx a ip4:71.122.219.173 ip4:71.122.219.172 a:mx1.selling-ac.com include:selling-ac.com include:planemover.com ~all"
It contains an include: directive pointing back at itself. This will result in an infinite loop (or recursion).
You need to remove include:planemover.com from this DNS record. The TTL on this record is 3600 (or 1 hour), so it will take up to 1 hour after that change occurs on all of your hosting nameservers, for this to become effective globally.
Also, in the future, this kind of question is more appropriate for Server Fault. It's probably off-topic here on Stack Overflow.