I just tried to update my iPhone 4's OS. The update failed with error 1004 and left me with the dreaded connect-to-iTunes screen! Saddened, I started a restore and got the same error!
I was pointing gs.apple.com to Saurik's server in /etc/hosts. After removing it and clearing my directory services cache, restoring worked.
This threadon the Apple Discussions shows that other people are having the same problem.
So, something is broken. Either Saurik's activation proxy isn't compatible with the new hardware or OS, or Apple's doing something to muck up the process. The lesson: remove any stray /etc/hosts entries before iPhone 4 updates!