To prepare the onion rings, center the oven racks. Preheat the oven to 500°F. Place two sheet pans in the oven to preheat them while you prepare the onion rings for baking. Measure the flour into a deep bowl. Add apinch of salt and the cayenne, then whisk to combine.
Into another deep bowl, place the egg, buttermilk, and pinch of salt, then whisk to combine this egg wash.
Into a third deep bowl, measure the bread crumbs, cornmeal, and pinch of salt, then whisk to combine. Set a platter or a flat pan by the bowls of flour mix, egg wash, and bread crumb mix. Take ahandful of onions and drop them into the flour mix, then toss to completely coat them. Lift out the floured rings and shake off excess, then place them in the egg wash, pushing them into the liquid to coat them. Lift out the rings and shake off excess. Place the coated rings in the bread crumb mix and toss to thoroughly coat them. Lift them out and shake off excess.
Arrange the breaded rings on the platter. Continue coating the remaining rings and mounding them onto the platter. Using oven mitts, remove one preheated sheet pan and set it on the stove. Line the pan with parchment paper, then spray with olive oil spray. Arrange a single layer of the breaded onion rings on the pan. Place in the preheated oven. Repeat with the second sheet pan. Bake the rings until the underside is browned and crisp, about 10 minutes. Then, using tongs, turn the rings over and bake till the other side is browned and crisp, about 10 minutes. Transfer to a serving platter. Spray the pans again, and bake another batch. Continue until you’ve baked all the onion rings.
To prepare the dip, whisk together the ketchup and the chili paste until combined.