Categories
Cryptocurrency Development Ethereum

ERC20 vulnerability? Executing transferFrom undesirably

Say I have contract A, and I require to send 100000 DAI to it. Ideally, I’d firstly call approve(<address of A>, 100000e18) in DAI’s contract itself. Secondly, I’d execute, for instance, the function collectDAI(100e18) from contract A. This function will internally call transferFrom(msg.sender, address(this), 100000e18) in DAI’s contract and update the contract’s state accordingly. Well, […]

Categories
Development Linux Ubuntu

System hangs for 2 minutes on grey screen before login prompt appears

First up, I’m using Pop OS, which I know is distinct from Ubuntu, but I’m hoping this isn’t a Pop-specific issue. I had a macOS install on one hard drive of my laptop and Pop OS on another. I cloned Pop OS from one to the other, wiped the original drive, and now have Pop […]

Categories
Bitcoin Cryptocurrency Development

Bitcoin Orphan blocks – short question about the “time lag” factor and proof-of-work “size”

“However, it is possible that two miners produce a block at a similar time. This situation occurs because the acceptance of the blocks into the blockchain by the nodes of the blockchain network does not happen instantaneously. This time lag in accepting a block may lead to another miner solving for the same exact block. […]

Categories
Development Linux Ubuntu

Can’t Add new Library Folder

I have steam client installed on my SSD. And I have games installed on secondary HD. When I go to Settings and Add Library Folder I navigate to /media/user/Storage/Programs/steamapps and select. It gives the error “New Steamlibrary folder must be on a filesystem mounted with execute permissions. So I tried unmounted my drive and remounting. […]

Categories
Development Linux Ubuntu

18.04 grub menu bypassed well after dual boot installed, can’t access other OS

Ive had a dual boot with ubuntu and windows 10 installed for a good while now, months at least and everything’s been working fine this whole time, but today the grub menu didn’t show up and booted me straight to ubuntu. I’ve tried updating grub to see if that gets it back but it didn’t […]

Categories
Development Linux

parted start partition and grub core.img

How do you use parted to make the first [primary] partition start at sector 63? Or does this happen automatically when doing parted /dev/sdb mkpart primary 0% <end %> I am dealing with cloning disks and finding grub2 has a core.img which is not a file name on the filesystem but important data located between […]

Categories
Development Linux

SSHFS: Cannot umount / re-mount remote directory after connection is interrupted

I often use sshfs to mount a remote directory to make it appear as local: sudo sshfs -o allow_other myname@server:/remote/path /mnt/remote/ Occasionally there could be interruption to the connection so /mnt/remote will appear as empty. If I try to re-run the above command, I’d get ‘/mnt/remote:’ Transport endpoint is not connected’ However I’m unable to […]

Categories
Development System & Network

Performance differences between multiple vhosts vs single vhost on same server?

Is there a performance difference between 1000 concurrent connection with single vhost vs 100 concurrent connections with 10 vhost on same server? I created 2 diagrams of my project which one is better option for performance wise? More Info : Apache server , laravel (php) application with mysql database. Project Diagram 1 vs Project Diagram […]

Categories
Development HTTP System & Network

Can’t send secure cookies using node and a ProxyPass/ProxyPassReverse (Httpd/Amazon linux)

I am still pretty new but I am using an Amazon linux image and httpd to encrypt and decrypt SSL requests. Then I Proxy those messages to and from a NodeJS app running on port 3001. To do this I have the following in my /etc/httpd/conf.d/ssl.conf <VirtualHost _default_:443> … ProxyPreserveHost On ProxyPass / http://*IP*:3001/ ProxyPassReverse […]

Categories
Development System & Network

vsftpd.service don’t start with error ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)

I have a VM and I want to upload/download file so I’ve installed vsftpd, but if I start the service I get this error: ● vsftpd.service – vsftpd FTP server Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-11-14 20:57:51 CET; 2s ago Process: 1637 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS) […]