Preventing sybil attacks : How does bitcoin get to know the computing power of a node? I know that bitcoin prevents sybil attacks through proof of work - which takes into account the computing power of each participating node . So how does bitcoin get this information ?
Most nodes these days do not mine at all, nor do they care who exactly is contributing hashpower to the network.

Proof of work does not prevent a sybil attack from occurring, rather the required work to create a block makes it costly for a successful sybil attacker to feed the victim a tailored chain-tip. Unless uses immense hashpower, they can at best hand the victim a doublespend transaction while withholding the new blocks and transactions relayed on the rest of the network. Simply waiting for one or more confirmations corresponding to the value of the transaction largely mitigates the dangers of a sybil attack.

On the other hand, sybil attacks itself are difficult because Bitcoin nodes initiate eight outbound connections to random peers in the network preferring nodes in different IP ranges. Whereas an attacker could perhaps gain control of a lot of inbound connections after identifying the victim's IP address, replacing the outbound connections would be a lot more difficult. Yet, as long as the node connects to just a single honest peer, a doublespend attack as mentioned above would be foiled.