At the top, the halyard is attached with a pin that goes through a loop in the halyard. Best solution is a spliced loop as it keeps most of the strength of the line. Saying that, you may live with loop created by a proper bowline. In any case, the loop should be as small as you can make it to allow the sail to go as high as needed.